diff options
author | Bin Meng | 2017-07-19 21:49:59 +0800 |
---|---|---|
committer | Marek Vasut | 2017-07-28 23:34:19 +0200 |
commit | 53771a490e05e8be750a6ee50002e30df4776e9b (patch) | |
tree | 512b5ba0d928ead16dbb75eee3fded9ac70acf74 /common | |
parent | f34211960214290d8b38dab2fbdfb18f07582f45 (diff) |
usb: hub: Revise wLength for 'get port status' request
For accuracy, we should use 'sizeof(struct usb_port_status)' as the
wLength for 'get port status' request, although it happens to be
equal to 'sizeof(struct usb_hub_status)'.
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 'common')
-rw-r--r-- | common/usb_hub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/usb_hub.c b/common/usb_hub.c index 48831b56814..83c6767a3b8 100644 --- a/common/usb_hub.c +++ b/common/usb_hub.c @@ -107,7 +107,7 @@ int usb_get_port_status(struct usb_device *dev, int port, void *data) { return usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), USB_REQ_GET_STATUS, USB_DIR_IN | USB_RT_PORT, 0, port, - data, sizeof(struct usb_hub_status), USB_CNTL_TIMEOUT); + data, sizeof(struct usb_port_status), USB_CNTL_TIMEOUT); } |