[PATCH] usb: xhci: Fix bNbrPorts overwritten by another controller

Marek Vasut marek.vasut at mailbox.org
Sat Jun 27 22:10:13 CEST 2026


On 6/27/26 2:37 PM, Beibei Yang wrote:
> In a system with multiple XHCI controllers, the global descriptor.hub
> (bNbrPorts) can be overwritten by a later initialized controller,
> causing the root hub of an earlier controller to report wrong port
> numbers.
> 
> Fix this by dynamically setting bNbrPorts from the current controller's
> hcsparams1 in the USB_DT_HUB request handler, instead of relying on
> a stale global value.

How about having one descriptor per controller ?

This is probably easily doable in xhci_lowlevel_init() with some 
ctrl->hub_desc = kmemdup(descriptor.hub,...); and related tweaks.

What do you think ?


More information about the U-Boot mailing list