[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b8947ce6-8e34-45fa-aaa9-262ac1232bcf@linux.intel.com>
Date: Tue, 9 Dec 2025 16:53:31 +0200
From: Mathias Nyman <mathias.nyman@...ux.intel.com>
To: Alexander Wilhelm <alexander.wilhelm@...termo.com>
Cc: Mathias Nyman <mathias.nyman@...el.com>,
Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: usb: Error while assigning device slot ID
Hi
Flash driver appears as a Full-Speed device. Is this correct?
Does it work if you boot without the drive and then connect it later?
On 12/5/25 10:22, Alexander Wilhelm wrote:
> Hi Mathias,
>
> Sure, here are the commands input and dmesg output:
>
> user@...t:~# mount -t debugfs none /sys/kernel/debug
> user@...t:~# echo 'module xhci_hcd =p' >/sys/kernel/debug/dynamic_debug/control
> user@...t:~# echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control
> user@...t:~# modprobe xhci_plat_hcd
>
> xhci-hcd xhci-hcd.3.auto: // Turn on HC, cmd = 0x5.
> hub 5-0:1.0: USB hub found
> hub 5-0:1.0: 1 port detected
> xhci-hcd xhci-hcd.3.auto: set port power 5-1 ON, portsc: 0x206e1
Device is detected early during hub init on xhci-hcd.3.auto USB5 bus port 1.
> xhci-hcd xhci-hcd.3.auto: Get port status 5-1 read: 0x206e1, return 0x10101
> usb usb5-port1: status 0101 change 0001> xhci-hcd xhci-hcd.3.auto: Get port status 5-1 read: 0x6e1, return 0x101
> usb usb5-port1: status 0101, change 0000, 12 Mb/s
hub driver reacts to the FS device
> xhci-hcd xhci-hcd.3.auto: // Ding dong!
hub driver queued xhci enable slot command during usb_alloc_dev(), and rings doorbell.
At least xhci driver assumes command ring and xHC are in proper running states.
> xhci-hcd xhci-hcd.3.auto: Command timeout, USBSTS: 0x00000000
Command times out, xHC is running, no pending interrupts
> xhci-hcd xhci-hcd.3.auto: Command timeout
> xhci-hcd xhci-hcd.3.auto: Abort command ring
> xhci-hcd xhci-hcd.3.auto: No stop event for abort, ring start fail?
No event for aborting the ring ether.
Maybe interrupts from this xHC aren't coming through.
Or then something in xHC isn't set up properly when command is queued.
Could you add xhci tracing, and dump the command and event rings after timeout?
Debug and tracing:
mount -t debugfs none /sys/kernel/debug
echo 'module xhci_hcd =p' >/sys/kernel/debug/dynamic_debug/control
echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control
echo 81920 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/xhci-hcd/enable
echo 1 > /sys/kernel/debug/tracing/tracing_on
< Reproduce issue >
Send output of dmesg
Send content of /sys/kernel/debug/tracing/trace
Dumping command and event rings after command timeout:
cat /sys/kernel/debug/usb/xhci/<hci-hcd.3.auto address> /event-ring/trbs
cat /sys/kernel/debug/usb/xhci/<hci-hcd.3.auto address>/command-ring/trbs
Thanks
Mathias
Powered by blists - more mailing lists