On Wed, 26 Jan 2011, Micah Elizabeth Scott wrote: > > In my opinion, the best way to deal with this is simply to reject > > high-speed hubs that don't have any TTs. Presumably there aren't many > > devices like that floating around. Do you agree? > > > > The following patch implements this policy. It should eliminate your > > bug. > > Perhaps this is selfish, but I'd strongly advocate against this patch > since it will break all of our virtual hubs here at VMware :) Come to think of it, the patch will also break the root hubs we create for EHCI controllers. > We emulate USB hubs in order to dynamically extend the number of ports > available to a virtual machine. We never create hubs with TTs, partly > so we can avoid the performance overhead and implementation complexity > of them, and partly because we really have no need for them. (We can > always have both a high-speed and a full/low-speed hub available, and > plug devices into the correct one.) The alternative is to reject low- and full-speed devices when they are plugged into a high-speed hub with no TTs. How does this look? Alan Stern Index: usb-2.6/drivers/usb/core/hub.c =================================================================== --- usb-2.6.orig/drivers/usb/core/hub.c +++ usb-2.6/drivers/usb/core/hub.c @@ -2732,6 +2732,11 @@ hub_port_init (struct usb_hub *hub, stru udev->ttport = hdev->ttport; } else if (udev->speed != USB_SPEED_HIGH && hdev->speed == USB_SPEED_HIGH) { + if (!hub->tt.hub) { + dev_err(&udev->dev, "parent hub has no TT\n"); + retval = -EINVAL; + goto fail; + } udev->tt = &hub->tt; udev->ttport = port1; } -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html