Skip to content
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

Fix the uart_ns16550.c buffer underflow issue. #34235

Merged
merged 1 commit into from
Apr 15, 2021

Conversation

lipengit
Copy link
Contributor

@lipengit lipengit commented Apr 13, 2021

driver: serial: uart_ns16550: fixed the buffer underflow issue when clearing the port.

To clear the port by reading the RDR register, the DLAB bit should be set, otherwise, the Synopsys UART IP reports a buffer underflow error.

Signed-off-by: Li, Peng lipengit@gmail.com

Fixes #34234

@zephyrbot zephyrbot added the area: UART Universal Asynchronous Receiver-Transmitter label Apr 13, 2021
Copy link
Collaborator

@jenmwms jenmwms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested on qemu_x86_64, up_squared, and ehl_crb.

@jenmwms
Copy link
Collaborator

jenmwms commented Apr 14, 2021

Please resolve the patch compliance check issues before merge, though. Thanks!

@lipengit lipengit force-pushed the patch-2 branch 4 times, most recently from d2f5a5a to 0fd6e18 Compare April 14, 2021 22:30
Set DLAB bit before reading RDR to avoid buffer underflow.

Signed-off-by: Peng Li <lipengit@gmail.com>
@lipengit
Copy link
Contributor Author

Please resolve the patch compliance check issues before merge, though. Thanks!

The patch compliance check issues have been solved. Thanks.

@ioannisg ioannisg merged commit e28b7e0 into zephyrproject-rtos:master Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: UART Universal Asynchronous Receiver-Transmitter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UART NS16550 Underflow Issue During Clearing Port
5 participants