tb_cfg_write_raw(9)
π tb_cfg_write_raw π
okay so first things first, bestie β this page lives in the Kernel API Manual section (section 9, the kernel API girlies), and the function we're stanning today is tb_cfg_write_raw. say it with me: write. from. buffer. into. config. space. periodt. π
β¨ NAME β¨
tb_cfg_write_raw β write from buffer into config space π¦
πΈ SYNOPSIS πΈ
struct tb_cfg_result tb_cfg_write_raw (struct tb_ctl *ctl , const void
*buffer , u64 route , u32 port , enum tb_cfg_space space , u32 offset ,
u32 length , int timeout_msec );
likeβ¦ look at her. iconic signature. no notes. π
π ARGUMENTS π
ctlβ Pointer to the control channel. this is your girl, the control channel, she's holding it all together fr fr.bufferβ Data to write. literally the data. that's it. that's the vibe. πrouteβ Route string of the router. you gotta know where you're going, no cap.portβ Port number when writing toTB_CFG_PORT,0otherwise. so like, sometimes a port, sometimes a zero, iykyk πspaceβ Config space selector. which config space are we in, babe? pick one. main character energy.offsetβ Dword word offset of the register to start writing. dword. word offset. start writing. got it. βlengthβ Number of dwords to write. not bytes, not vibes β dwords. πtimeout_msecβ Timeout in ms how long to wait for the response. give her a lil time to respond bestie, don't be impatient π
π₯ DESCRIPTION π₯
Writes to router config space without translating the possible error. π«Ά
that's the whole thing. she writes, she does not translate. no editorializing the error for you, no little summary, no "here's what happened" β you get the raw result and you deal with it. the way that this function simply refuses to do your homework for you. π
π RETURN π
struct tb_cfg_result with non-zero err field if error has occurred.
so like, check the err field bestie. if it's non-zero, something went sideways. it's giving "read the room" but the room is a struct. β¨
π¦ SEE ALSO π¦
- Kernel file
./drivers/thunderbolt/ctl.c struct tb_ctl(9)tb_cfg_request_alloc(9)tb_cfg_request_get(9)tb_cfg_request_put(9)tb_cfg_request(9)tb_cfg_request_cancel(9)tb_cfg_request_sync(9)tb_ctl_alloc(9)tb_ctl_free(9)tb_ctl_start(9)tb_ctl_stop(9)tb_cfg_ack_notification(9)tb_cfg_ack_plug(9)tb_cfg_reset(9)tb_cfg_read_raw(9)tb_cfg_get_upstream_port(9)
go read all of them. all seventeen. i'll wait. ππ§
ok final vibe check:tb_cfg_write_rawwrites to router config space, hands you back astruct tb_cfg_result, and does not translate errors for you β so check thaterrfield yourself, bestie. no cap.
and that's the whole page, mwah π this lil gem comes from ./drivers/thunderbolt, dated October 2026 β see you in the group chat, love u, bye ππΈπ
π¦ 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