sata_nv: set host can_queue count appropriately
authorJens Axboe <axboe@kernel.dk>
Fri, 11 May 2018 18:51:08 +0000 (12:51 -0600)
committerTejun Heo <tj@kernel.org>
Fri, 11 May 2018 20:10:43 +0000 (13:10 -0700)
libata limits the max limit for drivers to 31 anyway. We'll soon
allow drivers to actually go to QD=32, but that might require some
driver modifications. Before we do that, ensure that sata_nv limits
the depth to 31.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/sata_nv.c

index 9a74f9f..10ae11a 100644 (file)
@@ -400,7 +400,7 @@ static struct scsi_host_template nv_adma_sht = {
 
 static struct scsi_host_template nv_swncq_sht = {
        ATA_NCQ_SHT(DRV_NAME),
-       .can_queue              = ATA_MAX_QUEUE,
+       .can_queue              = ATA_MAX_QUEUE - 1,
        .sg_tablesize           = LIBATA_MAX_PRD,
        .dma_boundary           = ATA_DMA_BOUNDARY,
        .slave_configure        = nv_swncq_slave_config,