ata: expose ncq_enable_prio sysfs attribute only on NCQ capable hosts
There is no point in exposing ncq_enable_prio sysfs attribute for devices on PATA and non-NCQ capable SATA hosts so: * remove dev_attr_ncq_prio_enable from ata_common_sdev_attrs[] * add ata_ncq_sdev_attrs[] * update ATA_NCQ_SHT() macro to use ata_ncq_sdev_attrs[] Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:

committed by
Jens Axboe

parent
3e1ee734ab
commit
6f09eae3b5
@@ -463,11 +463,17 @@ EXPORT_SYMBOL_GPL(dev_attr_sw_activity);
|
||||
|
||||
struct device_attribute *ata_common_sdev_attrs[] = {
|
||||
&dev_attr_unload_heads,
|
||||
&dev_attr_ncq_prio_enable,
|
||||
NULL
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(ata_common_sdev_attrs);
|
||||
|
||||
struct device_attribute *ata_ncq_sdev_attrs[] = {
|
||||
&dev_attr_unload_heads,
|
||||
&dev_attr_ncq_prio_enable,
|
||||
NULL
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(ata_ncq_sdev_attrs);
|
||||
|
||||
/**
|
||||
* ata_std_bios_param - generic bios head/sector/cylinder calculator used by sd.
|
||||
* @sdev: SCSI device for which BIOS geometry is to be determined
|
||||
|
Reference in New Issue
Block a user