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>
This commit is contained in:
Webb Scales 2014-11-14 17:26:43 -06:00 коммит произвёл Christoph Hellwig
Родитель 7d2cce58a7
Коммит 1a63ea6f24
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -6321,11 +6321,11 @@ static void hpsa_find_board_params(struct ctlr_info *h)
h->max_cmd_sg_entries = 31;
if (h->maxsgentries > 512) {
h->max_cmd_sg_entries = 32;
h->chainsize = h->maxsgentries - h->max_cmd_sg_entries + 1;
h->chainsize = h->maxsgentries - h->max_cmd_sg_entries;
h->maxsgentries--; /* save one for chain pointer */
} else {
h->maxsgentries = 31; /* default to traditional values */
h->chainsize = 0;
h->maxsgentries = 31; /* default to traditional values */
}
/* Find out what task management functions are supported and cache */