diff options
author | David Brownell <david-b@pacbell.net> | 2006-04-02 10:18:09 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-04-14 11:12:23 -0700 |
commit | 89ccbdc91bc5a433fa256c0136fbe181d7c5d474 (patch) | |
tree | 7c0e78a7d908534db7d423d20cb8e6eea4ec62e4 /drivers/usb/core/hub.c | |
parent | 4d45e21867bee51e3bb42e95bc2929231d7c8192 (diff) |
[PATCH] USB: otg hub support is optional
USB OTG devices are not required to support external hubs. This adds a
configuration option to disable that support.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/hub.c')
-rw-r--r-- | drivers/usb/core/hub.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 3c76f7e17c0..0c87f73f293 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -836,6 +836,13 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) desc = intf->cur_altsetting; hdev = interface_to_usbdev(intf); +#ifdef CONFIG_USB_OTG_BLACKLIST_HUB + if (hdev->parent) { + dev_warn(&intf->dev, "ignoring external hub\n"); + return -ENODEV; + } +#endif + /* Some hubs have a subclass of 1, which AFAICT according to the */ /* specs is not defined, but it works */ if ((desc->desc.bInterfaceSubClass != 0) && |