Lines Matching full:qc

196 		struct ata_queued_cmd *qc;  member
208 static enum ata_completion_errors pdc20621_qc_prep(struct ata_queued_cmd *qc);
222 static unsigned int pdc20621_qc_issue(struct ata_queued_cmd *qc);
225 static void pdc_post_internal_cmd(struct ata_queued_cmd *qc);
226 static int pdc_check_atapi_dma(struct ata_queued_cmd *qc);
414 static void pdc20621_dma_prep(struct ata_queued_cmd *qc) in pdc20621_dma_prep() argument
417 struct ata_port *ap = qc->ap; in pdc20621_dma_prep()
425 WARN_ON(!(qc->flags & ATA_QCFLAG_DMAMAP)); in pdc20621_dma_prep()
434 for_each_sg(qc->sg, sg, qc->n_elem, si) { in pdc20621_dma_prep()
446 pdc20621_host_pkt(&qc->tf, &pp->dimm_buf[0], portno); in pdc20621_dma_prep()
449 i = pdc20621_ata_pkt(&qc->tf, qc->dev->devno, &pp->dimm_buf[0], portno); in pdc20621_dma_prep()
451 if (qc->tf.flags & ATA_TFLAG_LBA48) in pdc20621_dma_prep()
452 i = pdc_prep_lba48(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_dma_prep()
454 i = pdc_prep_lba28(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_dma_prep()
456 pdc_pkt_footer(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_dma_prep()
474 static void pdc20621_nodata_prep(struct ata_queued_cmd *qc) in pdc20621_nodata_prep() argument
476 struct ata_port *ap = qc->ap; in pdc20621_nodata_prep()
486 i = pdc20621_ata_pkt(&qc->tf, qc->dev->devno, &pp->dimm_buf[0], portno); in pdc20621_nodata_prep()
488 if (qc->tf.flags & ATA_TFLAG_LBA48) in pdc20621_nodata_prep()
489 i = pdc_prep_lba48(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_nodata_prep()
491 i = pdc_prep_lba28(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_nodata_prep()
493 pdc_pkt_footer(&qc->tf, &pp->dimm_buf[0], i); in pdc20621_nodata_prep()
507 static enum ata_completion_errors pdc20621_qc_prep(struct ata_queued_cmd *qc) in pdc20621_qc_prep() argument
509 switch (qc->tf.protocol) { in pdc20621_qc_prep()
511 pdc20621_dma_prep(qc); in pdc20621_qc_prep()
514 pdc20621_nodata_prep(qc); in pdc20621_qc_prep()
523 static void __pdc20621_push_hdma(struct ata_queued_cmd *qc, in __pdc20621_push_hdma() argument
527 struct ata_port *ap = qc->ap; in __pdc20621_push_hdma()
541 static void pdc20621_push_hdma(struct ata_queued_cmd *qc, in pdc20621_push_hdma() argument
545 struct ata_port *ap = qc->ap; in pdc20621_push_hdma()
550 __pdc20621_push_hdma(qc, seq, pkt_ofs); in pdc20621_push_hdma()
555 pp->hdma[idx].qc = qc; in pdc20621_push_hdma()
561 static void pdc20621_pop_hdma(struct ata_queued_cmd *qc) in pdc20621_pop_hdma() argument
563 struct ata_port *ap = qc->ap; in pdc20621_pop_hdma()
573 __pdc20621_push_hdma(pp->hdma[idx].qc, pp->hdma[idx].seq, in pdc20621_pop_hdma()
578 static void pdc20621_dump_hdma(struct ata_queued_cmd *qc) in pdc20621_dump_hdma() argument
580 struct ata_port *ap = qc->ap; in pdc20621_dump_hdma()
592 static void pdc20621_packet_start(struct ata_queued_cmd *qc) in pdc20621_packet_start() argument
594 struct ata_port *ap = qc->ap; in pdc20621_packet_start()
598 unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE); in pdc20621_packet_start()
610 if (rw && qc->tf.protocol == ATA_PROT_DMA) { in pdc20621_packet_start()
613 pdc20621_dump_hdma(qc); in pdc20621_packet_start()
614 pdc20621_push_hdma(qc, seq, port_ofs + PDC_DIMM_HOST_PKT); in pdc20621_packet_start()
633 static unsigned int pdc20621_qc_issue(struct ata_queued_cmd *qc) in pdc20621_qc_issue() argument
635 switch (qc->tf.protocol) { in pdc20621_qc_issue()
637 if (qc->tf.flags & ATA_TFLAG_POLLING) in pdc20621_qc_issue()
641 pdc20621_packet_start(qc); in pdc20621_qc_issue()
652 return ata_sff_qc_issue(qc); in pdc20621_qc_issue()
656 struct ata_queued_cmd *qc, in pdc20621_host_intr() argument
666 if ((qc->tf.protocol == ATA_PROT_DMA) && /* read */ in pdc20621_host_intr()
667 (!(qc->tf.flags & ATA_TFLAG_WRITE))) { in pdc20621_host_intr()
674 qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); in pdc20621_host_intr()
675 ata_qc_complete(qc); in pdc20621_host_intr()
676 pdc20621_pop_hdma(qc); in pdc20621_host_intr()
686 pdc20621_dump_hdma(qc); in pdc20621_host_intr()
687 pdc20621_push_hdma(qc, seq, in pdc20621_host_intr()
692 } else if (qc->tf.protocol == ATA_PROT_DMA) { /* write */ in pdc20621_host_intr()
713 qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); in pdc20621_host_intr()
714 ata_qc_complete(qc); in pdc20621_host_intr()
715 pdc20621_pop_hdma(qc); in pdc20621_host_intr()
720 } else if (qc->tf.protocol == ATA_PROT_NODATA) { in pdc20621_host_intr()
724 qc->err_mask |= ac_err_mask(status); in pdc20621_host_intr()
725 ata_qc_complete(qc); in pdc20621_host_intr()
779 struct ata_queued_cmd *qc; in pdc20621_interrupt() local
781 qc = ata_qc_from_tag(ap, ap->link.active_tag); in pdc20621_interrupt()
782 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) in pdc20621_interrupt()
783 handled += pdc20621_host_intr(ap, qc, (i > 4), in pdc20621_interrupt()
863 static void pdc_post_internal_cmd(struct ata_queued_cmd *qc) in pdc_post_internal_cmd() argument
865 struct ata_port *ap = qc->ap; in pdc_post_internal_cmd()
868 if (qc->flags & ATA_QCFLAG_EH) in pdc_post_internal_cmd()
872 static int pdc_check_atapi_dma(struct ata_queued_cmd *qc) in pdc_check_atapi_dma() argument
874 u8 *scsicmd = qc->scsicmd->cmnd; in pdc_check_atapi_dma()