Lines Matching refs:qc
135 static void adma_qc_prep(struct ata_queued_cmd *qc);
136 static unsigned int adma_qc_issue(struct ata_queued_cmd *qc);
137 static int adma_check_atapi_dma(struct ata_queued_cmd *qc);
188 static int adma_check_atapi_dma(struct ata_queued_cmd *qc) in adma_check_atapi_dma() argument
272 static int adma_fill_sg(struct ata_queued_cmd *qc) in adma_fill_sg() argument
275 struct ata_port *ap = qc->ap; in adma_fill_sg()
279 u8 pFLAGS = pORD | ((qc->tf.flags & ATA_TFLAG_WRITE) ? pDIRO : 0); in adma_fill_sg()
282 for_each_sg(qc->sg, sg, qc->n_elem, si) { in adma_fill_sg()
296 buf[i++] = qc->dev->dma_mode & 0xf; in adma_fill_sg()
314 static void adma_qc_prep(struct ata_queued_cmd *qc) in adma_qc_prep() argument
316 struct adma_port_priv *pp = qc->ap->private_data; in adma_qc_prep()
323 adma_enter_reg_mode(qc->ap); in adma_qc_prep()
324 if (qc->tf.protocol != ATA_PROT_DMA) in adma_qc_prep()
342 buf[i++] = qc->tf.device; in adma_qc_prep()
344 if ((qc->tf.flags & ATA_TFLAG_LBA48)) { in adma_qc_prep()
345 buf[i++] = qc->tf.hob_nsect; in adma_qc_prep()
347 buf[i++] = qc->tf.hob_lbal; in adma_qc_prep()
349 buf[i++] = qc->tf.hob_lbam; in adma_qc_prep()
351 buf[i++] = qc->tf.hob_lbah; in adma_qc_prep()
354 buf[i++] = qc->tf.nsect; in adma_qc_prep()
356 buf[i++] = qc->tf.lbal; in adma_qc_prep()
358 buf[i++] = qc->tf.lbam; in adma_qc_prep()
360 buf[i++] = qc->tf.lbah; in adma_qc_prep()
366 buf[i++] = qc->tf.command; in adma_qc_prep()
372 i = adma_fill_sg(qc); in adma_qc_prep()
392 static inline void adma_packet_start(struct ata_queued_cmd *qc) in adma_packet_start() argument
394 struct ata_port *ap = qc->ap; in adma_packet_start()
403 static unsigned int adma_qc_issue(struct ata_queued_cmd *qc) in adma_qc_issue() argument
405 struct adma_port_priv *pp = qc->ap->private_data; in adma_qc_issue()
407 switch (qc->tf.protocol) { in adma_qc_issue()
410 adma_packet_start(qc); in adma_qc_issue()
422 return ata_sff_qc_issue(qc); in adma_qc_issue()
432 struct ata_queued_cmd *qc; in adma_intr_pkt() local
443 qc = ata_qc_from_tag(ap, ap->link.active_tag); in adma_intr_pkt()
444 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { in adma_intr_pkt()
446 qc->err_mask |= AC_ERR_HOST_BUS; in adma_intr_pkt()
448 qc->err_mask |= AC_ERR_OTHER; in adma_intr_pkt()
451 qc->err_mask |= AC_ERR_DEV; in adma_intr_pkt()
453 qc->err_mask |= AC_ERR_OTHER; in adma_intr_pkt()
455 if (!qc->err_mask) in adma_intr_pkt()
456 ata_qc_complete(qc); in adma_intr_pkt()
465 if (qc->err_mask == AC_ERR_DEV) in adma_intr_pkt()
482 struct ata_queued_cmd *qc; in adma_intr_mmio() local
486 qc = ata_qc_from_tag(ap, ap->link.active_tag); in adma_intr_mmio()
487 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) { in adma_intr_mmio()
494 ap->print_id, qc->tf.protocol, status); in adma_intr_mmio()
498 qc->err_mask |= ac_err_mask(status); in adma_intr_mmio()
499 if (!qc->err_mask) in adma_intr_mmio()
500 ata_qc_complete(qc); in adma_intr_mmio()
506 if (qc->err_mask == AC_ERR_DEV) in adma_intr_mmio()