On Fri, 27 May 2005, Jayaprakash Shanmugam wrote: > Hello All, > I am using 2.4 based kernel. I have a usb device connected to the > host. The device will send data to me over the interrupt endpoint. > The host has to capture the data do some processing. > > I have a module in which I use the following code in the read function : > > FILL_INT_URB(urb, pstUSBDev, pipe, pcData, maxp, > IRQHandler, 0 , bInterval); > usb_submit_urb(urb); > > Now my issue here is: What should I do inside the IRQHandler( ) ? > > If I do nothing in the handler, Can I be able to read the data from > the user mode ? > > Any suggestions would be greatly helpful.
Your handler is what gets called when the URB has completed. If the handler doesn't do anything then your driver will never know when the URB has finished! So at the very least, the handler has to tell the rest of your driver that the URB has finished. It doesn't really have to do anything else. Reading the data from user mode is a completely separate question. It has nothing to do with the completion handler. The handler is used for telling your driver that the data transfer is complete. Moving that data from the kernel to userspace is then your driver's responsibility. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel