On Fri, Jun 14, 2013 at 10:41:39AM -0700, Greg KH wrote: > On Wed, Jun 12, 2013 at 07:11:22PM +0300, Mathias Nyman wrote: > > Hi > > > > This is a proposal for simplifying the EHCI/xHCI portswitching > > > > It's a lot simpler than before. There's now only one funtion for enabling xhci ports, > > and we only once walk through pci devices to find Intel EHCI and xHCI controllers > > > > In pci-quirks we set a flag if both intel xHCI and EHCI controllers are found, > > and then call the usb_enable_intel_xhci_ports() function. > > EHCI and xHCI resume functions call the same usb_enable_intel_xhci_ports(), without > > walking the pci devices. > > > > On the downside this uses global variables, one xhci pointer and one > > boolean flag. > > Ok, maybe I've had too much coffee this morning, but I don't see any new > global variables being added in your patch. I see a static one (the > intel structure), but nothing "global". What am I missing? Yes, sorry, I was talking about the static variable. Looking again, yeah, it's not really a global variable. The main thing I'm concerned about is that the patch doesn't handle Intel xHCI host controller PCI hot-plug. We don't really expect any of the Intel PCI hosts to be hot-removed, since they are part of the chipset, but we could dereference a stale pointer if the host was hot-removed. If you think that I shouldn't be that defensive about the code, I'm fine with taking the patch as-is. > > The xhci pointer is set only once in pci-quirk and it's assumed that xHCI device is not removed, > > so there's a possibility this pointer can go stale. > > Also we can only handle one Intel xHCI host in the system. > > All of this should be in the 1/1 patch description as well. Ok, Mathias will update the description. Sarah Sharp -- 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