Bug 46201

Summary: FTDI driver "error from flowcontrol urb"
Product: Drivers Reporter: Luke-Jr (luke-jr+linuxbugs)
Component: USBAssignee: Greg Kroah-Hartman (greg)
Status: NEW ---    
Severity: high CC: alan, dan.beauyat, deller, ekkehard.junge, grant.traynor, hash_007, lukepasek, martin.stolpe, mrx23dot, n.jeker, szg00000, thomas, wcuddy
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.18.16 Subsystem:
Regression: No Bisected commit-id:

Description Luke-Jr 2012-08-19 08:38:15 UTC
I have a device that uses a FTDI USB-to-serial chip identified by lsusb as:
Bus 001 Device 051: ID 0403:6014 Future Technology Devices International, Ltd 

Only recently, within 24 hours, it will error like this, at which point the FTDI driver becomes unusable, even for other devices:
Aug 18 13:24:07 [kernel] ftdi_sio ttyUSB2: error from flowcontrol urb
Aug 18 13:24:12 [kernel] ftdi_sio ttyUSB2: ftdi_set_termios urb failed to set baudrate
Aug 18 13:24:12 [kernel] ftdi_sio ttyUSB2: urb failed to clear flow control
                - Last output repeated 379 times -
Aug 18 19:58:16 [kernel] ftdi_sio ttyUSB2: error from flowcontrol urb

This has worked fine for months, even for a week after I upgraded to 3.4.4, so there's probably some hardware trouble going on(?), but it probably shouldn't mess up the driver like this.

Also worth mentioning: the RMA replacement unit I have also exhibits this same problem, but neither of them do if I connect the same devices to an old Ubuntu netbook (2.6.32-41-generic).
Comment 1 Greg Kroah-Hartman 2012-08-19 14:25:37 UTC
On Sun, Aug 19, 2012 at 08:38:15AM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=46201
> 
>            Summary: FTDI driver "error from flowcontrol urb"

Please send this to the linux-usb@vger.kernel.org mailing list
Comment 2 Martin Stolpe 2015-03-05 08:33:19 UTC
Hello,

is this bug report still active? I'm suffering from this problem also (3.18.6):
...
[29284.953877] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - nonzero urb status: -84
[29284.955894] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - nonzero urb status: -84
[29284.958107] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - nonzero urb status: -84
[29284.958303] usb 2-2.1: USB disconnect, device number 6
[29284.958738] ftdi_sio ttyUSB0: error from flowcontrol urb
[29284.958881] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[29284.958894] ftdi_sio 2-2.1:1.0: device disconnected
[29440.603087] usbserial: USB Serial deregistering driver FTDI USB Serial Device
[29440.603175] usbcore: deregistering interface driver ftdi_sio
[29440.603721] usbserial: USB Serial deregistering driver generic
[29440.603740] usbcore: deregistering interface driver usbserial_generic
[29440.603748] usbcore: deregistering interface driver usbserial
[29461.995228] usb 2-2.1: new full-speed USB device number 7 using uhci_hcd
[29462.217040] usbcore: registered new interface driver usbserial
[29462.217062] usbcore: registered new interface driver usbserial_generic
[29462.217075] usbserial: USB Serial support registered for generic
[29462.219301] usbcore: registered new interface driver ftdi_sio
[29462.219322] usbserial: USB Serial support registered for FTDI USB Serial Device
[29462.219403] ftdi_sio 2-2.1:1.0: FTDI USB Serial Device converter detected
[29462.219443] usb 2-2.1: Detected FT232RL
[29462.223581] usb 2-2.1: FTDI USB Serial Device converter now attached to ttyUSB0
[29472.671431] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
Comment 3 Luke-Jr 2015-03-05 08:51:44 UTC
I don't think it ever got resolved.
Comment 4 Martin Stolpe 2015-03-05 09:38:13 UTC
Is there anything I can do to help debug this problem. My programming skills are limited but I would be very interested in helping debug this problem. Can you tell me what I could possibly do to triage this bug?
Comment 5 Greg Kroah-Hartman 2015-03-05 21:36:44 UTC
On Thu, Mar 05, 2015 at 09:38:13AM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=46201
> 
> --- Comment #4 from Martin Stolpe <martin.stolpe@gmail.com> ---
> Is there anything I can do to help debug this problem. My programming skills
> are limited but I would be very interested in helping debug this problem. Can
> you tell me what I could possibly do to triage this bug?

Please discuss this on the linux-usb@vger.kernel.org mailing list.
Comment 6 MichaelE 2015-09-20 17:56:54 UTC
Same Problem here. I am using a FTDI Adapter on a Raspberry Pi 2 to connect to a GPS module to receive raw binary data. The connection gets lost after a few seconds (30-60 seconds).

The following output is shown:
[  181.091136] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
[  227.182396] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32

The problem occurs on the following kernels from raspbian: 
Linux 3.18.11-v7+ on armv7l
Linux 4.1.7-v7+ on armv7l
(Kernels between were not tested by me).

A user reports the same problem here (see post by CapnBry » Wed Feb 04, 2015 3:32):
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753

