STRUCT MIPS_EJTAG_FDC_TTY_PORT(9)
π¦ struct mips_ejtag_fdc_tty_port(9) π¦
ok so this is a page from the Kernel API Manual, and bestie, it's literally the whole lore on one little wrapper struct π
β¨ NAME β¨
struct mips_ejtag_fdc_tty_port β the wrapper struct for an FDC tty_port, no cap π«Ά
πΈ SYNOPSIS πΈ
struct mips_ejtag_fdc_tty_port {
struct tty_port port;
struct mips_ejtag_fdc_tty *driver;
raw_spinlock_t rx_lock;
void *rx_buf;
spinlock_t xmit_lock;
unsigned int xmit_cnt;
unsigned int xmit_head;
unsigned int xmit_tail;
struct completion xmit_empty;
};
likeβ¦ look at her. iconic. π
π Members π
okay so here's the member-by-member rundown, and every single one is important so don't skip π
portβ the TTY port data. that's the whole vibe of the thing πdriverβ the TTY driver. the main character, honestly β¨rx_lockβ the lock forrx_buf. it protects between the hard interrupt and user context. it's also held during readSWITCHoperations. so like, it's doing a lot of work, respect her πrx_bufβ the read buffer. the little home where the incoming bytes chill πxmit_lockβ the lock forxmit_*, and forport.xmit_buf. it protects between user context and the kernel thread. and listen π it gets used from thechars_in_buffer/write_roomTTY callbacks, which are used during wait operations β so a mutex is unsuitable here. like, a mutex literally cannot sit with her. not the vibe. no cap π₯xmit_cntβ the size of the xmit buffer contents πxmit_headβ the head of the xmit buffer, where data is written βοΈxmit_tailβ the tail of the xmit buffer, where data is read πxmit_emptyβ the completion for the xmit buffer being empty. she's the "we're done here" notification π
π SEE ALSO π
bestie there is a whole friend group, go say hi to all of them π«Ά
- Kernel file
./drivers/tty/mips_ejtag_fdc.c struct mips_ejtag_fdc_tty(9)struct fdc_word(9)struct mips_ejtag_fdc_console(9)mips_ejtag_fdc_put_chan(9)mips_ejtag_fdc_put(9)mips_ejtag_fdc_handle(9)mips_ejtag_fdc_isr(9)mips_ejtag_fdc_tty_timer(9)
π reminder bestie:xmit_lockis a spinlock for a reason β it's reachable fromchars_in_buffer/write_roomcallbacks during wait operations, so a mutex is unsuitable. don't go swapping it, i'm begging π
and that's the whole page!! sign-off time π§
this absolute banger lives in ./drivers/tty, dated October 2026, and it's filed under struct mips_...fdc_tty_port(9) in the Kernel API Manual. slay, go read the kernel source, ily πβ¨
π¦ 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