PC: Dell SC420 Hardware: 4-port VScom USB serial port adaptor Web page: http://www.vscom.de/produkte/vscom_usb-4com.html Modules: ftdi_sio, usbserial I have observed two problems with this driver: 1) Driver disconnects ports and reassigns /dev/tts/USBx to a new device number 2) Flushing the IO buffers doesn't work. Problem 1 I have a 4-port Vscom adaptor. When using it I get errors where some of the /dev/tts/USBx devices seem to get disconnected, then be connected again on a different device. eg. /dev/tts/USB2 and USB3 will be involved in some transfer, then will move to /dev/tts/USB4 and USB5. The other ports stay on the same devices, and I'm not touching the hardware cables or psu. The logs are full of errors like: drivers/usb/serial/ftdi_sio.c: ftdi_tiocmget Could not get modem status of device - err: -19 (or -71). Sample of log follows: Nov 10 13:28:30 funky drivers/usb/serial/ftdi_sio.c: ftdi_tiocmget Could not get modem status of device - err: -71 Nov 10 13:28:30 funky drivers/usb/serial/ftdi_sio.c: ftdi_tiocmget Could not get modem status of device - err: -71 Nov 10 13:28:30 funky drivers/usb/serial/ftdi_sio.c: ftdi_tiocmget Could not get modem status of device - err: -71 Nov 10 13:28:30 funky drivers/usb/serial/ftdi_sio.c: ftdi_tiocmget Could not get modem status of device - err: -71 Nov 10 13:28:30 funky hub 2-0:1.0: port 1 disabled by hub (EMI?), re-enabling... Nov 10 13:28:30 funky usb 2-1: USB disconnect, address 2 Nov 10 13:28:30 funky usb 2-1.1: USB disconnect, address 3 Nov 10 13:28:30 funky ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0 Nov 10 13:28:30 funky ftdi_sio 2-1.1:1.0: device disconnected Nov 10 13:28:30 funky usb 2-1.2: USB disconnect, address 4 Nov 10 13:28:30 funky ftdi_sio ttyUSB1: FTDI USB Serial Device converter now disconnected from ttyUSB1 Nov 10 13:28:30 funky ftdi_sio 2-1.2:1.0: device disconnected Nov 10 13:28:30 funky usb 2-1.3: USB disconnect, address 5 Nov 10 13:28:30 funky ftdi_sio 2-1.3:1.0: device disconnected Nov 10 13:28:30 funky usb 2-1.4: USB disconnect, address 7 Nov 10 13:28:30 funky ftdi_sio ttyUSB4: FTDI USB Serial Device converter now disconnected from ttyUSB4 Nov 10 13:28:30 funky ftdi_sio 2-1.4:1.0: device disconnected Nov 10 13:28:30 funky drivers/usb/serial/ftdi_sio.c: ftdi_tiocmget Could not get modem status of device - err: -71 Nov 10 13:28:30 funky usb 2-1: new full speed USB device using uhci_hcd and address 8 Nov 10 13:28:30 funky hub 2-1:1.0: USB hub found Nov 10 13:28:30 funky hub 2-1:1.0: 4 ports detected Nov 10 13:28:30 funky usb 2-1.1: new full speed USB device using uhci_hcd and address 9 Nov 10 13:28:30 funky ftdi_sio 2-1.1:1.0: FTDI USB Serial Device converter detected Nov 10 13:28:30 funky drivers/usb/serial/ftdi_sio.c: Detected FT232BM Nov 10 13:28:30 funky usb 2-1.1: FTDI USB Serial Device converter now attached to ttyUSB0 Nov 10 13:28:30 funky usb 2-1.2: new full speed USB device using uhci_hcd and address 10 Nov 10 13:28:31 funky ftdi_sio 2-1.2:1.0: FTDI USB Serial Device converter detected Nov 10 13:28:31 funky drivers/usb/serial/ftdi_sio.c: Detected FT232BM Nov 10 13:28:31 funky usb 2-1.2: FTDI USB Serial Device converter now attached to ttyUSB1 Nov 10 13:28:31 funky usb 2-1.3: new full speed USB device using uhci_hcd and address 11 Nov 10 13:28:31 funky ftdi_sio 2-1.3:1.0: FTDI USB Serial Device converter detected Nov 10 13:28:31 funky drivers/usb/serial/ftdi_sio.c: Detected FT232BM Nov 10 13:28:31 funky usb 2-1.3: FTDI USB Serial Device converter now attached to ttyUSB4 Nov 10 13:28:31 funky usb 2-1.4: new full speed USB device using uhci_hcd and address 12 Nov 10 13:28:31 funky ftdi_sio 2-1.4:1.0: FTDI USB Serial Device converter detected Nov 10 13:28:31 funky drivers/usb/serial/ftdi_sio.c: Detected FT232BM Nov 10 13:28:31 funky usb 2-1.4: FTDI USB Serial Device converter now attached to ttyUSB5 Nov 10 13:29:11 funky ftdi_sio ttyUSB2: FTDI USB Serial Device converter now disconnected from ttyUSB2 Nov 10 13:29:11 funky ftdi_sio ttyUSB3: FTDI USB Serial Device converter now disconnected from ttyUSB3 Problem 2 tcflush(ser.fd, TCIOFLUSH) doesn't work. I suspect it doesn't flush all the way down the stack (usb buffers, usb hub, usb->rs232 interface chip). I've seen both input and output buffers fail to flush, so when apps start they get flooded with new data that they aren't expecting. Moving to a real serial port fixed the problem.
The disconnections are not done by the kernel, but by a loose cable, or connection, or low power on the bus. If you have a externally powered hub, try using that instead. As for the flush command, this driver does not directly support that, probably because it can not determine when the data is really sent out the serial port at the end of the usb device (a common problems for a lot of usb to serial devices.) So there's nothing we can do for that here, sorry.