public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Minda Chen <minda.chen@starfivetech.com>
To: Marek Vasut <marex@denx.de>, Bin Meng <bmeng.cn@gmail.com>
Cc: <u-boot@lists.denx.de>
Subject: Re: [PATCH v1] usb: xhci: Check return value of wait for TRB_TRANSFER event
Date: Wed, 18 Oct 2023 11:46:54 +0800	[thread overview]
Message-ID: <2a9821ea-68aa-4997-8779-b2e374627a0e@starfivetech.com> (raw)
In-Reply-To: <55da21fd-2a9b-4b48-a0bb-d8f07ad362ea@denx.de>



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@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)
> 
> [...]

  reply	other threads:[~2023-10-18  3:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17  6:20 [PATCH v1] usb: xhci: Check return value of wait for TRB_TRANSFER event Minda Chen
2023-10-17 11:20 ` Marek Vasut
2023-10-18  1:22   ` Minda Chen
2023-10-18  2:35     ` Marek Vasut
2023-10-18  3:46       ` Minda Chen [this message]
2023-10-18 10:11         ` Marek Vasut
2023-10-18 10:16           ` Minda Chen
2023-10-18 10:55             ` Marek Vasut
2023-10-19  2:46               ` Minda Chen
2023-10-19  3:22                 ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2a9821ea-68aa-4997-8779-b2e374627a0e@starfivetech.com \
    --to=minda.chen@starfivetech.com \
    --cc=bmeng.cn@gmail.com \
    --cc=marex@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox