Lines Matching full:qc

119 static enum ata_completion_errors adma_qc_prep(struct ata_queued_cmd *qc);
120 static unsigned int adma_qc_issue(struct ata_queued_cmd *qc);
121 static int adma_check_atapi_dma(struct ata_queued_cmd *qc);
172 static int adma_check_atapi_dma(struct ata_queued_cmd *qc) in adma_check_atapi_dma() argument
256 static int adma_fill_sg(struct ata_queued_cmd *qc) in adma_fill_sg() argument
259 struct ata_port *ap = qc->ap; in adma_fill_sg()
263 u8 pFLAGS = pORD | ((qc->tf.flags & ATA_TFLAG_WRITE) ? pDIRO : 0); in adma_fill_sg()
266 for_each_sg(qc->sg, sg, qc->n_elem, si) { in adma_fill_sg()
280 buf[i++] = qc->dev->dma_mode & 0xf; in adma_fill_sg()
295 static enum ata_completion_errors adma_qc_prep(struct ata_queued_cmd *qc) in adma_qc_prep() argument
297 struct adma_port_priv *pp = qc->ap->private_data; in adma_qc_prep()
302 adma_enter_reg_mode(qc->ap); in adma_qc_prep()
303 if (qc->tf.protocol != ATA_PROT_DMA) in adma_qc_prep()
321 buf[i++] = qc->tf.device; in adma_qc_prep()
323 if ((qc->tf.flags & ATA_TFLAG_LBA48)) { in adma_qc_prep()
324 buf[i++] = qc->tf.hob_nsect; in adma_qc_prep()
326 buf[i++] = qc->tf.hob_lbal; in adma_qc_prep()
328 buf[i++] = qc->tf.hob_lbam; in adma_qc_prep()
330 buf[i++] = qc->tf.hob_lbah; in adma_qc_prep()
333 buf[i++] = qc->tf.nsect; in adma_qc_prep()
335 buf[i++] = qc->tf.lbal; in adma_qc_prep()
337 buf[i++] = qc->tf.lbam; in adma_qc_prep()
339 buf[i++] = qc->tf.lbah; in adma_qc_prep()
345 buf[i++] = qc->tf.command; in adma_qc_prep()
351 i = adma_fill_sg(qc); in adma_qc_prep()
356 static inline void adma_packet_start(struct ata_queued_cmd *qc) in adma_packet_start() argument
358 struct ata_port *ap = qc->ap; in adma_packet_start()
365 static unsigned int adma_qc_issue(struct ata_queued_cmd *qc) in adma_qc_issue() argument
367 struct adma_port_priv *pp = qc->ap->private_data; in adma_qc_issue()
369 switch (qc->tf.protocol) { in adma_qc_issue()
372 adma_packet_start(qc); in adma_qc_issue()
384 return ata_sff_qc_issue(qc); in adma_qc_issue()
394 struct ata_queued_cmd *qc; in adma_intr_pkt() local
405 qc = ata_qc_from_tag(ap, ap->link.active_tag); in adma_intr_pkt()
406 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { in adma_intr_pkt()
408 qc->err_mask |= AC_ERR_HOST_BUS; in adma_intr_pkt()
410 qc->err_mask |= AC_ERR_OTHER; in adma_intr_pkt()
413 qc->err_mask |= AC_ERR_DEV; in adma_intr_pkt()
415 qc->err_mask |= AC_ERR_OTHER; in adma_intr_pkt()
417 if (!qc->err_mask) in adma_intr_pkt()
418 ata_qc_complete(qc); in adma_intr_pkt()
427 if (qc->err_mask == AC_ERR_DEV) in adma_intr_pkt()
444 struct ata_queued_cmd *qc; in adma_intr_mmio() local
448 qc = ata_qc_from_tag(ap, ap->link.active_tag); in adma_intr_mmio()
449 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { in adma_intr_mmio()
458 qc->err_mask |= ac_err_mask(status); in adma_intr_mmio()
459 if (!qc->err_mask) in adma_intr_mmio()
460 ata_qc_complete(qc); in adma_intr_mmio()
466 if (qc->err_mask == AC_ERR_DEV) in adma_intr_mmio()