diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-07-19 13:50:00 (GMT) |
---|---|---|
committer | Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com> | 2017-08-08 08:42:23 (GMT) |
commit | 8b1210ecd4c6bd301b47026d75bb259bf0fa1dcc (patch) | |
tree | df0e0881ed20e15cd92e2ad494d4e0d75f81c825 /drivers/usb/emul/sandbox_hub.c | |
parent | 788e251924aebc1cb481a879490a367029b1cc74 (diff) | |
download | u-boot-8b1210ecd4c6bd301b47026d75bb259bf0fa1dcc.tar.xz |
usb: hub: Change USB hub descriptor to match USB 3.0 hubs
USB 3.0 hubs have a slightly different hub descriptor than USB 2.0
hubs, with a fixed (rather than variable length) size. Change the
host controller drivers that access those last two fields
(DeviceRemovable and PortPowerCtrlMask) to use the union.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/usb/emul/sandbox_hub.c')
-rw-r--r-- | drivers/usb/emul/sandbox_hub.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/emul/sandbox_hub.c b/drivers/usb/emul/sandbox_hub.c index 9ffda9c..1432858 100644 --- a/drivers/usb/emul/sandbox_hub.c +++ b/drivers/usb/emul/sandbox_hub.c @@ -96,7 +96,12 @@ static struct usb_hub_descriptor hub_desc = { 1 << 7), .bPwrOn2PwrGood = 2, .bHubContrCurrent = 5, - .DeviceRemovable = {0, 0xff}, /* all ports removeable */ + { + { + /* all ports removeable */ + .DeviceRemovable = {0, 0xff} + } + } #if SANDBOX_NUM_PORTS > 8 #error "This code sets up an incorrect mask" #endif |