diff options
author | Julius Werner <jwerner@chromium.org> | 2015-07-09 16:29:10 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-07-18 09:40:48 +0200 |
commit | 752fba784681c2af0611a9d52ee1e8e2db8969a0 (patch) | |
tree | d8edfcd5056c559bd21ea4dfaf78aed9637c5ba4 /payloads/libpayload/drivers/usb/xhci_devconf.c | |
parent | e44a4e8787b5388f63983c4460b495f53425162c (diff) | |
download | coreboot-752fba784681c2af0611a9d52ee1e8e2db8969a0.tar.xz |
libpayload: usb: Add support for SuperSpeed hubs
This patch adds support for the SuperSpeed half of USB 3.0 hubs, which
previously prevented SuperSpeed devices behind those hubs from working.
BRANCH=None
BUG=chrome-os-partner:39877
TEST=Played around with multiple hubs and devices on Oak and Falco, can
no longer find a combination that doesn't work.
Change-Id: I20815be95769e33d399b7ad91c3020687234e059
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 3db96ece20d2304e7f6f6aa333cf114037c48a3e
Original-Change-Id: I2dd6c9c3607a24a7d78c308911e3d254d5f8d91d
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/284577
Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Tested-by: chunfeng yun <chunfeng.yun@mediatek.com>
Reviewed-on: http://review.coreboot.org/10958
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload/drivers/usb/xhci_devconf.c')
-rw-r--r-- | payloads/libpayload/drivers/usb/xhci_devconf.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/payloads/libpayload/drivers/usb/xhci_devconf.c b/payloads/libpayload/drivers/usb/xhci_devconf.c index 32cd2918c1..ead130e7d1 100644 --- a/payloads/libpayload/drivers/usb/xhci_devconf.c +++ b/payloads/libpayload/drivers/usb/xhci_devconf.c @@ -267,10 +267,11 @@ _free_ic_return: static int xhci_finish_hub_config(usbdev_t *const dev, inputctx_t *const ic) { + int type = dev->speed == SUPER_SPEED ? 0x2a : 0x29; /* similar enough */ hub_descriptor_t desc; if (get_descriptor(dev, gen_bmRequestType(device_to_host, class_type, - dev_recp), 0x29, 0, &desc, sizeof(desc)) != sizeof(desc)) { + dev_recp), type, 0, &desc, sizeof(desc)) != sizeof(desc)) { xhci_debug("Failed to fetch hub descriptor\n"); return COMMUNICATION_ERROR; } @@ -386,8 +387,9 @@ xhci_finish_device_config(usbdev_t *const dev) ic->dev.slot->f1 = di->ctx.slot->f1; ic->dev.slot->f2 = di->ctx.slot->f2; ic->dev.slot->f3 = di->ctx.slot->f3; + /* f4 *must* be 0 in the Input Context... yeah, it's weird, I know. */ - if (dev->descriptor->bDeviceClass == 0x09 && dev->speed < SUPER_SPEED) { + if (dev->descriptor->bDeviceClass == 0x09) { ret = xhci_finish_hub_config(dev, ic); if (ret) goto _free_return; |