-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPI 1 B+ FT232 disconnecting #1187
Comments
@P33M any suggestions? |
PS : I have always connected the FTDI directly to the RPI's USB ports. Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC |
I have closed this by mistake, reopening. |
Are you running with max_usb_current=1 in config.txt? |
/boot $ cat config.txt | grep -i usb - returns nothing. Also, only uncommented line in /boot/config.txt is : |
I'd try with the max current setting enabled. Spurious disconnects could be a symptom of bumping up against the current limit. |
The Arduino with attached sensors consumes only 27mA + the FT232 which I see it can consume max 90mA. Besides the Arduino + FT232, only an Edimax wifi was connected. |
|
After modifying and rebooting, I have tested and after 3 minutes of data transfer, it disconnected again. Nov 5 13:16:58 localhost kernel: [ 315.181705] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32 |
Can you try instead with |
@P33M dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait Where should I add dwc_otg.fiq_fsm_mask=0x0 ? Does it matter ? Or do I just have to add at the end of the current line ? |
Add the parameter anywhere in the line, with a space before and after. |
Added the configuration, rebooted but minicom it is still disconnecting at random intervals (not bigger then 5 minutes). |
You could try the nuclear option - add |
After adding the option dwc_otg.speed=1 and rebooting, the FTDI transmission does no longer stop working. Since 30 minutes it's working perfectly. |
Increased the baud rate at 115200 (sudo minicom -b 115200 -o -D /dev/ttyUSB0) |
I had no new kernel updates to apply. Rebooted the device, and now I've got another 160 minutes of communications without any issues. |
18 + hours without any disconnects. |
27 hours without any problems. |
Reverted the configuration back to usb 2.0, rebooted, and after less then 1 minute the ftdi data transfer stopped. |
Same issue with a Pi 2. I'm using a ftdi with some -32 errors "broken pipe" : With the dwc_otg.speed=1 the problem has disappeared (I will let it because I don't need usb speed). EDIT :
|
Hello everybody, |
Thanks for the info -- I´ve been having the same issues with a PI + Arduino.... now I know what to do. |
Hi, I've been having issues with SIIG's FTDI usb to serial adapter... I went ahead and tried this patch, but I get adverse effects (i.e. nothing I plug into the usb port gets power). Does this patch apply to the RPi2? I'm currently running kernel 4.1.13-v7+ Raspbian Wheezy. Thanks. |
Somehow the helper was never retrofitted for mdp5. Which meant when plane_state->fence was added, it could get copied into new state in mdp5_plane_duplicate_state(). If an update to disable the plane (for example on rmfb) managed to sneak in after an nonblock update had swapped state, but before it was committed, we'd get a splat: WARNING: CPU: 1 PID: 69 at ../drivers/gpu/drm/drm_atomic_helper.c:1061 drm_atomic_helper_wait_for_fences+0xe0/0xf8 Modules linked in: CPU: 1 PID: 69 Comm: kworker/1:1 Tainted: G W 4.11.0-rc8+ #1187 Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) Workqueue: events drm_mode_rmfb_work_fn task: ffffffc036560d00 task.stack: ffffffc036550000 PC is at drm_atomic_helper_wait_for_fences+0xe0/0xf8 LR is at complete_commit.isra.1+0x44/0x1c0 pc : [<ffffff80084f6040>] lr : [<ffffff800854176c>] pstate: 20000145 sp : ffffffc036553b60 x29: ffffffc036553b60 x28: ffffffc0264e6a00 x27: ffffffc035659000 x26: 0000000000000000 x25: ffffffc0240e8000 x24: 0000000000000038 x23: 0000000000000000 x22: ffffff800858f200 x21: ffffffc0240e8000 x20: ffffffc02f56a800 x19: 0000000000000000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: ffffffc00a192700 x13: 0000000000000004 x12: 0000000000000000 x11: ffffff80089a1690 x10: 00000000000008f0 x9 : ffffffc036553b20 x8 : ffffffc036561650 x7 : ffffffc03fe6cb40 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000002 x3 : ffffffc035659000 x2 : ffffffc0240e8c80 x1 : 0000000000000000 x0 : ffffffc02adbe588 ---[ end trace 13aeec77c3fb55e2 ]--- Call trace: Exception stack(0xffffffc036553990 to 0xffffffc036553ac0) 3980: 0000000000000000 0000008000000000 39a0: ffffffc036553b60 ffffff80084f6040 0000000000004ff0 0000000000000038 39c0: ffffffc0365539d0 ffffff800857e098 ffffffc036553a00 ffffff800857e1b0 39e0: ffffffc036553a10 ffffff800857c554 ffffffc0365e8400 ffffffc0365e8400 3a00: ffffffc036553a20 ffffff8008103358 000000000001aad7 ffffff800851b72c 3a20: ffffffc036553a50 ffffff80080e9228 ffffffc02adbe588 0000000000000000 3a40: ffffffc0240e8c80 ffffffc035659000 0000000000000002 0000000000000001 3a60: 0000000000000000 ffffffc03fe6cb40 ffffffc036561650 ffffffc036553b20 3a80: 00000000000008f0 ffffff80089a1690 0000000000000000 0000000000000004 3aa0: ffffffc00a192700 0000000000000000 0000000000000000 0000000000000000 [<ffffff80084f6040>] drm_atomic_helper_wait_for_fences+0xe0/0xf8 [<ffffff800854176c>] complete_commit.isra.1+0x44/0x1c0 [<ffffff8008541c64>] msm_atomic_commit+0x32c/0x350 [<ffffff8008516230>] drm_atomic_commit+0x50/0x60 [<ffffff8008517548>] drm_atomic_remove_fb+0x158/0x250 [<ffffff80085186d0>] drm_framebuffer_remove+0x50/0x158 [<ffffff8008518818>] drm_mode_rmfb_work_fn+0x40/0x58 [<ffffff80080d5668>] process_one_work+0x1d0/0x378 [<ffffff80080d5a54>] worker_thread+0x244/0x488 [<ffffff80080db7fc>] kthread+0xfc/0x128 [<ffffff8008082ec0>] ret_from_fork+0x10/0x50 Fixes: 9626014 ("drm/fence: add in-fences support") Cc: [email protected] Reviewed-by: Daniel Vetter <[email protected]> Reported-by: Stanimir Varbanov <[email protected]> Signed-off-by: Rob Clark <[email protected]>
commit 786813c upstream. Somehow the helper was never retrofitted for mdp5. Which meant when plane_state->fence was added, it could get copied into new state in mdp5_plane_duplicate_state(). If an update to disable the plane (for example on rmfb) managed to sneak in after an nonblock update had swapped state, but before it was committed, we'd get a splat: WARNING: CPU: 1 PID: 69 at ../drivers/gpu/drm/drm_atomic_helper.c:1061 drm_atomic_helper_wait_for_fences+0xe0/0xf8 Modules linked in: CPU: 1 PID: 69 Comm: kworker/1:1 Tainted: G W 4.11.0-rc8+ #1187 Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) Workqueue: events drm_mode_rmfb_work_fn task: ffffffc036560d00 task.stack: ffffffc036550000 PC is at drm_atomic_helper_wait_for_fences+0xe0/0xf8 LR is at complete_commit.isra.1+0x44/0x1c0 pc : [<ffffff80084f6040>] lr : [<ffffff800854176c>] pstate: 20000145 sp : ffffffc036553b60 x29: ffffffc036553b60 x28: ffffffc0264e6a00 x27: ffffffc035659000 x26: 0000000000000000 x25: ffffffc0240e8000 x24: 0000000000000038 x23: 0000000000000000 x22: ffffff800858f200 x21: ffffffc0240e8000 x20: ffffffc02f56a800 x19: 0000000000000000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: ffffffc00a192700 x13: 0000000000000004 x12: 0000000000000000 x11: ffffff80089a1690 x10: 00000000000008f0 x9 : ffffffc036553b20 x8 : ffffffc036561650 x7 : ffffffc03fe6cb40 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000002 x3 : ffffffc035659000 x2 : ffffffc0240e8c80 x1 : 0000000000000000 x0 : ffffffc02adbe588 ---[ end trace 13aeec77c3fb55e2 ]--- Call trace: Exception stack(0xffffffc036553990 to 0xffffffc036553ac0) 3980: 0000000000000000 0000008000000000 39a0: ffffffc036553b60 ffffff80084f6040 0000000000004ff0 0000000000000038 39c0: ffffffc0365539d0 ffffff800857e098 ffffffc036553a00 ffffff800857e1b0 39e0: ffffffc036553a10 ffffff800857c554 ffffffc0365e8400 ffffffc0365e8400 3a00: ffffffc036553a20 ffffff8008103358 000000000001aad7 ffffff800851b72c 3a20: ffffffc036553a50 ffffff80080e9228 ffffffc02adbe588 0000000000000000 3a40: ffffffc0240e8c80 ffffffc035659000 0000000000000002 0000000000000001 3a60: 0000000000000000 ffffffc03fe6cb40 ffffffc036561650 ffffffc036553b20 3a80: 00000000000008f0 ffffff80089a1690 0000000000000000 0000000000000004 3aa0: ffffffc00a192700 0000000000000000 0000000000000000 0000000000000000 [<ffffff80084f6040>] drm_atomic_helper_wait_for_fences+0xe0/0xf8 [<ffffff800854176c>] complete_commit.isra.1+0x44/0x1c0 [<ffffff8008541c64>] msm_atomic_commit+0x32c/0x350 [<ffffff8008516230>] drm_atomic_commit+0x50/0x60 [<ffffff8008517548>] drm_atomic_remove_fb+0x158/0x250 [<ffffff80085186d0>] drm_framebuffer_remove+0x50/0x158 [<ffffff8008518818>] drm_mode_rmfb_work_fn+0x40/0x58 [<ffffff80080d5668>] process_one_work+0x1d0/0x378 [<ffffff80080d5a54>] worker_thread+0x244/0x488 [<ffffff80080db7fc>] kthread+0xfc/0x128 [<ffffff8008082ec0>] ret_from_fork+0x10/0x50 Fixes: 9626014 ("drm/fence: add in-fences support") Reviewed-by: Daniel Vetter <[email protected]> Reported-by: Stanimir Varbanov <[email protected]> Signed-off-by: Rob Clark <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
I can confirm that the problem with serial port disconnects that express the syslog line: I did not have to drop the USB down to 1.1, it worked correctly as soon as I put in the genuine chips. |
Somehow the helper was never retrofitted for mdp5. Which meant when plane_state->fence was added, it could get copied into new state in mdp5_plane_duplicate_state(). If an update to disable the plane (for example on rmfb) managed to sneak in after an nonblock update had swapped state, but before it was committed, we'd get a splat: WARNING: CPU: 1 PID: 69 at ../drivers/gpu/drm/drm_atomic_helper.c:1061 drm_atomic_helper_wait_for_fences+0xe0/0xf8 Modules linked in: CPU: 1 PID: 69 Comm: kworker/1:1 Tainted: G W 4.11.0-rc8+ raspberrypi#1187 Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) Workqueue: events drm_mode_rmfb_work_fn task: ffffffc036560d00 task.stack: ffffffc036550000 PC is at drm_atomic_helper_wait_for_fences+0xe0/0xf8 LR is at complete_commit.isra.1+0x44/0x1c0 pc : [<ffffff80084f6040>] lr : [<ffffff800854176c>] pstate: 20000145 sp : ffffffc036553b60 x29: ffffffc036553b60 x28: ffffffc0264e6a00 x27: ffffffc035659000 x26: 0000000000000000 x25: ffffffc0240e8000 x24: 0000000000000038 x23: 0000000000000000 x22: ffffff800858f200 x21: ffffffc0240e8000 x20: ffffffc02f56a800 x19: 0000000000000000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: ffffffc00a192700 x13: 0000000000000004 x12: 0000000000000000 x11: ffffff80089a1690 x10: 00000000000008f0 x9 : ffffffc036553b20 x8 : ffffffc036561650 x7 : ffffffc03fe6cb40 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000002 x3 : ffffffc035659000 x2 : ffffffc0240e8c80 x1 : 0000000000000000 x0 : ffffffc02adbe588 ---[ end trace 13aeec77c3fb55e2 ]--- Call trace: Exception stack(0xffffffc036553990 to 0xffffffc036553ac0) 3980: 0000000000000000 0000008000000000 39a0: ffffffc036553b60 ffffff80084f6040 0000000000004ff0 0000000000000038 39c0: ffffffc0365539d0 ffffff800857e098 ffffffc036553a00 ffffff800857e1b0 39e0: ffffffc036553a10 ffffff800857c554 ffffffc0365e8400 ffffffc0365e8400 3a00: ffffffc036553a20 ffffff8008103358 000000000001aad7 ffffff800851b72c 3a20: ffffffc036553a50 ffffff80080e9228 ffffffc02adbe588 0000000000000000 3a40: ffffffc0240e8c80 ffffffc035659000 0000000000000002 0000000000000001 3a60: 0000000000000000 ffffffc03fe6cb40 ffffffc036561650 ffffffc036553b20 3a80: 00000000000008f0 ffffff80089a1690 0000000000000000 0000000000000004 3aa0: ffffffc00a192700 0000000000000000 0000000000000000 0000000000000000 [<ffffff80084f6040>] drm_atomic_helper_wait_for_fences+0xe0/0xf8 [<ffffff800854176c>] complete_commit.isra.1+0x44/0x1c0 [<ffffff8008541c64>] msm_atomic_commit+0x32c/0x350 [<ffffff8008516230>] drm_atomic_commit+0x50/0x60 [<ffffff8008517548>] drm_atomic_remove_fb+0x158/0x250 [<ffffff80085186d0>] drm_framebuffer_remove+0x50/0x158 [<ffffff8008518818>] drm_mode_rmfb_work_fn+0x40/0x58 [<ffffff80080d5668>] process_one_work+0x1d0/0x378 [<ffffff80080d5a54>] worker_thread+0x244/0x488 [<ffffff80080db7fc>] kthread+0xfc/0x128 [<ffffff8008082ec0>] ret_from_fork+0x10/0x50 Fixes: 9626014 ("drm/fence: add in-fences support") Cc: [email protected] Reviewed-by: Daniel Vetter <[email protected]> Reported-by: Stanimir Varbanov <[email protected]> Signed-off-by: Rob Clark <[email protected]> Fixes: Change-Id: I1a4e7395bc7709b457544c5086611122d4602a61 ("BACKPORT: drm/fence: add in-fences support") (cherry picked from commit 786813c) Signed-off-by: Amit Pundir <[email protected]>
The dwc_otg.speed=1 do not workaround for me. This issue is not closed : the same device work perfectly on Linux Debian Jessie (and windows) and not on PI3 + Raspbian Stretch, there is a lot of device with integrated fake FTDI (radio modem...) please workaround. |
https://forums.linuxmint.com/viewtopic.php?f=49&t=226100 |
It's not limited to "fake FTDI" chips. I have a genuine Arduino Uno talking with a Raspberry Pi 3, and the problem happens for me. Setting |
After 3years any other solutions than turning USB to 1.1? Did anyone do a root cause analysis? |
Considerable work has been done on the USB system to get round various HW limitations. If there are still problems, then you are probably hitting a HW limitation. |
I'm using RPI 3 HW, and up to date kernel, but still getting urb stopped: -32 |
USB HW in the SoC is the same on Pi1->Pi3. If the problem has not been fixed in the last three years, then I suspect its hitting a HW limitation. @P33M? |
As the problem goes away with the bus at full-speed, there's likely to be a bugfix that can be done. Without representative hardware that exhibits the issue, it's going to be hard to diagnose. |
We are chasing after this problem as well, with the following board: Maybe this is a clue - we are also using a PiPlate, an in certain situations setting a ADC "high" will trigger this issue on an unrelated USB-attached FTDI board. We think this may be related to increased power draw or possibly a faulty PiPlate board, but I thought I'd mention in here because in our setup it reliably reproduces this error. |
@synatree, could you provide your setup that reliably reproduces these errors? This probably would go a long way to fixing the issue people are able to setup something that consistently causes the bug to appear. |
Hi, I had the same problem as what andreisocol was experiencing but this did not just happen with my FTDI chip it also happened with a CH341-UART converter. By setting dwc_otg.speed=1 the problem was resolved. |
I can also confirm that the same problem happens on the RPI3 B |
Also happens on brand new Raspberry Pi 4b running Fluiddpi + klipper for 3D printing. |
also have this on a Pi4 2gb |
Issue is gone for me since I have reinstalled my PI4b with the 32 rasbian lite instead of 64 bit. |
I am facing this issue. Frustrating issue, crazy that it has persisted for 8 years. Seems to be the same as this: #2406 |
Hello,
Using minicom (sudo minicom -b 19200 -o -D /dev/ttyUSB0) to read values transmitted through USB by an Arduino connected to a FTDI 232 stops at random intervals.
Tried multiple FT232 devices, all having same behavior.
Also tried short USB cables. Same behaviour.
uname -a
Linux raspberrypi 4.1.12+ #824 PREEMPT Wed Oct 28 16:39:49 GMT 2015 armv6l GNU/Linux
lsusb
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
cat /var/log/kern.log
......
Nov 4 11:07:24 localhost kernel: [ 7.061210] usbcore: registered new interface driver ftdi_sio
Nov 4 11:07:24 localhost kernel: [ 7.169491] usbserial: USB Serial support registered for FTDI USB Serial Device
Nov 4 11:07:24 localhost kernel: [ 7.244932] ftdi_sio 1-1.4:1.0: FTDI USB Serial Device converter detected
Nov 4 11:07:24 localhost kernel: [ 7.321776] usb 1-1.4: Detected FT232RL
Nov 4 11:07:24 localhost kernel: [ 7.387123] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0
.......
Nov 4 14:22:49 localhost kernel: [11736.542211] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
Nov 4 14:23:13 localhost kernel: [11761.350820] ftdi_sio ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
The text was updated successfully, but these errors were encountered: