summaryrefslogtreecommitdiff
path: root/drivers/ata/libata-scsi.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-05-11 21:51:10 +0300
committerTejun Heo <tj@kernel.org>2018-05-11 23:10:44 +0300
commit69278f790b60ec6657b76061357d5d180524c588 (patch)
tree020618bf91f0bdf262bb914642a074b84a9f623c /drivers/ata/libata-scsi.c
parent28361c403683c2b00d4f5e76045f3ccd299bf99d (diff)
downloadlinux-69278f790b60ec6657b76061357d5d180524c588.tar.xz
libata: don't clamp queue depth to ATA_MAX_QUEUE - 1
Use what the driver provides, which will still be ATA_MAX_QUEUE - 1 at most anyway. Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r--drivers/ata/libata-scsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 143cdad7d81a..ce5019db50fd 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1319,7 +1319,7 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
int depth;
depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id));
- depth = min(ATA_MAX_QUEUE - 1, depth);
+ depth = min(ATA_MAX_QUEUE, depth);
scsi_change_queue_depth(sdev, depth);
}
@@ -1432,7 +1432,7 @@ int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,
/* limit and apply queue depth */
queue_depth = min(queue_depth, sdev->host->can_queue);
queue_depth = min(queue_depth, ata_id_queue_depth(dev->id));
- queue_depth = min(queue_depth, ATA_MAX_QUEUE - 1);
+ queue_depth = min(queue_depth, ATA_MAX_QUEUE);
if (sdev->queue_depth == queue_depth)
return -EINVAL;