Lines Matching refs:hwif
93 ide_hwif_t *hwif = drive->hwif; in ide_dma_intr() local
94 struct ide_cmd *cmd = &hwif->cmd; in ide_dma_intr()
98 dma_stat = hwif->dma_ops->dma_end(drive); in ide_dma_intr()
100 stat = hwif->tp_ops->read_status(hwif); in ide_dma_intr()
135 ide_hwif_t *hwif = drive->hwif; in ide_dma_map_sg() local
136 struct scatterlist *sg = hwif->sg_table; in ide_dma_map_sg()
144 i = dma_map_sg(hwif->dev, sg, cmd->sg_nents, cmd->sg_dma_direction); in ide_dma_map_sg()
166 ide_hwif_t *hwif = drive->hwif; in ide_dma_unmap_sg() local
168 dma_unmap_sg(hwif->dev, hwif->sg_table, cmd->orig_sg_nents, in ide_dma_unmap_sg()
184 drive->hwif->dma_ops->dma_host_set(drive, 0); in ide_dma_off_quietly()
214 drive->hwif->dma_ops->dma_host_set(drive, 1); in ide_dma_on()
240 ide_hwif_t *hwif = drive->hwif; in ide_get_mode_mask() local
241 const struct ide_port_ops *port_ops = hwif->port_ops; in ide_get_mode_mask()
252 mask &= hwif->ultra_mask; in ide_get_mode_mask()
275 mask &= hwif->mwdma_mask; in ide_get_mode_mask()
289 mask &= hwif->swdma_mask; in ide_get_mode_mask()
313 ide_hwif_t *hwif = drive->hwif; in ide_find_dma_mode() local
319 if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA) in ide_find_dma_mode()
334 if (hwif->chipset == ide_acorn && mode == 0) { in ide_find_dma_mode()
353 ide_hwif_t *hwif = drive->hwif; in ide_tune_dma() local
364 if (hwif->host_flags & IDE_HFLAG_TRUST_BIOS_FOR_DMA) in ide_tune_dma()
380 ide_hwif_t *hwif = drive->hwif; in ide_dma_check() local
386 if (hwif->host_flags & IDE_HFLAG_TRUST_BIOS_FOR_DMA) in ide_dma_check()
448 ide_hwif_t *hwif = drive->hwif; in ide_dma_timeout_retry() local
449 const struct ide_dma_ops *dma_ops = hwif->dma_ops; in ide_dma_timeout_retry()
450 struct ide_cmd *cmd = &hwif->cmd; in ide_dma_timeout_retry()
463 hwif->tp_ops->read_status(hwif)); in ide_dma_timeout_retry()
471 hwif->tp_ops->read_status(hwif)); in ide_dma_timeout_retry()
490 if (hwif->rq) in ide_dma_timeout_retry()
491 scsi_req(hwif->rq)->result = 0; in ide_dma_timeout_retry()
495 void ide_release_dma_engine(ide_hwif_t *hwif) in ide_release_dma_engine() argument
497 if (hwif->dmatable_cpu) { in ide_release_dma_engine()
498 int prd_size = hwif->prd_max_nents * hwif->prd_ent_size; in ide_release_dma_engine()
500 dma_free_coherent(hwif->dev, prd_size, in ide_release_dma_engine()
501 hwif->dmatable_cpu, hwif->dmatable_dma); in ide_release_dma_engine()
502 hwif->dmatable_cpu = NULL; in ide_release_dma_engine()
507 int ide_allocate_dma_engine(ide_hwif_t *hwif) in ide_allocate_dma_engine() argument
511 if (hwif->prd_max_nents == 0) in ide_allocate_dma_engine()
512 hwif->prd_max_nents = PRD_ENTRIES; in ide_allocate_dma_engine()
513 if (hwif->prd_ent_size == 0) in ide_allocate_dma_engine()
514 hwif->prd_ent_size = PRD_BYTES; in ide_allocate_dma_engine()
516 prd_size = hwif->prd_max_nents * hwif->prd_ent_size; in ide_allocate_dma_engine()
518 hwif->dmatable_cpu = dma_alloc_coherent(hwif->dev, prd_size, in ide_allocate_dma_engine()
519 &hwif->dmatable_dma, in ide_allocate_dma_engine()
521 if (hwif->dmatable_cpu == NULL) { in ide_allocate_dma_engine()
523 hwif->name); in ide_allocate_dma_engine()
533 const struct ide_dma_ops *dma_ops = drive->hwif->dma_ops; in ide_dma_prepare()