[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM0PR09MB267515B5C995C5FEA1A8833295CAA@AM0PR09MB2675.eurprd09.prod.outlook.com>
Date: Thu, 5 Oct 2023 10:51:44 +0200
From: Paul Geurts <paul_geurts@...e.nl>
To: u.kleine-koenig@...gutronix.de
Cc: festevam@...il.com, gregkh@...uxfoundation.org,
jirislaby@...nel.org, kernel@...gutronix.de,
linux-arm-kernel@...ts.infradead.org, linux-imx@....com,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
paul_geurts@...e.nl, s.hauer@...gutronix.de, shawnguo@...nel.org
Subject: Re: [PATCH] serial: imx: fix tx statemachine deadlock
Hi Uwe,
> Sounds reasonable.
>
> A Fixes: line would be nice.
Yes, I will add the Fixes line for sure.
> So the new thing is: If the hardware is still busy sending stuff but
> /dev/ttymxcX isn't open any more (i.e. .shutdown was called), the
> transmitter gets disabled. I wonder if in this case disabling the
> transmitter should be delayed until the shifter is empty? Or maybe this
> should be handled in .shutdown, that is only disable TCEN once the
> shifter is empty?
Good point. I am wondering whether this would be necessary. Writing to the
TTY is blocking until the shifter is done, so closing it before the shifter
is done is an error condition anyway, right? So if it already is an error
condition, the data is already unreliable. Making sure the shifter is
empty on shutdown would mean waiting for it, or doing it asynchronously,
which IMO is both not a great idea. Maybe we can just dump the buffer on
shutdown but I don't know whether the IP can do that.
Let me know what you think.
br,
Paul
Powered by blists - more mailing lists