summaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorAdam Manzanares <adam.manzanares@hgst.com>2016-10-19 20:40:19 -0700
committerTejun Heo <tj@kernel.org>2016-10-20 10:06:30 -0400
commit4e647d960c510e0d5cd700058fb8ddd529c390ee (patch)
tree04377f7c11e67c498fdb35418b0bda2116da7b26 /drivers/ata/libata-core.c
parent84f95243b5439a20c33837075b88926bfa00c4ec (diff)
downloadop-kernel-dev-4e647d960c510e0d5cd700058fb8ddd529c390ee.zip
op-kernel-dev-4e647d960c510e0d5cd700058fb8ddd529c390ee.tar.gz
ata: set ncq_prio_enabled iff device has support
We previously had a check to see if the device has support for prioritized ncq commands and a check to see if a device flag is set, through a sysfs variable, in order to send a prioritized command. This patch only allows the sysfs variable to be set if the device supports prioritized commands enabling one check in ata_build_rw_tf in order to determine whether or not to send a prioritized command. This patch depends on ata: ATA Command Priority Disabled By Default tj: Minor subject and formatting updates. Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index b294339..43842fd 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -787,8 +787,7 @@ int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
if (tf->flags & ATA_TFLAG_FUA)
tf->device |= 1 << 7;
- if ((dev->flags & ATA_DFLAG_NCQ_PRIO) &&
- (dev->flags & ATA_DFLAG_NCQ_PRIO_ENABLE)) {
+ if (dev->flags & ATA_DFLAG_NCQ_PRIO_ENABLE) {
if (class == IOPRIO_CLASS_RT)
tf->hob_nsect |= ATA_PRIO_HIGH <<
ATA_SHIFT_PRIO;
OpenPOWER on IntegriCloud