diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-05-11 21:51:10 +0300 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2018-05-11 23:10:44 +0300 |
commit | 69278f790b60ec6657b76061357d5d180524c588 (patch) | |
tree | 020618bf91f0bdf262bb914642a074b84a9f623c /drivers/ata/libata-core.c | |
parent | 28361c403683c2b00d4f5e76045f3ccd299bf99d (diff) | |
download | linux-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-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 5e2f679322cc..54c58024ad9b 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -2286,7 +2286,7 @@ static int ata_dev_config_ncq(struct ata_device *dev, return 0; } if (ap->flags & ATA_FLAG_NCQ) { - hdepth = min(ap->scsi_host->can_queue, ATA_MAX_QUEUE - 1); + hdepth = min(ap->scsi_host->can_queue, ATA_MAX_QUEUE); dev->flags |= ATA_DFLAG_NCQ; } @@ -6408,7 +6408,7 @@ void ata_host_init(struct ata_host *host, struct device *dev, { spin_lock_init(&host->lock); mutex_init(&host->eh_mutex); - host->n_tags = ATA_MAX_QUEUE - 1; + host->n_tags = ATA_MAX_QUEUE; host->dev = dev; host->ops = ops; } @@ -6490,7 +6490,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht) { int i, rc; - host->n_tags = clamp(sht->can_queue, 1, ATA_MAX_QUEUE - 1); + host->n_tags = clamp(sht->can_queue, 1, ATA_MAX_QUEUE); /* host must have been started */ if (!(host->flags & ATA_HOST_STARTED)) { |