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()
185 drive->hwif->dma_ops->dma_host_set(drive, 0); in ide_dma_off_quietly()
216 drive->hwif->dma_ops->dma_host_set(drive, 1); in ide_dma_on()
242 ide_hwif_t *hwif = drive->hwif; in ide_get_mode_mask() local
243 const struct ide_port_ops *port_ops = hwif->port_ops; in ide_get_mode_mask()
254 mask &= hwif->ultra_mask; in ide_get_mode_mask()
277 mask &= hwif->mwdma_mask; in ide_get_mode_mask()
291 mask &= hwif->swdma_mask; in ide_get_mode_mask()
315 ide_hwif_t *hwif = drive->hwif; in ide_find_dma_mode() local
321 if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA) in ide_find_dma_mode()
336 if (hwif->chipset == ide_acorn && mode == 0) { in ide_find_dma_mode()
355 ide_hwif_t *hwif = drive->hwif; in ide_tune_dma() local
366 if (hwif->host_flags & IDE_HFLAG_TRUST_BIOS_FOR_DMA) in ide_tune_dma()
382 ide_hwif_t *hwif = drive->hwif; in ide_dma_check() local
388 if (hwif->host_flags & IDE_HFLAG_TRUST_BIOS_FOR_DMA) in ide_dma_check()
450 ide_hwif_t *hwif = drive->hwif; in ide_dma_timeout_retry() local
451 const struct ide_dma_ops *dma_ops = hwif->dma_ops; in ide_dma_timeout_retry()
452 struct ide_cmd *cmd = &hwif->cmd; in ide_dma_timeout_retry()
465 hwif->tp_ops->read_status(hwif)); in ide_dma_timeout_retry()
473 hwif->tp_ops->read_status(hwif)); in ide_dma_timeout_retry()
492 if (hwif->rq) in ide_dma_timeout_retry()
493 hwif->rq->errors = 0; in ide_dma_timeout_retry()
497 void ide_release_dma_engine(ide_hwif_t *hwif) in ide_release_dma_engine() argument
499 if (hwif->dmatable_cpu) { in ide_release_dma_engine()
500 int prd_size = hwif->prd_max_nents * hwif->prd_ent_size; in ide_release_dma_engine()
502 dma_free_coherent(hwif->dev, prd_size, in ide_release_dma_engine()
503 hwif->dmatable_cpu, hwif->dmatable_dma); in ide_release_dma_engine()
504 hwif->dmatable_cpu = NULL; in ide_release_dma_engine()
509 int ide_allocate_dma_engine(ide_hwif_t *hwif) in ide_allocate_dma_engine() argument
513 if (hwif->prd_max_nents == 0) in ide_allocate_dma_engine()
514 hwif->prd_max_nents = PRD_ENTRIES; in ide_allocate_dma_engine()
515 if (hwif->prd_ent_size == 0) in ide_allocate_dma_engine()
516 hwif->prd_ent_size = PRD_BYTES; in ide_allocate_dma_engine()
518 prd_size = hwif->prd_max_nents * hwif->prd_ent_size; in ide_allocate_dma_engine()
520 hwif->dmatable_cpu = dma_alloc_coherent(hwif->dev, prd_size, in ide_allocate_dma_engine()
521 &hwif->dmatable_dma, in ide_allocate_dma_engine()
523 if (hwif->dmatable_cpu == NULL) { in ide_allocate_dma_engine()
525 hwif->name); in ide_allocate_dma_engine()
535 const struct ide_dma_ops *dma_ops = drive->hwif->dma_ops; in ide_dma_prepare()