| From stable-bounces@linux.kernel.org Tue Mar 11 22:05:31 2008 |
| Date: Sat, 23 Feb 2008 20:55:12 GMT |
| Message-Id: <200802232055.m1NKtCp8024252@hera.kernel.org> |
| From: jejb@kernel.org |
| To: jejb@kernel.org, stable@kernel.org |
| Subject: SCSI ips: fix data buffer accessors conversion bug |
| |
| From: FUJITA Tomonori <tomof@acm.org> |
| |
| commit: 2b28a4721e068ac89bd5435472723a1bc44442fe |
| |
| 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> |
| Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> |
| Signed-off-by: Chris Wright <chrisw@sous-sol.org> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
| --- |
| drivers/scsi/ips.c | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| --- a/drivers/scsi/ips.c |
| +++ b/drivers/scsi/ips.c |
| @@ -1580,7 +1580,7 @@ ips_make_passthru(ips_ha_t *ha, struct s |
| 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 */ |