]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: don't allow setting of queue_depth bigger than can_queue
authorChristoph Hellwig <hch@lst.de>
Thu, 13 Nov 2014 13:27:41 +0000 (14:27 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 24 Nov 2014 13:45:26 +0000 (14:45 +0100)
commit34f8591260e9d38f723e7afcf7f84267a314e4a2
tree53b83ab97cc475c37f957bb85167ae8cb2ccd550
parent342680712d3e480c991303c0319d8190636a3a04
scsi: don't allow setting of queue_depth bigger than can_queue

We won't ever queue more commands than the host allows.  Instead of
letting drivers either reject or ignore this case handle it in
common code.  Note that various driver use internal constant or
variables that are assigned to both shost->can_queue and checked
in ->change_queue_depth - I did remove those checks as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Hannes Reinecke <hare@suse.de>
drivers/infiniband/ulp/srp/ib_srp.c
drivers/scsi/3w-9xxx.c
drivers/scsi/3w-sas.c
drivers/scsi/3w-xxxx.c
drivers/scsi/hpsa.c
drivers/scsi/megaraid/megaraid_mbox.c
drivers/scsi/megaraid/megaraid_sas_base.c
drivers/scsi/scsi_sysfs.c
drivers/scsi/vmw_pvscsi.c