diff options
author | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-09-24 09:18:26 +0300 |
---|---|---|
committer | Damien Le Moal <damien.lemoal@opensource.wdc.com> | 2022-09-28 14:47:31 +0300 |
commit | 141f3d6256e58103ece1c3dd2835e871f1dde240 (patch) | |
tree | 14c975e3ab5818be33bf4f59dd2ff3be7407c52e /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 6a8438de524346f2ac73b0b493980c336ebce688 (diff) | |
download | linux-141f3d6256e58103ece1c3dd2835e871f1dde240.tar.xz |
ata: libata-sata: Fix device queue depth control
The function __ata_change_queue_depth() uses the helper
ata_scsi_find_dev() to get the ata_device structure of a scsi device and
set that device maximum queue depth. However, when the ata device is
managed by libsas, ata_scsi_find_dev() returns NULL, turning
__ata_change_queue_depth() into a nop, which prevents the user from
setting the maximum queue depth of ATA devices used with libsas based
HBAs.
Fix this by renaming __ata_change_queue_depth() to
ata_change_queue_depth() and adding a pointer to the ata_device
structure of the target device as argument. This pointer is provided by
ata_scsi_change_queue_depth() using ata_scsi_find_dev() in the case of
a libata managed device and by sas_change_queue_depth() using
sas_to_ata_dev() in the case of a libsas managed ata device.
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Tested-by: John Garry <john.garry@huawei.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions