[coreboot-gerrit] Change in coreboot[master]: libpayload/xhci: Check noop return code when debugging
Raul Rangel (Code Review)
gerrit at coreboot.org
Fri Jul 13 23:17:05 CEST 2018
Raul Rangel has uploaded this change for review. ( https://review.coreboot.org/27478
Change subject: libpayload/xhci: Check noop return code when debugging
......................................................................
libpayload/xhci: Check noop return code when debugging
We don't want to silently continue when the command ring is broken.
BUG=b:76831439
TEST=Verified on grunt
Change-Id: Ifa0b2fb087f5f0a36ba017a774fc98b33ab035a4
Signed-off-by: Raul E Rangel <rrangel at chromium.org>
---
M payloads/libpayload/drivers/usb/xhci.c
1 file changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/78/27478/1
diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c
index 2e70316..a3bf182 100644
--- a/payloads/libpayload/drivers/usb/xhci.c
+++ b/payloads/libpayload/drivers/usb/xhci.c
@@ -403,9 +403,12 @@
xhci_post_command(xhci);
/* Wait for result in event ring */
- xhci_wait_for_command_done(xhci, cmd, 1);
- xhci_debug("Command ring is %srunning\n",
- (xhci->opreg->crcr_lo & CRCR_CRR) ? "" : "not ");
+ int cc = xhci_wait_for_command_done(xhci, cmd, 1);
+
+ xhci_debug("Command ring is %srunning: cc: %d\n",
+ (xhci->opreg->crcr_lo & CRCR_CRR) ? "" : "not ", cc);
+ if (cc != CC_SUCCESS)
+ fatal("noop command failed.\n");
}
#endif
}
--
To view, visit https://review.coreboot.org/27478
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: Ifa0b2fb087f5f0a36ba017a774fc98b33ab035a4
Gerrit-Change-Number: 27478
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180713/3bdf84be/attachment.html>
More information about the coreboot-gerrit
mailing list