提交 1a63ea6f 编写于 作者: W Webb Scales 提交者: Christoph Hellwig

hpsa: correct off-by-one sizing of chained SG block

Correct the size calculation of the chained SG block
Signed-off-by: NDon Brace <don.brace@pmcs.com>
Signed-off-by: NWebb Scales <webbnh@hp.com>
Reviewed-by: NStephen M. Cameron <stephenmcameron@gmail.com>
Reviewed-by: NDon Brace <don.brace@pmcs.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 7d2cce58
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册