diff options
Diffstat (limited to 'sys/dev/usb/uhub.c')
-rw-r--r-- | sys/dev/usb/uhub.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 7bb3c30a0cb..fa4d5d710d1 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhub.c,v 1.75 2014/11/01 14:44:08 mpi Exp $ */ +/* $OpenBSD: uhub.c,v 1.76 2014/11/07 13:56:29 mpi Exp $ */ /* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */ @@ -140,6 +140,21 @@ uhub_attach(struct device *parent, struct device *self, void *aux) return; } + /* + * Super-Speed hubs need to know their depth to be able to + * parse the bits of the route-string that correspond to + * their downstream port number. + * + * This does no apply to root hubs. + */ + if (dev->depth != 0 && dev->speed == USB_SPEED_SUPER) { + if (usbd_set_hub_depth(dev, dev->depth - 1)) { + printf("%s: unable to set HUB depth\n", + sc->sc_dev.dv_xname); + return; + } + } + /* Get hub descriptor. */ if (dev->speed == USB_SPEED_SUPER) { err = usbd_get_hub_ss_descriptor(dev, &hd.ss, 1); |