Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104587
b: refs/heads/master
c: 38f3ad5
h: refs/heads/master
i:
  104585: a66b4b0
  104583: 7be280d
v: v3
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Jul 21, 2008
1 parent 1a92cf8 commit 2115a70
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6deb270b5c60680ca9117bd545302ea6a58bad42
refs/heads/master: 38f3ad5e7463d4dd490a8081a5f3f9f2dec7ecd6
2 changes: 0 additions & 2 deletions trunk/drivers/usb/core/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@
#include "usb.h"
#include "hcd.h"

#define MAX_TOPO_LEVEL 6

/* Define ALLOW_SERIAL_NUMBER if you want to see the serial number of devices */
#define ALLOW_SERIAL_NUMBER

Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/usb/core/hcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <linux/rwsem.h>

#define MAX_TOPO_LEVEL 6

/* This file contains declarations of usbcore internals that are mostly
* used or exposed by Host Controller Drivers.
*/
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/usb/core/hub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,12 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
desc = intf->cur_altsetting;
hdev = interface_to_usbdev(intf);

if (hdev->level == MAX_TOPO_LEVEL) {
dev_err(&intf->dev, "Unsupported bus topology: "
"hub nested too deep\n");
return -E2BIG;
}

#ifdef CONFIG_USB_OTG_BLACKLIST_HUB
if (hdev->parent) {
dev_warn(&intf->dev, "ignoring external hub\n");
Expand Down

0 comments on commit 2115a70

Please sign in to comment.