]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
usb-storage: automatically recognize bad residues
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 29 Jul 2008 15:58:06 +0000 (11:58 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Aug 2008 00:32:50 +0000 (17:32 -0700)
commit59f4ff2ecff4cef36378928cec891785b402e80c
treeb49428f1fd19f26c75ed3e2d6994ba72d3a3d190
parent1a21175a615ed346e8043f5e9d60a672266b84b4
usb-storage: automatically recognize bad residues

This patch (as1119) will help to reduce the clutter of usb-storage's
unusual_devs file by automatically detecting some devices that need
the IGNORE_RESIDUE flag.  The idea is that devices should never return
a non-zero residue for an INQUIRY or a READ CAPACITY command unless
they failed to transfer all the requested data.  So if one of these
commands transfers a standard amount of data but there is a positive
residue, we know that the residue is bogus and we can set the flag.

This fixes the problems reported in Bugzilla #11125.

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