diff options
author | Stephen Cameron <stephenmcameron@gmail.com> | 2015-01-23 16:42:59 -0600 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2015-02-02 09:57:39 -0800 |
commit | d54c5c24870ff4d581ce17f09d0c5fcb728c1d02 (patch) | |
tree | d4ebdf43365b50dac74bca1331143dd211fd0323 /drivers/scsi/hpsa.c | |
parent | 8947fd10865db321205faa0e4123d165aff0781c (diff) | |
download | op-kernel-dev-d54c5c24870ff4d581ce17f09d0c5fcb728c1d02.zip op-kernel-dev-d54c5c24870ff4d581ce17f09d0c5fcb728c1d02.tar.gz |
hpsa: reserve some commands for use by driver
We need to reserve some commands for device rescans,
aborts, and the pass through ioctls, etc. so we cannot
give them all to the scsi mid layer.
This is in preparation for removing cmd_special_alloc and
cmd_special_free so that we can stop queuing commands internally
in the driver so that we can remove the locks thta protect the
queue that we will no longer have.
Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r-- | drivers/scsi/hpsa.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index bee24b2..99c32a0 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -4064,11 +4064,14 @@ static int hpsa_register_scsi(struct ctlr_info *h) sh->max_cmd_len = MAX_COMMAND_SIZE; sh->max_lun = HPSA_MAX_LUN; sh->max_id = HPSA_MAX_LUN; - sh->can_queue = h->nr_cmds; + sh->can_queue = h->nr_cmds - + HPSA_CMDS_RESERVED_FOR_ABORTS - + HPSA_CMDS_RESERVED_FOR_DRIVER - + HPSA_MAX_CONCURRENT_PASSTHRUS; if (h->hba_mode_enabled) sh->cmd_per_lun = 7; else - sh->cmd_per_lun = h->nr_cmds; + sh->cmd_per_lun = sh->can_queue; sh->sg_tablesize = h->maxsgentries; h->scsi_host = sh; sh->hostdata[0] = (unsigned long) h; |