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://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b28a4721e068ac89bd5435472723a1bc44442fe;p=linux-2.6 [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 bb152fb9fe..7ed568f180 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 */