On Thu, Apr 16, 2009 at 07:11:46PM +0530, Arjun Joshi wrote: > Hi All, > > While looking at the kernel source for USB I came across the following > trace: > > >From usb_init() we call usb_hub_init(). In usb_hub_init() a kernel > thread is created > (hub_thread). In the hub_thread function hub_events() is called. > > Can any one kindly explain in detail what does hub_events() do? It handles all hub events :) Any USB hub event (like a device is found or removed) is handled by this thread. > Also It would be great if someone can tell the trace of function calls > when a device is attached on standard PC? For what type of bus? PCI or USB? For PCI, look at the example in the Linux Device Drivers book, third edition, it's described there. For USB, it's much more complex, but you should get the idea. If you have specific questions, please let us know. good luck, greg k-h -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