Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/23688
Change subject: libpayload/drivers/usb: Fix broken retry counter ......................................................................
libpayload/drivers/usb: Fix broken retry counter
Exit on first sucessful CONTROL transfer instead of doing GET_DESCRIPTOR_TRIES iterations.
Tested on Lenovo T500 using UHCI controller.
Change-Id: I7c881c08d94636a43223338e46c876b5f3e27d47 Signed-off-by: Patrick Rudolph siro@das-labor.org --- M payloads/libpayload/drivers/usb/usb.c 1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/88/23688/1
diff --git a/payloads/libpayload/drivers/usb/usb.c b/payloads/libpayload/drivers/usb/usb.c index bb42f89..906df84 100644 --- a/payloads/libpayload/drivers/usb/usb.c +++ b/payloads/libpayload/drivers/usb/usb.c @@ -173,10 +173,11 @@
ret = dev->controller->control(dev, IN, sizeof(dr), &dr, len, data); - if (ret) + + if (ret != len) udelay(10); else - return 0; + return len; } return ret; }