[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ffb1f40b-bbe8-5431-63cf-a53fc0606971@gmail.com>
Date: Wed, 23 Nov 2022 13:46:17 +0100
From: Richard Genoud <richard.genoud@...il.com>
To: Michael Walle <michael@...le.cc>,
"Jiri Slaby (SUSE)" <jirislaby@...nel.org>
Cc: gregkh@...uxfoundation.org, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...rochip.com>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 2/2] serial: atmel: don't stop the transmitter when doing
PIO
Le 23/11/2022 à 09:50, Michael Walle a écrit :
> Am 2022-11-23 09:27, schrieb Jiri Slaby (SUSE):
>> Writing ATMEL_US_TXDIS to ATMEL_US_CR makes the transmitter NOT to send
>> the just queued character. This means when the character is last and
>> uart calls ops->stop_tx(), the character is not sent at all.
>>
>> The usart datasheet is not much specific on this, it just says the
>> transmitter is stopped. But apparently, the character is dropped. So
>> we should stop the transmitter only for DMA and PDC transfers to not
>> send any more characters. For PIO, this is unexpected and deviates from
>> other drivers. In particular, the below referenced commit broke TX as it
>> added a call to ->stop_tx() after the very last character written to the
>> transmitter.
>>
>> So fix this by limiting the write of ATMEL_US_TXDIS to DMA transfers
>> only.
>>
>> Even there, I don't know if it is correctly implemented. Are all the
>> queued characters sent once ->start_tx() is called? Anyone tested flow
>> control -- be it hard (RTSCTS) or the soft (XOFF/XON) one?
>>
>> Fixes: 2d141e683e9a ("tty: serial: use uart_port_tx() helper")
>> Cc: Richard Genoud <richard.genoud@...il.com>
>> Cc: Nicolas Ferre <nicolas.ferre@...rochip.com>
>> Cc: Alexandre Belloni <alexandre.belloni@...tlin.com>
>> Cc: Claudiu Beznea <claudiu.beznea@...rochip.com>
>> Cc: linux-arm-kernel@...ts.infradead.org
>> Reported-by: Michael Walle <michael@...le.cc>
>> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@...nel.org>
>
> Already merged, but:
> Tested-by: Michael Walle <michael@...le.cc>
Acked-by: Richard Genoud <richard.genoud@...il.com>
>
> Thanks,
> -michael
Thanks !
Powered by blists - more mailing lists