[PATCH v1] usb: xhci: Check return value of wait for TRB_TRANSFER event
Minda Chen
minda.chen at starfivetech.com
Wed Oct 18 05:46:54 CEST 2023
On 2023/10/18 10:35, Marek Vasut wrote:
> On 10/18/23 03:22, Minda Chen wrote:
>>
>>
>> On 2023/10/17 19:20, Marek Vasut wrote:
>>> On 10/17/23 08:20, Minda Chen wrote:
>>>> xhci_wait_for_event() waiting TRB_TRANSFER event may return
>>>> NULL. Checking the return value to avoid crash.
>>>>
>>>> Signed-off-by: Minda Chen <minda.chen at starfivetech.com>
>>>
>>> How did you trigger this error ? Is there a reproducer ? Details please ...
>>
>> While Scanning a lenovo usb2.0 udisk, not 100 % reproduce
>
> Can you include Linux
>
> lsusb -vvv
>
> output for this device and include that information in the commit message ? (or the U-Boot info below, that works too, just please add it into the commit message, it is important for future reference).
>
OK, I will add lsusb -vvv Linux udisk message and crash dump info to commit message
>> This is log.
>>
>> StarFive # usb reset
>> resetting USB...
>> Bus xhci_pci: Register 5000420 NbrPorts 5
>> Starting the controller
>> USB XHCI 1.00
>> scanning bus xhci_pci for devices... WARN halted endpoint, queueing URB anyway.
>> Unexpected XHCI event TRB, skipping... (f77141f0 00000000 13000000 02008401)
>> Unhandled exception: Load access fault
>> EPC: 00000000f7f563c6 RA: 00000000f7f563c6 TVAL: 000000000000000c
>> EPC: 000000004024a3c6 RA: 000000004024a3c6 reloc adjusted
>
> Where does the crash point to in code, can you disassemble the PC pointer ? (or maybe you can use scripts/decodecode I think)
>
OK, I will add EPC pointer disassemble to commit message
>> SP: 00000000f76f9a60 GP: 00000000f76fbdd0 TP: 0000000000000001
>> T0: 00000000f76fa168 T1: 00000000000000ff T2: 0000000000000016
>> S0: 00000000f7712fc0 S1: 00000000f76fb100 A0: 0000000000000000
>> A1: 0000000000000000 A2: 00000000f77145d0 A3: 00000000f7714590
>> A4: 0000000000000000 A5: 0000000000000020 A6: 000000000000000f
>> A7: 0000000000000100 S2: 0000000000000000 S3: 0000000000000000
>> S4: 00000000f7717050 S5: 00000000f7717050 S6: 0000000080000383
>> S7: 00000000f76f9dc0 S8: 00000000000000ff S9: 0000000000000001
>> S10: 00000000f76f9ba0 S11: 0000000000010c04 T3: 0000000000000010
>> T4: 0000000000000006 T5: 0000000000000080 T6: 00000000f76fa231
>
> [...]
>
>> 3: Mass Storage, USB Revision 2.0
>> - Generic Mass Storage 31097778XB15113405
>> - Class: (from Interface) Mass Storage
>> - PacketSize: 64 Configurations: 1
>> - Vendor: 0x17ef Product 0x38ac Version 1.0
>> Configuration: 1
>> - Interfaces: 1 Bus Powered 200mA
>> Interface: 0
>> - Alternate Setting 0, Endpoints: 2
>> - Class Mass Storage, Transp. SCSI, Bulk only
>> - Endpoint 1 Out Bulk MaxPacket 512
>> - Endpoint 2 In Bulk MaxPacket 512
>>
>> StarFive # usb storage
>> Device 0: Vendor: Rev: 8.07 Prod: Lenovo SX1 64G
>> Type: Removable Hard Disk
>> Capacity: 60000.0 MB = 58.5 GB (122880000 x 512)
>
> [...]
More information about the U-Boot
mailing list