From d7468bfb27033964e5a23e78b4c9d4b6dc952c00 Mon Sep 17 00:00:00 2001 From: Caveh Jalali Date: Thu, 27 Aug 2020 02:51:11 -0700 Subject: xhci: Do not set the CRCR_CS bit We do not need to set the CS (Command Stop) bit in the Command Ring Control Register. CS is implied by CA (Command Abort). I'm not sure if there is a defined execution order for these command bits, so it's safer to only use the CA bit as it includes the CS function. Ref: xHCI spec 1.2 (May 2019), Section 5.4.5, Table 5-24. BUG=b:160354585,b:157123390 TEST=able to boot into recovery using USB stick on servo v2 on volteer as well as HooToo 8-1 hub Change-Id: Iaeba98b6da8da49f529358ca6d68270440ea0f42 Signed-off-by: Caveh Jalali Reviewed-on: https://review.coreboot.org/c/coreboot/+/44876 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- payloads/libpayload/drivers/usb/xhci_commands.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'payloads/libpayload/drivers/usb/xhci_commands.c') diff --git a/payloads/libpayload/drivers/usb/xhci_commands.c b/payloads/libpayload/drivers/usb/xhci_commands.c index d633cc5762..a4078030c6 100644 --- a/payloads/libpayload/drivers/usb/xhci_commands.c +++ b/payloads/libpayload/drivers/usb/xhci_commands.c @@ -75,7 +75,13 @@ xhci_wait_for_command(xhci_t *const xhci, /* Abort command on timeout */ xhci_debug("Aborting command (@%p), CRCR: 0x%"PRIx32"\n", cmd_trb, xhci->opreg->crcr_lo); - xhci->opreg->crcr_lo |= CRCR_CS | CRCR_CA; + /* + * Ref. xHCI Specification Revision 1.2, May 2019. + * Section 5.4.5, Table 5-24. + * + * Abort the command and stop the ring. + */ + xhci->opreg->crcr_lo |= CRCR_CA; xhci->opreg->crcr_hi = 0; cc = xhci_wait_for_command_aborted(xhci, cmd_trb); -- cgit v1.2.3