On Fri, 15 May 2009, Madhukar G wrote: > I have one last question. When i inserted the file_storage (simulator) > module, the URB which are initiated from storage driver goes thru > usbcore and then to dummy_hcd and finally to file_storage gadget > driver. > > At this point i see that defualt host controller module (ehci or uhci) > is already present. ehci-hcd and uhci-hcd are not "default" host controller modules. They are present either because they are built into your kernel or else because you have an EHCI and a UHCI host controller in your computer. > My question is how does usbcore know that URB's > needs to be redirected to dummy_hcd instead of defualt hcd controller > module (ehci or uhci). usbcore sends the URB to the host controller for the URB's device's bus. You can see this very explicitly in drivers/usb/core/hcd.c, at the start hcd_submit_urb(): struct usb_hcd *hcd = bus_to_hcd(urb->dev->bus); 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