Lines Matching refs:qc

832 static void bfin_bmdma_setup(struct ata_queued_cmd *qc)  in bfin_bmdma_setup()  argument
834 struct ata_port *ap = qc->ap; in bfin_bmdma_setup()
844 dev_dbg(qc->ap->dev, "in atapi dma setup\n"); in bfin_bmdma_setup()
846 if (qc->tf.flags & ATA_TFLAG_WRITE) { in bfin_bmdma_setup()
855 dma_map_sg(ap->dev, qc->sg, qc->n_elem, dir); in bfin_bmdma_setup()
858 for_each_sg(qc->sg, sg, qc->n_elem, si) { in bfin_bmdma_setup()
867 dma_desc_cpu[qc->n_elem - 1].cfg &= ~(DMAFLOW | NDSIZE); in bfin_bmdma_setup()
871 qc->n_elem * sizeof(struct dma_desc_array)); in bfin_bmdma_setup()
882 bfin_exec_command(ap, &qc->tf); in bfin_bmdma_setup()
884 if (qc->tf.flags & ATA_TFLAG_WRITE) { in bfin_bmdma_setup()
911 static void bfin_bmdma_start(struct ata_queued_cmd *qc) in bfin_bmdma_start() argument
913 struct ata_port *ap = qc->ap; in bfin_bmdma_start()
916 dev_dbg(qc->ap->dev, "in atapi dma start\n"); in bfin_bmdma_start()
935 static void bfin_bmdma_stop(struct ata_queued_cmd *qc) in bfin_bmdma_stop() argument
937 struct ata_port *ap = qc->ap; in bfin_bmdma_stop()
940 dev_dbg(qc->ap->dev, "in atapi dma stop\n"); in bfin_bmdma_stop()
946 if (qc->tf.flags & ATA_TFLAG_WRITE) { in bfin_bmdma_stop()
954 dma_unmap_sg(ap->dev, qc->sg, qc->n_elem, dir); in bfin_bmdma_stop()
1300 struct ata_queued_cmd *qc) in bfin_ata_host_intr() argument
1306 ap->print_id, qc->tf.protocol, ap->hsm_task_state); in bfin_ata_host_intr()
1319 if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) in bfin_ata_host_intr()
1323 if (qc->tf.protocol == ATA_PROT_DMA || in bfin_ata_host_intr()
1324 qc->tf.protocol == ATAPI_PROT_DMA) { in bfin_ata_host_intr()
1335 ap->ops->bmdma_stop(qc); in bfin_ata_host_intr()
1339 qc->err_mask |= AC_ERR_HOST_BUS; in bfin_ata_host_intr()
1363 ata_sff_hsm_move(ap, qc, status, 0); in bfin_ata_host_intr()
1365 if (unlikely(qc->err_mask) && (qc->tf.protocol == ATA_PROT_DMA || in bfin_ata_host_intr()
1366 qc->tf.protocol == ATAPI_PROT_DMA)) in bfin_ata_host_intr()
1397 struct ata_queued_cmd *qc; in bfin_ata_interrupt() local
1399 qc = ata_qc_from_tag(ap, ap->link.active_tag); in bfin_ata_interrupt()
1400 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) in bfin_ata_interrupt()
1401 handled |= bfin_ata_host_intr(ap, qc); in bfin_ata_interrupt()