Skip to content

Commit d7468bf

Browse files
Caveh JalaliPatrick Georgi
authored andcommitted
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 <[email protected]> Reviewed-on: https://review.coreboot.org/c/coreboot/+/44876 Tested-by: build bot (Jenkins) <[email protected]> Reviewed-by: Julius Werner <[email protected]>
1 parent 551216a commit d7468bf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

payloads/libpayload/drivers/usb/xhci_commands.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,13 @@ xhci_wait_for_command(xhci_t *const xhci,
7575
/* Abort command on timeout */
7676
xhci_debug("Aborting command (@%p), CRCR: 0x%"PRIx32"\n",
7777
cmd_trb, xhci->opreg->crcr_lo);
78-
xhci->opreg->crcr_lo |= CRCR_CS | CRCR_CA;
78+
/*
79+
* Ref. xHCI Specification Revision 1.2, May 2019.
80+
* Section 5.4.5, Table 5-24.
81+
*
82+
* Abort the command and stop the ring.
83+
*/
84+
xhci->opreg->crcr_lo |= CRCR_CA;
7985
xhci->opreg->crcr_hi = 0;
8086
cc = xhci_wait_for_command_aborted(xhci, cmd_trb);
8187

0 commit comments

Comments
 (0)