usb-storage: update earlier scatter-gather bug fix
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 22 Feb 2008 22:00:06 +0000 (17:00 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 4 Mar 2008 22:57:43 +0000 (14:57 -0800)
commit6d512a80c26d87f8599057c86dc920fbfe0aa3aa
tree17971e61a77fa4843a14e0c3cef047bf07b491bd
parent0ed930bffab2ec98ee8f43f579a30755c13dd5ea
usb-storage: update earlier scatter-gather bug fix

This patch (as1037) makes a small update to the earlier as1035 patch.
The minimum-length computation shouldn't be done in
usb_stor_access_xfer_buf(), since that routine can be called multiple
times for a single transfer.  It should be done in
usb_stor_set_xfer_buf() instead, which gets called only once.

The way it is now isn't really _wrong_, but it isn't really _right_
either.  Moving the statement will be an improvement.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/protocol.c