Lines Matching full:qc
59 static enum ata_completion_errors acard_ahci_qc_prep(struct ata_queued_cmd *qc);
60 static void acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
182 static unsigned int acard_ahci_fill_sg(struct ata_queued_cmd *qc, void *cmd_tbl) in acard_ahci_fill_sg() argument
191 for_each_sg(qc->sg, sg, qc->n_elem, si) { in acard_ahci_fill_sg()
211 static enum ata_completion_errors acard_ahci_qc_prep(struct ata_queued_cmd *qc) in acard_ahci_qc_prep() argument
213 struct ata_port *ap = qc->ap; in acard_ahci_qc_prep()
215 int is_atapi = ata_is_atapi(qc->tf.protocol); in acard_ahci_qc_prep()
224 cmd_tbl = pp->cmd_tbl + qc->hw_tag * AHCI_CMD_TBL_SZ; in acard_ahci_qc_prep()
226 ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, cmd_tbl); in acard_ahci_qc_prep()
229 memcpy(cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb, qc->dev->cdb_len); in acard_ahci_qc_prep()
232 if (qc->flags & ATA_QCFLAG_DMAMAP) in acard_ahci_qc_prep()
233 acard_ahci_fill_sg(qc, cmd_tbl); in acard_ahci_qc_prep()
240 opts = cmd_fis_len | (qc->dev->link->pmp << 12); in acard_ahci_qc_prep()
241 if (qc->tf.flags & ATA_TFLAG_WRITE) in acard_ahci_qc_prep()
246 ahci_fill_cmd_slot(pp, qc->hw_tag, opts); in acard_ahci_qc_prep()
251 static void acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc) in acard_ahci_qc_fill_rtf() argument
253 struct ahci_port_priv *pp = qc->ap->private_data; in acard_ahci_qc_fill_rtf()
257 rx_fis += qc->dev->link->pmp * ACARD_AHCI_RX_FIS_SZ; in acard_ahci_qc_fill_rtf()
265 if (qc->tf.protocol == ATA_PROT_PIO && qc->dma_dir == DMA_FROM_DEVICE && in acard_ahci_qc_fill_rtf()
266 !(qc->flags & ATA_QCFLAG_EH)) { in acard_ahci_qc_fill_rtf()
267 ata_tf_from_fis(rx_fis + RX_FIS_PIO_SETUP, &qc->result_tf); in acard_ahci_qc_fill_rtf()
268 qc->result_tf.status = (rx_fis + RX_FIS_PIO_SETUP)[15]; in acard_ahci_qc_fill_rtf()
270 ata_tf_from_fis(rx_fis + RX_FIS_D2H_REG, &qc->result_tf); in acard_ahci_qc_fill_rtf()