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@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 }