]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: fix host max depth checking for the 'queue_depth' sysfs interface
authorJens Axboe <axboe@fb.com>
Mon, 13 Jul 2015 14:24:39 +0000 (08:24 -0600)
committerJames Bottomley <JBottomley@Odin.com>
Thu, 16 Jul 2015 13:09:53 +0000 (16:09 +0300)
commit13c7dbaa6d8011f224156cfd846e366836468bcf
tree9488b822407f575d6fbbdacebe61df18fe87d5da
parent284263e4e939626a3186d53b27515cd8e36cec24
scsi: fix host max depth checking for the 'queue_depth' sysfs interface

Commit 999539a37a166 changed the scsi sysfs 'queue_depth' code to
rejects depths higher than the scsi host template setting. But lots
of hosts set this to 1, and update the settings in the scsi host
when the controller/devices probing happens.

This breaks (at least) mpt2sas and mpt3sas runtime setting of queue
depth, returning EINVAL for all settings but '1'. And once it's set to
1, there's no way to go back up.

Cc: stable@vger.kernel.org
Fixes: 999539a37a166 "scsi: don't allow setting of queue_depth bigger than can_queue"
Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/scsi_sysfs.c