Lines Matching refs:qc
385 struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->link.active_tag); in inic_host_intr() local
397 if (unlikely(!qc)) in inic_host_intr()
408 qc->err_mask |= AC_ERR_DEV; in inic_host_intr()
410 ata_qc_complete(qc); in inic_host_intr()
416 qc ? qc->tf.command : 0xff, irq_stat, idma_stat); in inic_host_intr()
445 static int inic_check_atapi_dma(struct ata_queued_cmd *qc) in inic_check_atapi_dma() argument
453 if (atapi_cmd_type(qc->cdb[0]) == READ) in inic_check_atapi_dma()
458 static void inic_fill_sg(struct inic_prd *prd, struct ata_queued_cmd *qc) in inic_fill_sg() argument
464 if (qc->tf.flags & ATA_TFLAG_WRITE) in inic_fill_sg()
467 if (ata_is_dma(qc->tf.protocol)) in inic_fill_sg()
470 for_each_sg(qc->sg, sg, qc->n_elem, si) { in inic_fill_sg()
481 static enum ata_completion_errors inic_qc_prep(struct ata_queued_cmd *qc) in inic_qc_prep() argument
483 struct inic_port_priv *pp = qc->ap->private_data; in inic_qc_prep()
487 bool is_atapi = ata_is_atapi(qc->tf.protocol); in inic_qc_prep()
488 bool is_data = ata_is_data(qc->tf.protocol); in inic_qc_prep()
494 cdb_len = qc->dev->cdb_len; in inic_qc_prep()
503 cpb->len = cpu_to_le32(qc->nbytes + cdb_len); in inic_qc_prep()
506 cpb->device = qc->tf.device; in inic_qc_prep()
507 cpb->feature = qc->tf.feature; in inic_qc_prep()
508 cpb->nsect = qc->tf.nsect; in inic_qc_prep()
509 cpb->lbal = qc->tf.lbal; in inic_qc_prep()
510 cpb->lbam = qc->tf.lbam; in inic_qc_prep()
511 cpb->lbah = qc->tf.lbah; in inic_qc_prep()
513 if (qc->tf.flags & ATA_TFLAG_LBA48) { in inic_qc_prep()
514 cpb->hob_feature = qc->tf.hob_feature; in inic_qc_prep()
515 cpb->hob_nsect = qc->tf.hob_nsect; in inic_qc_prep()
516 cpb->hob_lbal = qc->tf.hob_lbal; in inic_qc_prep()
517 cpb->hob_lbam = qc->tf.hob_lbam; in inic_qc_prep()
518 cpb->hob_lbah = qc->tf.hob_lbah; in inic_qc_prep()
521 cpb->command = qc->tf.command; in inic_qc_prep()
526 memcpy(pkt->cdb, qc->cdb, ATAPI_CDB_LEN); in inic_qc_prep()
538 inic_fill_sg(prd, qc); in inic_qc_prep()
545 static unsigned int inic_qc_issue(struct ata_queued_cmd *qc) in inic_qc_issue() argument
547 struct ata_port *ap = qc->ap; in inic_qc_issue()
571 static bool inic_qc_fill_rtf(struct ata_queued_cmd *qc) in inic_qc_fill_rtf() argument
573 struct ata_taskfile *rtf = &qc->result_tf; in inic_qc_fill_rtf()
583 inic_tf_read(qc->ap, &tf); in inic_qc_fill_rtf()
674 static void inic_post_internal_cmd(struct ata_queued_cmd *qc) in inic_post_internal_cmd() argument
677 if (qc->flags & ATA_QCFLAG_FAILED) in inic_post_internal_cmd()
678 inic_reset_port(inic_port_base(qc->ap)); in inic_post_internal_cmd()