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 <rrangel@chromium.org>
Reviewed-on: https://review.coreboot.org/27478
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Raul E Rangel 2018-07-16 09:21:11 -06:00 committed by Martin Roth
parent c534a066d8
commit d29c81d513
1 changed files with 6 additions and 3 deletions

View File

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