Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25742
b: refs/heads/master
c: 89ccbdc
h: refs/heads/master
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Apr 14, 2006
1 parent 19c46a3 commit 87908f2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4d45e21867bee51e3bb42e95bc2929231d7c8192
refs/heads/master: 89ccbdc91bc5a433fa256c0136fbe181d7c5d474
7 changes: 7 additions & 0 deletions trunk/drivers/usb/core/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,11 @@ config USB_OTG_WHITELIST
normal Linux-USB hosts do (other than the warning), and is
convenient for many stages of product development.

config USB_OTG_BLACKLIST_HUB
bool "Disable external hubs"
depends on USB_OTG
help
If you say Y here, then Linux will refuse to enumerate
external hubs. OTG hosts are allowed to reduce hardware
and software costs by not supporting external hubs.

7 changes: 7 additions & 0 deletions trunk/drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down

0 comments on commit 87908f2

Please sign in to comment.