]> git.baikalelectronics.ru Git - kernel.git/commit
USB: usb-storage: add BAD_SENSE flag
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 7 Dec 2009 21:39:16 +0000 (16:39 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 19:55:26 +0000 (11:55 -0800)
commit64b892a4535149d1b2844e6f8b15ba3ab60e9760
tree86f7327949289b70960f57b07b99054e240a91e4
parentf4e206d93160f8b393439a2fe89bb7e28a82d882
USB: usb-storage: add BAD_SENSE flag

This patch (as1311) fixes a problem in usb-storage: Some devices are
pretty broken when it comes to reporting sense data.  The information
they send back indicates that they have more than 18 bytes of sense
data available, but when the system asks for more than 18 they fail or
hang.  The symptom is that probing fails with multiple resets.

The patch adds a new BAD_SENSE flag to indicate that usb-storage
should never ask for more than 18 bytes of sense data.  The flag can
be set in an unusual_devs entry or via the "quirks=" module parameter,
and it is set automatically whenever a REQUEST SENSE command for more
than 18 bytes fails or times out.

An unusual_devs entry is added for the Agfa photo frame, which uses a
Prolific chip having this bug.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Daniel Kukula <daniel.kuku@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/kernel-parameters.txt
drivers/usb/storage/transport.c
drivers/usb/storage/unusual_devs.h
drivers/usb/storage/usb.c
include/linux/usb_usual.h