serial_lsr_in(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… serial_lsr_in(9) β€” like, the manual name is right there bestie

okay so this is a page from the Kernel API Manual, and honestly? it's a little one but it's a whole vibe. sit down, we're talking about serial_lsr_in 🫢


✨ NAME ✨

serial_lsr_in β€” reads the LSR register and preserves those flags across reads, no cap πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

u16 serial_lsr_in (struct uart_8250_port *up );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • up β€” your uart 8250 port, the main character of this whole function πŸ’–

🌈 DESCRIPTION 🌈

okay so picture this: you read the LSR register, and some of the flags? not preserved across reads. rude, honestly 😭 so serial_lsr_in reads that LSR register and handles saving those non-preserved flags across reads for you, like a true bestie 🫢

the flags that are not preserved across reads get stored into up->lsr_saved_flags β€” that's where they live now, periodt πŸ’…

and what does it give you back? the LSR value, or'ed together with the preserved flags (if any). iconic ✨


🌟 SEE ALSO 🌟

  • Kernel file ./drivers/tty/serial/8250/8250.h β€” go read it, iykyk πŸ“–πŸ’œ

and that's the whole page, bestie!! it's giving short-but-sweet fr fr πŸ“ this one lives in ./drivers/tty/serial/8250 and it's dated October 2026 β€” slay, see you next read πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from