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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Tested-by: Stefan Roese <[email protected]> --- Changes in v3: None Changes in v2: None common/usb_hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/usb_hub.c b/common/usb_hub.c index 48831b5..83c6767 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); } -- 2.9.2 _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

