diff options
| author | Hannes Reinecke <hare@suse.de> | 2016-07-13 20:05:43 -0400 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2016-07-14 10:44:57 -0400 |
| commit | 179b310ae77ea4f924fe338af5c8983c3f339098 (patch) | |
| tree | 5b08dec2296ee5c829a4a751535b50d16ce4cb6a /drivers/ata | |
| parent | b1c04e80c6da5f5d3d4778ede23c59666135fdeb (diff) | |
libata: use ata_is_ncq() accessors
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>
Diffstat (limited to 'drivers/ata')
| -rw-r--r-- | drivers/ata/libahci.c | 2 | ||||
| -rw-r--r-- | drivers/ata/libata-core.c | 4 | ||||
| -rw-r--r-- | drivers/ata/libata-scsi.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 71b07198e207..3e69c20e9d03 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
| @@ -1975,7 +1975,7 @@ unsigned int ahci_qc_issue(struct ata_queued_cmd *qc) | |||
| 1975 | */ | 1975 | */ |
| 1976 | pp->active_link = qc->dev->link; | 1976 | pp->active_link = qc->dev->link; |
| 1977 | 1977 | ||
| 1978 | if (qc->tf.protocol == ATA_PROT_NCQ) | 1978 | if (ata_is_ncq(qc->tf.protocol)) |
| 1979 | writel(1 << qc->tag, port_mmio + PORT_SCR_ACT); | 1979 | writel(1 << qc->tag, port_mmio + PORT_SCR_ACT); |
| 1980 | 1980 | ||
| 1981 | if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) { | 1981 | if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) { |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 077daf0d2604..f5eb07e06a2a 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -4842,7 +4842,7 @@ int ata_std_qc_defer(struct ata_queued_cmd *qc) | |||
| 4842 | { | 4842 | { |
| 4843 | struct ata_link *link = qc->dev->link; | 4843 | struct ata_link *link = qc->dev->link; |
| 4844 | 4844 | ||
| 4845 | if (qc->tf.protocol == ATA_PROT_NCQ) { | 4845 | if (ata_is_ncq(qc->tf.protocol)) { |
| 4846 | if (!ata_tag_valid(link->active_tag)) | 4846 | if (!ata_tag_valid(link->active_tag)) |
| 4847 | return 0; | 4847 | return 0; |
| 4848 | } else { | 4848 | } else { |
| @@ -5007,7 +5007,7 @@ void __ata_qc_complete(struct ata_queued_cmd *qc) | |||
| 5007 | ata_sg_clean(qc); | 5007 | ata_sg_clean(qc); |
| 5008 | 5008 | ||
| 5009 | /* command should be marked inactive atomically with qc completion */ | 5009 | /* command should be marked inactive atomically with qc completion */ |
| 5010 | if (qc->tf.protocol == ATA_PROT_NCQ) { | 5010 | if (ata_is_ncq(qc->tf.protocol)) { |
| 5011 | link->sactive &= ~(1 << qc->tag); | 5011 | link->sactive &= ~(1 << qc->tag); |
| 5012 | if (!link->sactive) | 5012 | if (!link->sactive) |
| 5013 | ap->nr_active_links--; | 5013 | ap->nr_active_links--; |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 3dca0d15c469..0447a391fb7a 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
| @@ -3130,8 +3130,8 @@ static unsigned int ata_scsi_pass_thru(struct ata_queued_cmd *qc) | |||
| 3130 | tf->command = cdb[9]; | 3130 | tf->command = cdb[9]; |
| 3131 | } | 3131 | } |
| 3132 | 3132 | ||
| 3133 | /* For NCQ commands with FPDMA protocol, copy the tag value */ | 3133 | /* For NCQ commands copy the tag value */ |
| 3134 | if (tf->protocol == ATA_PROT_NCQ) | 3134 | if (ata_is_ncq(tf->protocol)) |
| 3135 | tf->nsect = qc->tag << 3; | 3135 | tf->nsect = qc->tag << 3; |
| 3136 | 3136 | ||
| 3137 | /* enforce correct master/slave bit */ | 3137 | /* enforce correct master/slave bit */ |
