USB: usb-storage: add filter to "option_ms" to leave unrecognized devices alone
authorJosua Dietze <digidietze@draisberghof.de>
Sun, 24 May 2009 21:21:42 +0000 (23:21 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 16 Jun 2009 04:44:46 +0000 (21:44 -0700)
commit32ebbe7b6ad44ae9c276419710b56de6ba705303
tree6ae020237f6c409b41c90962ff57179ebd4fbcf7
parent68335e816a92411649955a9903b1f30c388ea322
USB: usb-storage: add filter to "option_ms" to leave unrecognized devices alone

Some unusual usb devices from the maker "Option" are switched from
storage to serial/modem mode by sending a SCSI REZERO command. In one
case a fairly common vendor/device ID is affected which led to problems
for users of other modems or phones which are not supposed to be
switched.

The patch adds a filter by reading the vendor name with the SCSI INQUIRY
command, and skips the switching code for all unrecognized entries.

Further changes are cleanups and corrections pointed out by Alan Stern.

Tested with two devices with the IDs 05c6:1000, one from "Option" and
switchable, and one from Samsung (cell phone).

Signed-off-by: Josua Dietze <digidietze@draisberghof.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/option_ms.c