He reports that a downgrad to kernel 3.12 solves his problem. Unfortunately for my hardware only kernels > 3.18 are published.
Comment 7 ekke 2016-02-25 17:53:43 UTC
(In reply to MichaelE from comment #6)
> Same Problem here. I am using a FTDI Adapter on a Raspberry Pi 2 to connect
> to a GPS module to receive raw binary data. The connection gets lost after a
> few seconds (30-60 seconds).
> 
> The following output is shown:
> [  181.091136] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb
> stopped: -32
> [  227.182396] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb
> stopped: -32
> 
> The problem occurs on the following kernels from raspbian: 
> Linux 3.18.11-v7+ on armv7l
> Linux 4.1.7-v7+ on armv7l
> (Kernels between were not tested by me).
> 
> A user reports the same problem here (see post by CapnBry » Wed Feb 04, 2015
> 3:32):
> https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=113753
> 
> He reports that a downgrad to kernel 3.12 solves his problem. Unfortunately
> for my hardware only kernels > 3.18 are published.



I also get occasionally the error as described above:
"ftdi-sio ttyUSB0: usb_serial_generic_read_bulk_callback – urb stopped: -32"
on Raspbian Kernel 3,18.7+
The ftdi-IO hangs and needs a Reset.

Is there someone who knows a workaround ?
Comment 8 Grant Traynor 2016-05-08 07:08:38 UTC
I am also having the same problem:

/home/pi# uname -a

dmesg dump:
[ 5917.479060] usb 1-1.5: USB disconnect, device number 5
[ 6058.915310] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
[ 6058.915423] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
[ 6059.065943] usb 1-1.4: USB disconnect, device number 4
[ 6059.066188] ftdi_sio ttyUSB0: error from flowcontrol urb
[ 6059.066442] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[ 6059.066486] ftdi_sio 1-1.4:1.0: device disconnected


lsusb
Bus 001 Device 006: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 001 Device 007: ID 0f1b:1005 Onset Computer Corp.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc_otg/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=smsc95xx, 480M
        |__ Port 4: Dev 7, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 5: Dev 6, If 0, Class=Vendor Specific Class, Driver=ftdi_sio, 12M


In my case, the driver restarts itself with the device attached to /dev/ttyUSB1 instead of /dev/ttyUSB0 ...

[ 7396.053440] usb 1-1.5: new full-speed USB device number 6 using dwc_otg
[ 7396.180973] usb 1-1.5: New USB device found, idVendor=0403, idProduct=6015
[ 7396.180995] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7396.181008] usb 1-1.5: Product: FT230X Basic UART
[ 7396.181020] usb 1-1.5: Manufacturer: FTDI
[ 7396.181032] usb 1-1.5: SerialNumber: DN00SP4N
[ 7396.190437] ftdi_sio 1-1.5:1.0: FTDI USB Serial Device converter detected
[ 7396.190582] usb 1-1.5: Detected FT-X
[ 7396.191529] usb 1-1.5: FTDI USB Serial Device converter now attached to ttyUSB1
Comment 9 Grant Traynor 2016-05-08 07:09:44 UTC
Sorry .. uname -a from above is:

Linux Dropletb827ebc4822d 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
Comment 10 Daniel Beauyat 2017-01-11 14:27:01 UTC
Same Problem here, on Ubuntu 16.04.1 LTS with kernel 4.4.0
Comment 11 mrx23dot 2019-04-23 21:26:32 UTC
Still no solution after 7years?
Comment 12 Thomas Grimault 2019-08-14 19:05:46 UTC
I have the same issue on Ubuntu 18.04 LTS. The hardware is Dell poweredge r510 server.
Comment 13 lukepasek 2020-06-05 21:22:34 UTC
From my experience, this occurs when the FTDI chip detects multiple rs232 framing errors on the serial line e.g. missing or invalid length stop bits when no hardware flow control is used (only rx and tx lines are connected), or when there is some kind of electrical interference causing voltage spikes on the rx line.

When an rs232 line with such problems is connected to physical/build in serial port on a PC motherboard port (visible in Linux as /dev/TTYS0) or to Rasbery Pi GPIO UART, miniterm reads garbage from such line, but when the same line is connected to the FTDI chip/usb converter the urb error occurs.

Oh, and the "error from flowcontrol urb" error appears only when the port is open, if the port is closed the USB device just disconnects and reconnects.
Comment 14 Nicolas Jeker 2020-07-28 06:55:45 UTC
This is probably a bit off-topic here, but this report shows up pretty high in the search results. I accidentally opened two serial terminals (minicom to be precise) on the same port and encountered the "error from flowcontrol urb" message in my kernel log. Closing one of them obviously solved the issue. I hope this helps someone.
Comment 15 WC 2020-12-10 17:44:18 UTC
I have this same issue appearing on a Slackware64 box running 4.4.240.

[Thu Dec 10 08:40:44 2020] ftdi_sio ttyUSB2: usb_serial_generic_read_bulk_callback - urb stopped: -32
[Thu Dec 10 10:06:52 2020] ftdi_sio ttyUSB2: usb_serial_generic_read_bulk_callback - urb stopped: -32
[Thu Dec 10 10:15:59 2020] ftdi_sio ttyUSB2: usb_serial_generic_read_bulk_callback - urb stopped: -32
[Thu Dec 10 10:24:38 2020] ftdi_sio ttyUSB2: usb_serial_generic_read_bulk_callback - urb stopped: -32
[Thu Dec 10 10:33:31 2020] ftdi_sio ttyUSB2: usb_serial_generic_read_bulk_callback - urb stopped: -32


There is a USB to 16 port RS232 hub connected to this host. Each port
has an LTE modem attached to it. This hub was previously connected to a
older Dell system running Slackware64 13.X. The host was swapped for
newer Lenovo hardware running a more recent version of Slackware64.

It previously ran for years and never exhibited this error. I can't
remember what the previous kernel version was. This error is either the
result of the USB hardware in the host system, or a driver update in the
kernel. I don't think it's related to voltages or framing errors since
the serial side of this configuration was not touched.