2024-01-27 21:35:40

by Emil Kronborg

[permalink] [raw]
Subject: mxs-auart broken in v6.2 and onwards

Hi,

After updating Linux on an i.MX28 board, serial communication over AUART
broke. When I TX from the board and measure on the TX pin, it seems like
the HW fifo is not emptied before the transmission is stopped. I
bisected the bad commit to be 2d141e683e9a ("tty: serial: use
uart_port_tx() helper"). Since it concerns multiple drivers, simply
reverting it is not feasible. One solution would be to effectively
revert the commit for just mxs-auart.c, but maybe you have a better
idea? Any pointers is appreciated.

Regards,
Emil



2024-01-30 09:38:29

by Jiri Slaby

[permalink] [raw]
Subject: Re: mxs-auart broken in v6.2 and onwards

Hi,

On 27. 01. 24, 22:35, Emil Kronborg wrote:
> After updating Linux on an i.MX28 board, serial communication over AUART
> broke. When I TX from the board and measure on the TX pin, it seems like
> the HW fifo is not emptied before the transmission is stopped. I
> bisected the bad commit to be 2d141e683e9a ("tty: serial: use
> uart_port_tx() helper"). Since it concerns multiple drivers, simply
> reverting it is not feasible. One solution would be to effectively
> revert the commit for just mxs-auart.c, but maybe you have a better
> idea? Any pointers is appreciated.

Hm, the tx stop handling is weird throughout mxs. What about the
attached patch?

thanks,
--
js
suse labs


Attachments:
0001-mxs-fix.patch (2.78 kB)

2024-01-30 18:58:15

by Emil Kronborg

[permalink] [raw]
Subject: Re: Re: mxs-auart broken in v6.2 and onwards

Hi,

On Tue, Jan 30, 2024 at 10:38 +0100, Jiri Slaby wrote:
> Hm, the tx stop handling is weird throughout mxs. What about the
> attached patch?

It seems to fix the issue, but I do not see any way to fix this just for
mxs-auart.c without also changing serial_core.h, and thus affecting a
bunch of other drivers. Would reverting the changes from 2d141e683e9a
("tty: serial: use uart_port_tx() helper") for just mxs-auart.c be okay?
If so, I can do that, test it again, and send a patch.

--
Emil


2024-01-31 12:16:15

by Jiri Slaby

[permalink] [raw]
Subject: Re: mxs-auart broken in v6.2 and onwards

On 30. 01. 24, 19:57, Emil Kronborg wrote:
> Hi,
>
> On Tue, Jan 30, 2024 at 10:38 +0100, Jiri Slaby wrote:
>> Hm, the tx stop handling is weird throughout mxs. What about the
>> attached patch?
>
> It seems to fix the issue, but I do not see any way to fix this just for
> mxs-auart.c without also changing serial_core.h, and thus affecting a
> bunch of other drivers.

Hi, the fix I sent to you does not affect any other driver. (Even when
it touches serial_core.h.)

> Would reverting the changes from 2d141e683e9a
> ("tty: serial: use uart_port_tx() helper") for just mxs-auart.c be okay?

Nope.

> If so, I can do that, test it again, and send a patch.

I've sent proper patches to fix the issue. If you can retest, please add
your Tested-by line in there.

thanks,
--
js
suse labs