aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/usb.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-08-02 20:25:35 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-08-02 20:25:35 -0700
commit90eb29efd0ca9301d80d03ea13662d32436f060e (patch)
tree4d019d931c99dc4b91e516ea181aabcbb36528b4 /drivers/usb/storage/usb.c
parent1398ab7cb92b21d8d5add3bdc25b2c00462cfd5c (diff)
parentcae74b30dd98c10baa5b47b4698bf67e5eb15687 (diff)
downloadkernel_samsung_espresso10-90eb29efd0ca9301d80d03ea13662d32436f060e.zip
kernel_samsung_espresso10-90eb29efd0ca9301d80d03ea13662d32436f060e.tar.gz
kernel_samsung_espresso10-90eb29efd0ca9301d80d03ea13662d32436f060e.tar.bz2
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (24 commits) Revert "[PATCH] USB: move usb_device_class class devices to be real devices" Revert "[PATCH] USB: convert usb class devices to real devices" USB: UHCI: Don't test the Short Packet Detect bit USB: unusual_devs entry for Nokia 3250 USB: dummy-hcd: disable interrupts during req->complete USB: fix the USB_GADGET_DUMMY_HCD dependencies USB: ati_remote.c: autorepeat fix USB: doc: fixes devio.c location in proc_usb_info.txt. USB: doc: usb-help.txt update. USB: Patch for rtl8150 to fix unplug problems USB: cypress driver comment updates USB: unusual_devs device removal usb-storage: Add US_FL_IGNORE_DEVICE flag; ignore ZyXEL G220F USB: New USB ID for Belkin Serial Adapter USB: Additional PID for the ftdi_sio driver USB: adding support for SHARP WS003SH to ipaq.c USB: Fix Freescale high-speed USB host dependency USB: Removed 3-port device handler from Option driver USB: Drop Sierra Wireless MC8755 from the Option driver USB: Let option driver handle Anydata CDMA modems. Remove anydata driver. ...
Diffstat (limited to 'drivers/usb/storage/usb.c')
-rw-r--r--drivers/usb/storage/usb.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 5ee19be..8d7bdcb 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)
}
/* Get the unusual_devs entries and the string descriptors */
-static void get_device_info(struct us_data *us, const struct usb_device_id *id)
+static int get_device_info(struct us_data *us, const struct usb_device_id *id)
{
struct usb_device *dev = us->pusb_dev;
struct usb_interface_descriptor *idesc =
@@ -500,6 +500,11 @@ static void get_device_info(struct us_data *us, const struct usb_device_id *id)
unusual_dev->useTransport;
us->flags = USB_US_ORIG_FLAGS(id->driver_info);
+ if (us->flags & US_FL_IGNORE_DEVICE) {
+ printk(KERN_INFO USB_STORAGE "device ignored\n");
+ return -ENODEV;
+ }
+
/*
* This flag is only needed when we're in high-speed, so let's
* 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)
msgs[msg],
UTS_RELEASE);
}
+
+ return 0;
}
/* Get the transport settings */
@@ -969,7 +976,9 @@ static int storage_probe(struct usb_interface *intf,
* of the match from the usb_device_id table, so we can find the
* corresponding entry in the private table.
*/
- get_device_info(us, id);
+ result = get_device_info(us, id);
+ if (result)
+ goto BadDevice;
/* Get the transport, protocol, and pipe settings */
result = get_transport(us);