aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/storage/unusual_devs.h10
-rw-r--r--drivers/usb/storage/usb.c13
-rw-r--r--include/linux/usb_usual.h4
3 files changed, 23 insertions, 4 deletions
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index a5ca449f6e6..ca6c56fba28 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1106,7 +1106,15 @@ UNUSUAL_DEV( 0x0a17, 0x006, 0x0000, 0xffff,
1106 "Optio S/S4", 1106 "Optio S/S4",
1107 US_SC_DEVICE, US_PR_DEVICE, NULL, 1107 US_SC_DEVICE, US_PR_DEVICE, NULL,
1108 US_FL_FIX_INQUIRY ), 1108 US_FL_FIX_INQUIRY ),
1109 1109
1110/* This is a virtual windows driver CD, which the zd1211rw driver automatically
1111 * converts into a WLAN device. */
1112UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101,
1113 "ZyXEL",
1114 "G-220F USB-WLAN Install",
1115 US_SC_DEVICE, US_PR_DEVICE, NULL,
1116 US_FL_IGNORE_DEVICE ),
1117
1110#ifdef CONFIG_USB_STORAGE_ISD200 1118#ifdef CONFIG_USB_STORAGE_ISD200
1111UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110, 1119UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110,
1112 "ATI", 1120 "ATI",
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 5ee19be52f6..8d7bdcb5924 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -483,7 +483,7 @@ static struct us_unusual_dev *find_unusual(const struct usb_device_id *id)
483} 483}
484 484
485/* Get the unusual_devs entries and the string descriptors */ 485/* Get the unusual_devs entries and the string descriptors */
486static void get_device_info(struct us_data *us, const struct usb_device_id *id) 486static int get_device_info(struct us_data *us, const struct usb_device_id *id)
487{ 487{
488 struct usb_device *dev = us->pusb_dev; 488 struct usb_device *dev = us->pusb_dev;
489 struct usb_interface_descriptor *idesc = 489 struct usb_interface_descriptor *idesc =
@@ -500,6 +500,11 @@ static void get_device_info(struct us_data *us, const struct usb_device_id *id)
500 unusual_dev->useTransport; 500 unusual_dev->useTransport;
501 us->flags = USB_US_ORIG_FLAGS(id->driver_info); 501 us->flags = USB_US_ORIG_FLAGS(id->driver_info);
502 502
503 if (us->flags & US_FL_IGNORE_DEVICE) {
504 printk(KERN_INFO USB_STORAGE "device ignored\n");
505 return -ENODEV;
506 }
507
503 /* 508 /*
504 * This flag is only needed when we're in high-speed, so let's 509 * This flag is only needed when we're in high-speed, so let's
505 * disable it if we're in full-speed 510 * disable it if we're in full-speed
@@ -541,6 +546,8 @@ static void get_device_info(struct us_data *us, const struct usb_device_id *id)
541 msgs[msg], 546 msgs[msg],
542 UTS_RELEASE); 547 UTS_RELEASE);
543 } 548 }
549
550 return 0;
544} 551}
545 552
546/* Get the transport settings */ 553/* Get the transport settings */
@@ -969,7 +976,9 @@ static int storage_probe(struct usb_interface *intf,
969 * of the match from the usb_device_id table, so we can find the 976 * of the match from the usb_device_id table, so we can find the
970 * corresponding entry in the private table. 977 * corresponding entry in the private table.
971 */ 978 */
972 get_device_info(us, id); 979 result = get_device_info(us, id);
980 if (result)
981 goto BadDevice;
973 982
974 /* Get the transport, protocol, and pipe settings */ 983 /* Get the transport, protocol, and pipe settings */
975 result = get_transport(us); 984 result = get_transport(us);
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h
index f38f43f20fa..e7fc5fed5b9 100644
--- a/include/linux/usb_usual.h
+++ b/include/linux/usb_usual.h
@@ -44,7 +44,9 @@
44 US_FLAG(NO_WP_DETECT, 0x00000200) \ 44 US_FLAG(NO_WP_DETECT, 0x00000200) \
45 /* Don't check for write-protect */ \ 45 /* Don't check for write-protect */ \
46 US_FLAG(MAX_SECTORS_64, 0x00000400) \ 46 US_FLAG(MAX_SECTORS_64, 0x00000400) \
47 /* Sets max_sectors to 64 */ 47 /* Sets max_sectors to 64 */ \
48 US_FLAG(IGNORE_DEVICE, 0x00000800) \
49 /* Don't claim device */
48 50
49#define US_FLAG(name, value) US_FL_##name = value , 51#define US_FLAG(name, value) US_FL_##name = value ,
50enum { US_DO_ALL_FLAGS }; 52enum { US_DO_ALL_FLAGS };