]> git.baikalelectronics.ru Git - kernel.git/commit
usb-storage: report underflow with no sense data
authorAlan Stern <stern@rowland.harvard.edu>
Tue, 2 Sep 2008 14:12:11 +0000 (10:12 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 17 Oct 2008 21:40:54 +0000 (14:40 -0700)
commit15c7414ca29122c16da24e3d86b4b6adb6a7e20d
treef7155136c8a9353e4058b416ffff60512b266020
parent911f8d5bff7351ad576cb55089046bf766916c6a
usb-storage: report underflow with no sense data

This patch (as1118) addresses a problem with certain USB mass-storage
devices.  These devices sometimes return less data than asked for and
then provide no sense data to explain the problem.  Currently
usb-storage leaves it up to the SCSI layer to decide how this should
be handled, and the SCSI layer interprets the lack of sense data to
mean that nothing went wrong.  But if we got less data than required
then something definitely _did_ go wrong, and we should say so.

The patch tells the SCSI layer to retry the command when this sort of
thing happens.  Retrying may not solve the underlying problem, but
it's better than believing that data was transferred when it wasn't.

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