]> git.karo-electronics.de Git - linux-beck.git/commitdiff
libata: use ata_is_ncq() accessors
authorHannes Reinecke <hare@suse.de>
Thu, 14 Jul 2016 00:05:43 +0000 (09:05 +0900)
committerTejun Heo <tj@kernel.org>
Thu, 14 Jul 2016 14:44:57 +0000 (10:44 -0400)
Use accessor functions instead of the raw value.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libahci.c
drivers/ata/libata-core.c
drivers/ata/libata-scsi.c

index 71b07198e207d2577a8e52fe736f91f54b39a226..3e69c20e9d037442bdc6c234b07459f423db8128 100644 (file)
@@ -1975,7 +1975,7 @@ unsigned int ahci_qc_issue(struct ata_queued_cmd *qc)
         */
        pp->active_link = qc->dev->link;
 
-       if (qc->tf.protocol == ATA_PROT_NCQ)
+       if (ata_is_ncq(qc->tf.protocol))
                writel(1 << qc->tag, port_mmio + PORT_SCR_ACT);
 
        if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) {
index 077daf0d26047730a9ffdab156039a49c7acc0cf..f5eb07e06a2ad47cc01d0e5e34406ec3cbb48fcc 100644 (file)
@@ -4842,7 +4842,7 @@ int ata_std_qc_defer(struct ata_queued_cmd *qc)
 {
        struct ata_link *link = qc->dev->link;
 
-       if (qc->tf.protocol == ATA_PROT_NCQ) {
+       if (ata_is_ncq(qc->tf.protocol)) {
                if (!ata_tag_valid(link->active_tag))
                        return 0;
        } else {
@@ -5007,7 +5007,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc)
                ata_sg_clean(qc);
 
        /* command should be marked inactive atomically with qc completion */
-       if (qc->tf.protocol == ATA_PROT_NCQ) {
+       if (ata_is_ncq(qc->tf.protocol)) {
                link->sactive &= ~(1 << qc->tag);
                if (!link->sactive)
                        ap->nr_active_links--;
index 3dca0d15c469d110b8b8981887b709464515e066..0447a391fb7aa0fda7d52ecc993d73333930b118 100644 (file)
@@ -3130,8 +3130,8 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc)
                tf->command = cdb[9];
        }
 
-       /* For NCQ commands with FPDMA protocol, copy the tag value */
-       if (tf->protocol == ATA_PROT_NCQ)
+       /* For NCQ commands copy the tag value */
+       if (ata_is_ncq(tf->protocol))
                tf->nsect = qc->tag << 3;
 
        /* enforce correct master/slave bit */