]> git.karo-electronics.de Git - karo-tx-linux.git/commit
SCSI: dpt_i2o: fix transferred data length for scsi_set_resid()
authorMiquel van Smoorenburg <mikevs@xs4all.net>
Tue, 4 Nov 2008 23:09:12 +0000 (00:09 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 Nov 2008 22:54:51 +0000 (14:54 -0800)
commitc9e53b238e2d99094b2158a7d85170ba7dd8eeb8
tree5f77c514e75c919514c45c013f9cb0401b3591b2
parent7d02fe0c0552a85c05be8f4a834b79d22deeb3c7
SCSI: dpt_i2o: fix transferred data length for scsi_set_resid()

commit df81d2371aeca0f7474f197a3090830899016e39 upstream.

dpt_i2o.c::adpt_i2o_to_scsi() reads the value at (reply+5) which
should contain the length in bytes of the transferred data. This
would be correct if reply was a u32 *. However it is a void * here,
so we need to read the value at (reply+20) instead.

The value at (reply+5) is usually 0xff0000, which is apparently
'large enough' and didn't cause any trouble until 2.6.27 where

commit 427e59f09fdba387547106de7bab980b7fff77be
Author: James Bottomley <James.Bottomley@HansenPartnership.com>
Date:   Sat Mar 8 18:24:17 2008 -0600

    [SCSI] make use of the residue value

caused this to become visible through e.g. iostat -x .

Signed-off-by: Miquel van Smoorenburg <mikevs@xs4all.net>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/dpt_i2o.c