From: FUJITA Tomonori Date: Tue, 19 Feb 2008 08:02:27 +0000 (+0900) Subject: [SCSI] ips: fix data buffer accessors conversion bug X-Git-Tag: v2.6.25-rc3~69^2~15 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=2b28a4721e068ac89bd5435472723a1bc44442fe;p=~emulex%2Finfiniband.git [SCSI] ips: fix data buffer accessors conversion bug 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 Acked-by: Mark Salyzyn Cc: Stable Tree Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index bb152fb9fec..7ed568f180a 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -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 */