On Mon, Jun 06, 2005 at 10:37:28AM +0800, Enzo Chen (?????h) wrote: > > I list the code below. > > Please understand it is under development and so there should be many > > bugs in it. > > However, the point is why usb_unlink_urb() in mxu2s_close() function > > blocked? > > If you enable debugging, what does the syslog say?
I test the driver with a simple application, just open /dev/ttyUSB0 and then close it. The kernel message is listed below: <7>/root/mxu2s/mxu2s.c: mxu2s_open port 3 <7>/root/mxu2s/mxu2s.c: mxu2s_close port 3 <4>usb_unlink_urb start Then the program blocked, and I un-plug the device, plug-in again, the message keep going: <6>usb 1-1: USB disconnect, address 4 <7>/root/mxu2s/mxu2s.c: mxu2s_shutdown <6>moxa_nport_1240 ttyUSB0: MOXA NPort 1240 Device converter now disconnected from ttyUSB0 <6>usbserial 1-1:1.0: device disconnected <7>/root/mxu2s/mxu2s.c: mxu2s_shutdown <6>moxa_nport_1240 ttyUSB1: MOXA NPort 1240 Device converter now disconnected from ttyUSB1 <6>usbserial 1-1:1.1: device disconnected <7>/root/mxu2s/mxu2s.c: mxu2s_shutdown <6>moxa_nport_1240 ttyUSB2: MOXA NPort 1240 Device converter now disconnected from ttyUSB2 <6>usbserial 1-1:1.2: device disconnected <6>usbserial 1-1:1.3: device disconnected <7>/root/mxu2s/mxu2s.c: mxu2s_read_bulk_callback - port 3 <7>/root/mxu2s/mxu2s.c: mxu2s_read_bulk_callback - nonzero read bulk status received: -2 <4>usb_unlink_urb ok <6>/root/mxu2s/mxu2s.c: mxu2s port stats: 0 bytes in, 0 bytes out <7>/root/mxu2s/mxu2s.c: mxu2s_shutdown <6>moxa_nport_1240 ttyUSB3: MOXA NPort 1240 Device converter now disconnected from ttyUSB3 <6>usb 1-1: new full speed USB device using address 5 <6>usbserial 1-1:1.0: MOXA NPort 1240 Device converter detected <6>usb 1-1: MOXA NPort 1240 Device converter now attached to ttyUSB0 (or usb/tts/0 for devfs) <6>usbserial 1-1:1.1: MOXA NPort 1240 Device converter detected <6>usb 1-1: MOXA NPort 1240 Device converter now attached to ttyUSB1 (or usb/tts/1 for devfs) <6>usbserial 1-1:1.2: MOXA NPort 1240 Device converter detected <6>usb 1-1: MOXA NPort 1240 Device converter now attached to ttyUSB2 (or usb/tts/2 for devfs) <6>usbserial 1-1:1.3: MOXA NPort 1240 Device converter detected <6>usb 1-1: MOXA NPort 1240 Device converter now attached to ttyUSB3 (or usb/tts/3 for devfs) > > And, why are you developing for such an old distro? Especially as it is not > supported by anyone anymore. > > And, does it work properly on 2.6.11? > > thanks, > > greg k-h ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel