[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r0fj1vfs.fsf@osv.gnss.ru>
Date: Fri, 05 Apr 2024 22:05:59 +0300
From: Sergey Organov <sorganov@...il.com>
To: Fabio Estevam <festevam@...il.com>
Cc: Esben Haabendal <esben@...nix.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Jiri Slaby <jirislaby@...nel.org>, Shawn
Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>, Marc Kleine-Budde
<mkl@...gutronix.de>, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org, imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/2] serial: imx: Introduce timeout when waiting on
transmitter empty
Fabio Estevam <festevam@...il.com> writes:
> On Fri, Apr 5, 2024 at 6:25 AM Esben Haabendal <esben@...nix.com> wrote:
>>
>> By waiting at most 1 second for USR2_TXDC to be set, we avoid a potentital
>
> s/potentital/potential
>
> Could you elaborate on this deadlock? Have you seen it in practice?
I've stumped upon this piece of code a long time ago, and it's indeed
broken. However, to actually see a "deadlock", I believe one needs to
enable hardware RTS/CTS handshake on the port, then, say, not connect
RS232 cable, and then printk(), if enabled to this port, will soon
result in the loop to be executed forever, that in turn will hang
single-CPU machine entirely (provided this code is still executed with
interrupts disabled, as it was at the time I investigated severe
printk()-induced ISR delays).
-- Sergey Organov
Powered by blists - more mailing lists