diff options
author | Webb Scales <webbnh@hp.com> | 2014-11-14 18:26:43 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-20 03:11:23 -0500 |
commit | 1a63ea6f244b10117601f96e7bde9f8d21ebe458 (patch) | |
tree | 7340e33cc01a7858b7fed22eeb83f9b0e3e32610 /drivers/scsi/hpsa.c | |
parent | 7d2cce58a765e802959471f8a7edd83f113ad637 (diff) |
hpsa: correct off-by-one sizing of chained SG block
Correct the size calculation of the chained SG block
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Webb Scales <webbnh@hp.com>
Reviewed-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Reviewed-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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index f0984c62bec3..4ca94a5373d3 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -6321,11 +6321,11 @@ static void hpsa_find_board_params(struct ctlr_info *h) | |||
6321 | h->max_cmd_sg_entries = 31; | 6321 | h->max_cmd_sg_entries = 31; |
6322 | if (h->maxsgentries > 512) { | 6322 | if (h->maxsgentries > 512) { |
6323 | h->max_cmd_sg_entries = 32; | 6323 | h->max_cmd_sg_entries = 32; |
6324 | h->chainsize = h->maxsgentries - h->max_cmd_sg_entries + 1; | 6324 | h->chainsize = h->maxsgentries - h->max_cmd_sg_entries; |
6325 | h->maxsgentries--; /* save one for chain pointer */ | 6325 | h->maxsgentries--; /* save one for chain pointer */ |
6326 | } else { | 6326 | } else { |
6327 | h->maxsgentries = 31; /* default to traditional values */ | ||
6328 | h->chainsize = 0; | 6327 | h->chainsize = 0; |
6328 | h->maxsgentries = 31; /* default to traditional values */ | ||
6329 | } | 6329 | } |
6330 | 6330 | ||
6331 | /* Find out what task management functions are supported and cache */ | 6331 | /* Find out what task management functions are supported and cache */ |