This patch was originally as406. I've rediffed it against a current tree. This patch makes the iGNORE_RESIDUE flag apply to reads (as well as writes, which it already does). This is done because we've found devices which improperly report residue in the 'read' case.
Phil will send in a follow-up patch with the appropriate unusual_devs entry for Ian's device soon. Greg, please apply. Signed-off-by: Matthew Dharm <[EMAIL PROTECTED]> # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/01/16 14:44:57-08:00 [EMAIL PROTECTED] # as406 # # drivers/usb/storage/transport.c # 2005/01/16 14:44:24-08:00 [EMAIL PROTECTED] +1 -2 # as406 # diff -Nru a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c --- a/drivers/usb/storage/transport.c 2005-01-16 14:53:47 -08:00 +++ b/drivers/usb/storage/transport.c 2005-01-16 14:53:47 -08:00 @@ -1066,8 +1066,7 @@ /* try to compute the actual residue, based on how much data * was really transferred and what the device tells us */ if (residue) { - if (!(us->flags & US_FL_IGNORE_RESIDUE) || - srb->sc_data_direction == DMA_TO_DEVICE) { + if (!(us->flags & US_FL_IGNORE_RESIDUE)) { residue = min(residue, transfer_length); srb->resid = max(srb->resid, (int) residue); } -- Matthew Dharm Home: [EMAIL PROTECTED] Maintainer, Linux USB Mass Storage Driver Sir, for the hundreth time, we do NOT carry 600-round boxes of belt-fed suction darts! -- Salesperson to Greg User Friendly, 12/30/1997
pgpZJkWQwsQEx.pgp
Description: PGP signature