]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb-storage: Workaround devices with bogus sense size
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 13 Oct 2009 04:53:47 +0000 (15:53 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 Oct 2009 22:12:00 +0000 (15:12 -0700)
commit670add0a279e39e13a66876389c64d4f7dcf0379
treed68533798b3a6ac0f4387a2042077a719818e55d
parentb5a56fc94bcc0910870391da8778ba1c6d41bd3d
usb-storage: Workaround devices with bogus sense size

commit b8430e1b82b7e514d76a88eb70a7d8831d50df1e upstream.

usb-storage: Workaround devices with bogus sense size

Some devices, such as Huawei E169, advertise more than the standard
amount of sense data, causing us to set US_FL_SANE_SENSE, assuming
they support it. However, they subsequently fail the request sense
with that size.

This works around it generically. When a sense request fails due to
a device returning an error, US_FL_SANE_SENSE was set, and that sense
request used a larger sense size, we retry with a smaller size before
giving up.

Based on an original patch by Ben Efros <ben@pc-doctor.com>

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/transport.c