From d29c81d51314806f17e0b49cb57f0d620bde783c Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Mon, 16 Jul 2018 09:21:11 -0600 Subject: libpayload/xhci: Check noop return code when debugging Make it obvious that the command has failed. BUG=b:76831439 TEST=Verified on grunt Change-Id: Ifa0b2fb087f5f0a36ba017a774fc98b33ab035a4 Signed-off-by: Raul E Rangel Reviewed-on: https://review.coreboot.org/27478 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- payloads/libpayload/drivers/usb/xhci.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/payloads/libpayload/drivers/usb/xhci.c b/payloads/libpayload/drivers/usb/xhci.c index 2e70316ac7..8972ffaf1d 100644 --- a/payloads/libpayload/drivers/usb/xhci.c +++ b/payloads/libpayload/drivers/usb/xhci.c @@ -403,9 +403,12 @@ xhci_reinit (hci_t *controller) 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) + xhci_debug("noop command failed.\n"); } #endif } -- cgit v1.2.3