ata: avoid probing NCQ Prio Support if not explicitly requested
authorAdam Manzanares <adam.manzanares@wdc.com>
Tue, 13 Dec 2016 20:00:05 +0000 (12:00 -0800)
committerTejun Heo <tj@kernel.org>
Tue, 13 Dec 2016 22:20:17 +0000 (17:20 -0500)
commit9f56eca3aeeab699a7dbfb397661d2eca4430e94
tree92de910b4b32d8ba9297f9dbc1fc6a5f5b979293
parentaecec8b60422118b52e3347430ba9382e57d6d76
ata: avoid probing NCQ Prio Support if not explicitly requested

Previously, when the ata device was being initialized we were
probing for NCQ prio support by checking the identify information
and also checking the log page that holds information about ncq prio
support.

This caused an error on an Intel HBA so the code is now updated to
only probe for NCQ prio support when the sysfs variable controlling
NCQ prio support is enabled.

tj: Update formatting, switch to spin_[un]lock_irq() and update
    locking a bit, use REVALIDATE instead of RESET, and return -EIO
    instead of -EINVAL on config failure.

Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-core.c
drivers/ata/libata-scsi.c