Re: [PATCH v2 1/3] serial: core: Store fifo timeout again

From: Andy Shevchenko
Date: Tue Apr 16 2024 - 14:58:46 EST


On Tue, Apr 16, 2024 at 06:29:28PM +0000, Michael Pratt wrote:
> This is a partial revert of Commit f9008285bb69
> ("serial: Drop timeout from uart_port").
>
> In order to prevent having to calculate a timeout
> for the fifo device during a write operation, if enabled,
> calculate it ahead of time and store the value of the timeout
> in a struct member of uart_port.

..

> + if (port->fifosize > 1)
> + port->timeout = uart_fifo_timeout(port);

else
port->timeout = port->frame_time;

?

> }

--
With Best Regards,
Andy Shevchenko