You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Close within 30 daysIssue will be closed within 30 days unless requested to stay openWaiting for external inputWaiting for a comment from the originator of the issue, or a collaborator.
I'm seeing sporadic data loss from a Full-Speed USB-to-UART bridge from Silabs (CP2104x) running at 2.000.000 bps (actual data traffic around 1.200.000bps)
Current settings (tweaking them does not make any difference though): dwc_otg.nak_holdoff=2 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x7 dwc_otg.speed=1
I'm willing to investigate this further and provide any required input, but I can't really bisect the whole tree.
Please give me some guidance as to where to look and how I could reproduce the issue quicker.
Thank you!
Something falling over after 10 minutes would seem to be a reproducible test.
Without the device at the other end of the UART I won't be able to replicate it, however.
Is there any way of using a PC to emulate the device? You say you send 1.2mbit/s of data across a 2Mbaud link - can you create an equivalent mini test program that feeds the correct amount of data into the UART?
Yes, I could do that, though you'd probably need a couple of those CP2104 converters.
Any chance you already have those? Or perhaps I can try to reproduce this issue in some other way?
On a 4.9.11 I was able to reproduce the issue within a few minutes
On a 4.4.50 it's been running without any issue for about a half hour and I'm going to leave it running the whole day.
Please let me know if you can get a hold of such devices.
Thank you!
Since it's definitely a regression and I could automate the whole testing process, it should not be that hard to find the offending commit.
If you could help me understand how the rpi kernel evolves (compared to the vanilla kernel) I could probably find it myself.
Thank you!
I have the same issue, but with a pl2303 (gps dongle) and an Arduino (cdc_acm) but it only occurs if the pl2303 is talking, otherwise everything works fine...
@thomasrudin did you try with a previous kernel version, before 4.9?
Btw, I was also using a pl2303 at the beginning and then moved to CP2104 because it seemed much more reliable. IIRC the pl2303 did not even work reliably on a PC at 921.600 bps.
Do you have the following settings in your /boot/cmdline.txt? dwc_otg.nak_holdoff=2 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x7
I'm also experiencing a similar problem communicating between a RPi3 and an Arduino Uno over a USB serrial connection. This might be related to a bug reported in the firmware project.
Linux rpi3-can1 4.14.52-v7+ #1123 SMP Wed Jun 27 17:35:49 BST 2018 armv7l GNU/Linux
and it works!
I can reproduce the issue relatively quickly, I'm willing to try different binary kernels if anyone could provide some procedure to bisect over them, so we can at least identify a range of broken release.
Thanks for the feedback. You can download intermediate kernel builds using rpi-update (all releases are listed here), but if the current kernel builds work then there we are unlikely to want to cherry-pick the fixing patch - the recommended solution will be to upgrade.
Even with a known-to-work kernel, I'm still experiencing occasional data loss.
I reckon it might have to do with the priority of the kernel threads involved: kworker/u8:2, kworker/u8:3. I would change their scheduling policy to e.g. RT_FIFO, but they keep getting killed and recreated once an hour or so (which is the frequency at which I experience the data loss).
Any thoughts?
Can anyone still seeing a problem make sure they are running the latest kernel. There have been a lot of changes in the last year that might help with this.
This issue will be closed within 30 days unless further interactions are posted. If you wish this issue to remain open, please add a comment. A closed issue may be reopened if requested.
Close within 30 daysIssue will be closed within 30 days unless requested to stay openWaiting for external inputWaiting for a comment from the originator of the issue, or a collaborator.
Activity
iurly commentedon Sep 18, 2017
@P33M Any idea? Please...
P33M commentedon Sep 18, 2017
Something falling over after 10 minutes would seem to be a reproducible test.
Without the device at the other end of the UART I won't be able to replicate it, however.
Is there any way of using a PC to emulate the device? You say you send 1.2mbit/s of data across a 2Mbaud link - can you create an equivalent mini test program that feeds the correct amount of data into the UART?
iurly commentedon Sep 18, 2017
Yes, I could do that, though you'd probably need a couple of those CP2104 converters.
Any chance you already have those? Or perhaps I can try to reproduce this issue in some other way?
P33M commentedon Sep 18, 2017
CP2104 is commodity hardware, I'm sure it won't be too hard to find a converter that has one embedded.
iurly commentedon Sep 19, 2017
I create a test program:
https://gist.github.com/iurly/64a98566384f6f3fbd59d57f475db702
The hardware setup involves two cross-connected CP2104's.
I'm using a PC at the sender's side and a Raspberry Pi at the receiver's side:
Please let me know if you can get a hold of such devices.
Thank you!
iurly commentedon Sep 20, 2017
Since it's definitely a regression and I could automate the whole testing process, it should not be that hard to find the offending commit.
If you could help me understand how the rpi kernel evolves (compared to the vanilla kernel) I could probably find it myself.
Thank you!
thomasrudin commentedon Sep 20, 2017
I have the same issue, but with a pl2303 (gps dongle) and an Arduino (cdc_acm) but it only occurs if the pl2303 is talking, otherwise everything works fine...
thomasrudin commentedon Sep 20, 2017
Additionally: if i set
dwc_otg.speed=1the problem goes away tooiurly commentedon Sep 20, 2017
@thomasrudin did you try with a previous kernel version, before 4.9?
Btw, I was also using a pl2303 at the beginning and then moved to CP2104 because it seemed much more reliable. IIRC the pl2303 did not even work reliably on a PC at 921.600 bps.
thomasrudin commentedon Sep 20, 2017
i have my test setup ready, which branch/commit should i test?
iurly commentedon Sep 20, 2017
See the original post
thomasrudin commentedon Sep 20, 2017
Bad news, i think i have another problem:
iurly commentedon Sep 20, 2017
Do you have the following settings in your /boot/cmdline.txt?
dwc_otg.nak_holdoff=2 dwc_otg.fiq_enable=1 dwc_otg.fiq_fsm_enable=1 dwc_otg.fiq_fsm_mask=0x7thomasrudin commentedon Sep 20, 2017
tested the settings in cmdline.txt but i have the same problem as before, maybe pl2303 related.
thomasrudin commentedon Sep 20, 2017
I solved my problems with the workaround described in #2140:
dwc_otg.fiq_fsm_mask=0x2I have now a stable communication with the cdc and pl2303 drivers (@115.2kbaud) in kernel 4.9.50-v7
Sorry for not contributing to this issue...
3 remaining items
chrisspen commentedon Jan 20, 2018
I'm also experiencing a similar problem communicating between a RPi3 and an Arduino Uno over a USB serrial connection. This might be related to a bug reported in the firmware project.
JamesH65 commentedon Jun 27, 2018
@iurly Did you or anyone else have any luck finding the commit that caused this issue?
It might be worth trying the latest 4.14 kernel, just to see if that works.
iurly commentedon Jun 27, 2018
No, I never managed to find it. So far I'v been circumventing the problem by sticking to a 4.8.
I'll give the 4.14 a shot in the next few days.
iurly commentedon Jun 28, 2018
I tested the following:
and it works!
I can reproduce the issue relatively quickly, I'm willing to try different binary kernels if anyone could provide some procedure to bisect over them, so we can at least identify a range of broken release.
pelwell commentedon Jun 28, 2018
Thanks for the feedback. You can download intermediate kernel builds using rpi-update (all releases are listed here), but if the current kernel builds work then there we are unlikely to want to cherry-pick the fixing patch - the recommended solution will be to upgrade.
iurly commentedon Jul 17, 2018
Even with a known-to-work kernel, I'm still experiencing occasional data loss.
I reckon it might have to do with the priority of the kernel threads involved:
kworker/u8:2,kworker/u8:3. I would change their scheduling policy to e.g. RT_FIFO, but they keep getting killed and recreated once an hour or so (which is the frequency at which I experience the data loss).Any thoughts?
JamesH65 commentedon Jul 30, 2019
Can anyone still seeing a problem make sure they are running the latest kernel. There have been a lot of changes in the last year that might help with this.
This issue will be closed within 30 days unless further interactions are posted. If you wish this issue to remain open, please add a comment. A closed issue may be reopened if requested.
soc: imx8: Fix potential kernel dump in error path
JamesH65 commentedon Sep 18, 2019
Closing due to lack of activity. Please request to be reopened if you feel this issue is still relevant.
Bluetooth: Fix alt settings for incoming SCO with transparent coding …
Bluetooth: Fix alt settings for incoming SCO with transparent coding …
Bluetooth: Fix alt settings for incoming SCO with transparent coding …