Message ID | 20241227224523.28131-1-john.ogness@linutronix.de |
---|---|
Headers | show |
Series | convert 8250 to nbcon | expand |
On Fri, Dec 27, 2024 at 11:51:18PM +0106, John Ogness wrote: > Rather than using a hard-coded per-character Tx-timeout of 10ms, > use the frame rate to determine a timeout value. The value is > doubled to ensure that a timeout is only hit during unexpected > circumstances. > > Since the frame rate may not be available during early printing, > the previous 10ms value is kept as a fallback. ... > unsigned int status, tmout = 10000; > > - /* Wait up to 10ms for the character(s) to be sent. */ > + /* > + * Wait for a character to be sent. Fallback to a safe default > + * timeout value if @frame_time is not available. > + */ > + Redundant blank line (esp. after addressing below). > + if (up->port.frame_time) > + tmout = up->port.frame_time * 2 / NSEC_PER_USEC; This will be harder to maintain in case some new code will be squeezed in between, so I propose to make it if-else.
On Fri, Dec 27, 2024 at 11:51:16PM +0106, John Ogness wrote: > This is v4 of a series to convert the 8250 driver to an NBCON > console, providing both threaded and atomic printing > implementations. v3 of this series is here [0]. Additional > background information about NBCON consoles in general is > available in the cover letter of v2 [1]. Just to be sure I understand the side effect of this series, i.e. the https://elixir.bootlin.com/linux/v6.13-rc3/source/drivers/tty/serial/8250/8250_port.c#L44 https://elixir.bootlin.com/linux/v6.13-rc3/source/drivers/tty/serial/8250/8250_pci.c#L9 are not needed anymore (the first one can be replaced to something like dev_dbg() or analogue)?