On Fri, 19 Feb 2010, vichy wrote: > Hi: > > 2010/2/19 Greg KH <greg@xxxxxxxxx>: > > On Fri, Feb 19, 2010 at 10:14:57PM +0800, vichy wrote: > >> Dear all: > >> I am quite curious about how the control pass from ehci to uhci/ohci > >> or control pass from uhci/ohci to ehci when I plug fs/hs device at the > >> same port? > > > > It is described in the usb spec, hopefully :) > As far as I know, ehci define the port routing method, and it will > pass the control to the companion controller by port owner bit in port > status and CF flag in register. > does that mean once we set the PORT_OWNER bit in port it will wake up > the uhci interrupt? Yes. > >> As I know, ehci and uhci/ohci will first register their pci drivers at > >> module init call. > >> Then the interrupt of uhci will keep happening. > > > > What do you mean by this? > I add print message at usb_hcd_irq to show up the product_desc. > and it will keep showing "UHCI Host Controller", which we define in uhci driver. > > > > >> My questions are: > >> 1. why the interrupt of uhci keep happening, is that defined in uhci spec? > > > > What do you mean by "keep happening"? > I say this by what I ovserved above. > > > >> 2. both ehci and uhci register the same irq# and same irq function, > >> usb_hcd_irq, how os know to pass the correct hcd when irq happen? > > > > The driver can determine which interrupt really was for it. It's a > > sharred interrupt line, quite common. > I saw the irq flag we set is shared. > But what make me curious is when calling usb_hcd_irq, os will pass > ehci hcd or uhci hcd. > how os know which hcd it shoud pass to usb_hcd_irq? It passes both of them. usb_hcd_irq is called twice, once for ehci-hcd and once for uhci-hcd. Alan Stern -- 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