From 69278f790b60ec6657b76061357d5d180524c588 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 11 May 2018 12:51:10 -0600 Subject: 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 Signed-off-by: Tejun Heo --- drivers/ata/libata-scsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/ata/libata-scsi.c') diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 143cdad..ce5019d 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; -- cgit v1.1