• Home
  • Raw
  • Download

Lines Matching refs:qc

158 static void pdc_qc_prep(struct ata_queued_cmd *qc);
161 static int pdc_check_atapi_dma(struct ata_queued_cmd *qc);
162 static int pdc_old_sata_check_atapi_dma(struct ata_queued_cmd *qc);
164 static unsigned int pdc_qc_issue(struct ata_queued_cmd *qc);
174 static void pdc_post_internal_cmd(struct ata_queued_cmd *qc);
501 static void pdc_atapi_pkt(struct ata_queued_cmd *qc) in pdc_atapi_pkt() argument
503 struct ata_port *ap = qc->ap; in pdc_atapi_pkt()
505 unsigned int cdb_len = qc->dev->cdb_len; in pdc_atapi_pkt()
506 u8 *cdb = qc->cdb; in pdc_atapi_pkt()
515 switch (qc->tf.protocol) { in pdc_atapi_pkt()
517 if (!(qc->tf.flags & ATA_TFLAG_WRITE)) in pdc_atapi_pkt()
536 dev_sel = qc->tf.device; in pdc_atapi_pkt()
544 buf[17] = qc->tf.nsect; in pdc_atapi_pkt()
546 buf[19] = qc->tf.lbal; in pdc_atapi_pkt()
549 if (qc->tf.protocol != ATAPI_PROT_DMA) in pdc_atapi_pkt()
557 buf[23] = qc->tf.lbam; in pdc_atapi_pkt()
559 buf[25] = qc->tf.lbah; in pdc_atapi_pkt()
563 buf[27] = qc->tf.command; in pdc_atapi_pkt()
589 static void pdc_fill_sg(struct ata_queued_cmd *qc) in pdc_fill_sg() argument
591 struct ata_port *ap = qc->ap; in pdc_fill_sg()
598 if (!(qc->flags & ATA_QCFLAG_DMAMAP)) in pdc_fill_sg()
602 for_each_sg(qc->sg, sg, qc->n_elem, si) { in pdc_fill_sg()
652 static void pdc_qc_prep(struct ata_queued_cmd *qc) in pdc_qc_prep() argument
654 struct pdc_port_priv *pp = qc->ap->private_data; in pdc_qc_prep()
659 switch (qc->tf.protocol) { in pdc_qc_prep()
661 pdc_fill_sg(qc); in pdc_qc_prep()
664 i = pdc_pkt_header(&qc->tf, qc->ap->bmdma_prd_dma, in pdc_qc_prep()
665 qc->dev->devno, pp->pkt); in pdc_qc_prep()
666 if (qc->tf.flags & ATA_TFLAG_LBA48) in pdc_qc_prep()
667 i = pdc_prep_lba48(&qc->tf, pp->pkt, i); in pdc_qc_prep()
669 i = pdc_prep_lba28(&qc->tf, pp->pkt, i); in pdc_qc_prep()
670 pdc_pkt_footer(&qc->tf, pp->pkt, i); in pdc_qc_prep()
673 pdc_fill_sg(qc); in pdc_qc_prep()
676 pdc_fill_sg(qc); in pdc_qc_prep()
679 pdc_atapi_pkt(qc); in pdc_qc_prep()
848 static void pdc_post_internal_cmd(struct ata_queued_cmd *qc) in pdc_post_internal_cmd() argument
850 struct ata_port *ap = qc->ap; in pdc_post_internal_cmd()
853 if (qc->flags & ATA_QCFLAG_FAILED) in pdc_post_internal_cmd()
857 static void pdc_error_intr(struct ata_port *ap, struct ata_queued_cmd *qc, in pdc_error_intr() argument
884 qc->err_mask |= ac_err_mask; in pdc_error_intr()
892 struct ata_queued_cmd *qc) in pdc_host_intr() argument
905 pdc_error_intr(ap, qc, port_status, err_mask); in pdc_host_intr()
909 switch (qc->tf.protocol) { in pdc_host_intr()
914 qc->err_mask |= ac_err_mask(ata_wait_idle(ap)); in pdc_host_intr()
915 ata_qc_complete(qc); in pdc_host_intr()
1004 struct ata_queued_cmd *qc; in pdc_interrupt() local
1006 qc = ata_qc_from_tag(ap, ap->link.active_tag); in pdc_interrupt()
1007 if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) in pdc_interrupt()
1008 handled += pdc_host_intr(ap, qc); in pdc_interrupt()
1019 static void pdc_packet_start(struct ata_queued_cmd *qc) in pdc_packet_start() argument
1021 struct ata_port *ap = qc->ap; in pdc_packet_start()
1039 static unsigned int pdc_qc_issue(struct ata_queued_cmd *qc) in pdc_qc_issue() argument
1041 switch (qc->tf.protocol) { in pdc_qc_issue()
1043 if (qc->dev->flags & ATA_DFLAG_CDB_INTR) in pdc_qc_issue()
1047 if (qc->tf.flags & ATA_TFLAG_POLLING) in pdc_qc_issue()
1052 pdc_packet_start(qc); in pdc_qc_issue()
1057 return ata_sff_qc_issue(qc); in pdc_qc_issue()
1073 static int pdc_check_atapi_dma(struct ata_queued_cmd *qc) in pdc_check_atapi_dma() argument
1075 u8 *scsicmd = qc->scsicmd->cmnd; in pdc_check_atapi_dma()
1103 static int pdc_old_sata_check_atapi_dma(struct ata_queued_cmd *qc) in pdc_old_sata_check_atapi_dma() argument