Skip to content

Commit

Permalink
[SCSI] ips: fix data buffer accessors conversion bug
Browse files Browse the repository at this point in the history
This fixes a bug that can't handle a passthru command with more than
two sg entries.

Big thanks to Tim Pepper for debugging the problem.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Mark Salyzyn <Mark_Salyzyn@adaptec.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Feb 19, 2008
1 parent ff83efa commit 2b28a47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ ips_make_passthru(ips_ha_t *ha, struct scsi_cmnd *SC, ips_scb_t *scb, int intr)
METHOD_TRACE("ips_make_passthru", 1);

scsi_for_each_sg(SC, sg, scsi_sg_count(SC), i)
length += sg[i].length;
length += sg->length;

if (length < sizeof (ips_passthru_t)) {
/* wrong size */
Expand Down

0 comments on commit 2b28a47

Please sign in to comment.