uart_update_timeout(9)
π« uart_update_timeout(9) π«
okay so bestie, welcome to the Kernel API Manual β yes, that's the manual name, we're being official today π
. This page is all about uart_update_timeout(9), and it's honestly such a small function with such a big job. Let's get into it π
β¨ NAME β¨
uart_update_timeout β update per-port frame timing information πΈ
Like, it refreshes the timing deets for one serial port. Not all of them. That one. π«Ά
π¦ SYNOPSIS π¦
void uart_update_timeout (struct uart_port *port , unsigned int cflag ,
unsigned int baud );
Returns void, so no "did it work" energy β it just does the thing, no cap. β¨
π ARGUMENTS π
portβ theuart_portstructure describing the port π . This is the star of the show, the main character, the port itself.cflagβ a termioscflagvalue π§. Think of it as the little settings receipt for the port.baudβ the speed of the port ποΈ. Zoom zoom.
π₯ DESCRIPTION π₯
So what does it actually do? It sets the port's frame timing information β the very info that the FIFO timeout value gets derived from. The way that one struct field feeds another whole calculation is lowkey iconic πβ¨.
And the cflag value? It should reflect the actual hardware settings, because the number of bits, parity, stop bits and baud rate all get taken into account right here. All of it. It's giving "attention to detail" and honestly obsessed π§π.
Locking: the caller is expected to take port->lock π. Not optional, not a vibe suggestion. Grab the lock, bestie.
π SEE ALSO π
Kernel file ./drivers/tty/serial/serial_core.c β and a whole friend group of related functions, all of them slay in their own way π«Ά:
uart_write_wakeup(9)uart_get_baud_rate(9)uart_get_divisor(9)uart_get_lsr_info(9)uart_console_write(9)uart_parse_earlycon(9)uart_parse_options(9)uart_set_options(9)uart_change_pm(9)uart_register_driver(9)uart_unregister_driver(9)serial_core_add_one_port(9)serial_core_remove_one_port(9)uart_match_port(9)uart_handle_dcd_change(9)uart_handle_cts_change(9)uart_insert_char(9)uart_try_toggle_sysrq(9)uart_get_rs485_mode(9)
okay and for the little sign-off at the bottom: this page lives under ./drivers/tty/serial, and it's dated October 2026 π
. That's the source and the version and the date, all cute and accounted for. bye bestie, go update those timeouts πβπ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms