[coreboot-gerrit] Change in coreboot[master]: libpayload/drivers/usb: Fix broken retry counter
Patrick Rudolph (Code Review)
gerrit at coreboot.org
Sat Feb 10 12:11:03 CET 2018
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 at 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;
}
--
To view, visit https://review.coreboot.org/23688
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c881c08d94636a43223338e46c876b5f3e27d47
Gerrit-Change-Number: 23688
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180210/ff668d7d/attachment-0001.html>
More information about the coreboot-gerrit
mailing list