xen-usb gives every device a port number. usb_claim_port() then uses that port, and never reaches the automatic hub.
Set auto_hub to false. Every bus creator then sets the flag itself, and usb_bus_new() can stop setting a default. Suggested-by: Gerd Hoffmann <[email protected]> Signed-off-by: Jamin Lin <[email protected]> --- hw/usb/xen-usb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c index caf9efbb77..5d1dbe6b1b 100644 --- a/hw/usb/xen-usb.c +++ b/hw/usb/xen-usb.c @@ -1023,6 +1023,7 @@ static void usbback_alloc(struct XenLegacyDevice *xendev) usb_bus_new(&usbif->bus, sizeof(usbif->bus), &xen_usb_bus_ops, DEVICE(xendev)); + usbif->bus.auto_hub = false; for (i = 0; i < USBBACK_MAXPORTS; i++) { p = &(usbif->ports[i].port); usb_register_port(&usbif->bus, p, usbif, i, &xen_usb_port_ops, -- 2.43.0
