[coreboot-gerrit] Change in coreboot[master]: libpayload/drivers/usb/uhci: Fix regression
Patrick Rudolph (Code Review)
gerrit at coreboot.org
Sat Feb 10 12:11:02 CET 2018
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/23686
Change subject: libpayload/drivers/usb/uhci: Fix regression
......................................................................
libpayload/drivers/usb/uhci: Fix regression
Commit e9738dbe "Make USB transfer functions return amount of bytes"
introduced a regression on all UHCI controllers.
Instead of returning the amount of bytes processed, it returned zero on
success.
Fixes infinite usb_poll loop on Lenovo T500 using UHCI controller.
Change-Id: I823521e24f6f9e04c86d36fda751c449cd884ce3
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M payloads/libpayload/drivers/usb/uhci.c
1 file changed, 2 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/23686/1
diff --git a/payloads/libpayload/drivers/usb/uhci.c b/payloads/libpayload/drivers/usb/uhci.c
index cdba3de..c2a0beb 100644
--- a/payloads/libpayload/drivers/usb/uhci.c
+++ b/payloads/libpayload/drivers/usb/uhci.c
@@ -315,6 +315,7 @@
int count = (2 + (dalen + mlen - 1) / mlen);
unsigned short req = ((unsigned short *) devreq)[0];
int i;
+ int result = dalen;
td_t *tds = memalign (16, sizeof (td_t) * count);
memset (tds, 0, sizeof (td_t) * count);
count--; /* to compensate for 0-indexed array */
@@ -367,10 +368,7 @@
td_t *td = wait_for_completed_qh (dev->controller,
UHCI_INST (dev->controller)->
qh_data);
- int result;
- if (td == 0) {
- result = 0;
- } else {
+ if (td) {
usb_debug ("control packet, req %x\n", req);
td_dump (td);
result = -1;
--
To view, visit https://review.coreboot.org/23686
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: I823521e24f6f9e04c86d36fda751c449cd884ce3
Gerrit-Change-Number: 23686
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/b80f5b85/attachment-0001.html>
More information about the coreboot-gerrit
mailing list