Hi Gerd

> Subject: Re: [PATCH v6 1/8] hw/usb/bus: Let a bus opt out of automatic hub
> insertion
> 
> On Mon, Oct 19, 2026 at 09:24:50AM +0000, Jamin Lin wrote:
> > usb_claim_port() inserts a usb-hub when a device is plugged in and
> > only one port is still free, so that more devices can follow. That is
> > what a host controller with root ports wants.
> 
> Ah, well, not really.  It's there mostly for historical reasons.
> 
> The emulated usb hub supports only usb 1.1, so for newer host controllers 
> (ehci
> / xhci) it does not make much sense and the better approach is to add more
> host controllers if needed.  Which should rarely actually be the case though
> given that xhci supports up to 15 root ports.
> 
> So if this gets into the way I'm wondering whenever the better approach here
> is to remove this altogether.  You can still add an USB hub manually of 
> needed,
> IIRC there is (or was?) some board with a single-port OHCI where you actually
> need a hub if you want plug in both usb keyboard and usb mouse.  It just
> would not be automatic any more.
> 
> Alternative idea would be to add the config option, but only enable the
> automatic hub logic for actual usb 1.1 controllers (ohci / uhci), where it 
> does
> not matter much for devices whenever they are plugged into an root port or
> hub port.
> 
> take care,
>   Gerd

Sorry for the late reply.

Yes, it gets in the way. usbredir carries one device per connection, so
our bus has one port. Plugging that device in adds a hub, and the device
ends up behind it. That is why I added the flag.

If you would rather do one of these, tell me and I will send it:

 1. Remove the automatic hub.
 2. Keep it, but only for the USB 1.1 controllers, ohci and uhci.

Thanks,
Jamin

Reply via email to