Possible bug in sc16is7xx UART driver

From: Wall, Stephen
Date: Mon Jan 23 2023 - 13:52:37 EST


I believe there is a bug in the startup function of the sc16is7xx driver code. I've forked the repo and made changes with a descriptive comment here: https://github.com/torvalds/linux/commit/7a9c8f240efa4d3d49ab5b52ac1cfbe79a701acb

To summarize here, the data sheet for the part says that the MCR register can only be accessed when LCR[0] is cleared, and the function was attempting to access it with LCR set to 0xbf.

Note that I am not currently using linux, and don't have hardware to test this on. I found it as a result of searching for code to compare with a local driver implementation on FreeBSD running on custom hardware.

Please CC me as I get failures when trying to subscribe to the list.