summaryrefslogtreecommitdiff
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2023-05-30 16:29:24 +0900
committerDamien Le Moal <dlemoal@kernel.org>2023-06-05 08:02:21 +0900
commit371b74c8ba8fa588ab9ba10d0504acf495b3490e (patch)
treeebfc2738e26dc6335879374d1f1c428fa8239bb7 /include/linux/libata.h
parente4c26a1b74b559f86905de6443e592f248473fff (diff)
ata: libata-sata: Simplify ata_change_queue_depth()
Commit 141f3d6256e5 ("ata: libata-sata: Fix device queue depth control") added a struct ata_device argument to ata_change_queue_depth() to address problems with changing the queue depth of ATA devices managed through libsas. This was due to problems with ata_scsi_find_dev() which are now fixed with commit 7f875850f20a ("ata: libata-scsi: Use correct device no in ata_find_dev()"). Undo some of the changes of commit 141f3d6256e5: remove the added struct ata_device aregument and use again ata_scsi_find_dev() to find the target ATA device structure. While doing this, also make sure that ata_scsi_find_dev() is called with ap->lock held, as it should. libsas and libata call sites of ata_change_queue_depth() are updated to match the modified function arguments. Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Jason Yan <yanaijie@huawei.com> Reviewed-by: John Garry <john.g.garry@oracle.com>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 01f9fbb69f89..bc756f8586f3 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1144,8 +1144,8 @@ extern int ata_scsi_slave_config(struct scsi_device *sdev);
extern void ata_scsi_slave_destroy(struct scsi_device *sdev);
extern int ata_scsi_change_queue_depth(struct scsi_device *sdev,
int queue_depth);
-extern int ata_change_queue_depth(struct ata_port *ap, struct ata_device *dev,
- struct scsi_device *sdev, int queue_depth);
+extern int ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,
+ int queue_depth);
extern struct ata_device *ata_dev_pair(struct ata_device *adev);
extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev);
extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap);