Hi,

I'm running kernel 2.6.20 on an AT91RM9200 processor. I have the gadget serial 
driver loaded and I am successfully reading and writing data in and out the USB 
port to a windows terminal. In my user code, when I open the gadget driver 
port, I open it with the default blocking flag so that my user thread will 
sleep while waiting for data to come in. My problem is that when I pull the USB 
cable which causes a disconnect, the read() call never returns in my user code 
thereby locking the thread that it is called in.

I have turned on debugs in the driver's module and am I am monitoring the 
Gadget Driver in another thread by cat /proc/kmsg and can clearly see that the 
Gadget Driver function gs_disconnect(struct usb_gadget *gadget) is being 
called. The driver reacts fine to the connects and disconnects but the user 
mode read() function is the problem. I'm pretty new to driver development and 
I've been attempting to trace the problem through the tty driver and the line 
discipline to attempt to understand how things work. After 3 days, I'm gaining 
some understanding but I really could use some help.

I would think that lots of apps would have to handle the USB cord being yanked 
out. Does anyone have any insight into this? 

Thanks for reading.




Robert P. Sagusti
ENSCO Inc., APA Division
5400 Port Royal Rd.
Springfield, VA  22151
(703) 321-4407
[EMAIL PROTECTED]


......................................................................
The information contained in this email message is intended only for the use of 
the individuals to whom it is
addressed and may contain information that is privileged and sensitive. If the 
reader of this message is not
the intended recipient, you are hereby notified that any dissemination, 
distribution or copying of this
communication is strictly prohibited. If you have received this communication 
in error, please notify the
sender immediately by email at the above referenced address. Thank you.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to