-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Kernel dmesg UART output is garbled using the ttyS0/mini-UART/8250 on 5.17 #4849
Comments
Reverting 5021d70 (a patch that enables use of the FIFO) fixes it. |
Does setting fifosize to 8 also work? |
No - fifosize is already set to 8... |
Ah - this comment must be significant:
The easy (and possibly best) fix is to disable FIFO use if UART_CAP_MINI is set. |
pelwell
added a commit
that referenced
this issue
Jan 26, 2022
The mini-UART on BCM283x is doubly crippled - it has 8-byte FIFOs and the THRE bit indicates that the TX FIFO is not-full rather than empty. The optimisation to enable the use of the FIFO assumes that it is safe to write fifosize bytes whenever THRE is set, but the BCM283x quirk (indicated by the presence of UART_CAP_MINI) makes it necessary to check the FIFO state after each byte. See: #4849 Fixes: 5021d70 ("tty: serial: Use fifo in 8250 console driver") Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Fixed by ba71fc8, which will be pushed upstream. |
Greg KH says he's dropped the offending patch, so at some point this fix will fail to apply. |
intel-lab-lkp
pushed a commit
to intel-lab-lkp/linux
that referenced
this issue
Mar 25, 2022
From Phil's original patch: """ The mini-UART on BCM283x is doubly crippled - it has 8-byte FIFOs and the THRE bit indicates that the TX FIFO is not-full rather than empty. The optimisation to enable the use of the FIFO assumes that it is safe to write fifosize bytes whenever THRE is set, but the BCM283x quirk (indicated by the presence of UART_CAP_MINI) makes it necessary to check the FIFO state after each byte. See: raspberrypi/linux#4849 """ Thanks to Phil Elwell for reporting the issue and providing the original patch. Reported-by: Phil Elwell <phil@raspberrypi.com> Co-author: Phil Elwell <phil@raspberrypi.com> Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Messages from the kernel over the mini-UART (ttyS0) while booting 5.17 are garbled:
It appears that only a subset of the characters are getting through. The fact that the first 8 or 9 characters on a line are getting through intact suggests there is confusion over the FIFO size (which is a uniquely paltry 8).
ttyAMA0 (a PL011) is unaffected.
Observed on a 4B and 3B, but probably affects all Pis.
An investigation is underway.
Steps to reproduce the behaviour
Install a 5.17 kernel, put
enable_uart=1
in config.txt (and notdtoverlay=disable-bt
), and hook up a serial cable.Device (s)
Raspberry Pi 3 Mod. B, Raspberry Pi 4 Mod. B
System
Logs
See above.
Additional context
No response
The text was updated successfully, but these errors were encountered: