Many USB storage drives fail in latest U-boot

Chris Ziomkowski chris at asics.ws
Fri Apr 26 15:18:48 CEST 2024


Hi everyone,

The latest version of u-boot seems to have some serious issues with USB 
drives. More than half of my disks do not work. I have traced the issue 
down to the following:

1. During a transfer, the XHCI TRB ring buffer reports back an error of 
type 4. (USB Transaction Error)
2. The COMP_TX_ERR is not matched in 
'drivers/usb/host/xhci-ring.c:record_transfer_result()', so the status 
gets set to the default value in the switch statement:

      udev->status = 0x80;  /* USB_ST_TOO_LAZY_TO_MAKE_A_NEW_MACRO */

3. 'common/usb.c:usb_bulk_msg()' then incorrectly reports this as a timeout
4. On the next loop, an endpoint reset is attempted, which fails with 
another completion code 4, and the USB subsystem becomes stuck in an 
loop trying to reset the drive until it finally gives up.


Question:  how should this situation be handled? Can we recover from it? 
It doesn't appear the current logic was designed to handle it (or at 
least it doesn't handle it).

The XHCI documentation lists a code 4 as a result of:

"Asserted in the case where the host did not receive a valid response 
from the device (Timeout, CRC, Bad PID, unexpected NYET, etc.)."


Can the individual who is maintaining this section of the code (or 
anyone knowledgeable about the implementation) offer some advice on how 
this should be corrected?

Best regards,

Chris








More information about the U-Boot mailing list