tb_cfg_read_raw(9)
π tb_cfg_read_raw(9) β from the Kernel API Manual, bestie
Okay so welcome to the page for tb_cfg_read_raw(9) and honestly? It's giving "one job, does it well." It's a Thunderbolt kernel API function, it lives in the Kernel API Manual, and it's about to read config space into a buffer. Let's go π«Ά
β¨ NAME β¨
tb_cfg_read_raw β read from config space into buffer π
πΈ SYNOPSIS πΈ
struct tb_cfg_result tb_cfg_read_raw (struct tb_ctl *ctl , void *buffer
, u64 route , u32 port , enum tb_cfg_space space , u32 offset , u32
length , int timeout_msec );
Like, yes, it's a long signature. It ate. π₯
π ARGUMENTS π
ctlβ Pointer to the control channel. Your main character connection ngl πbufferβ Buffer where the data is read. This is where the good stuff lands β¨routeβ Route string of the router. Iykyk, it's how you find your way there π¦portβ Port number when reading fromTB_CFG_PORT,0otherwise. Literally: use0in every other case, no cap πspaceβ Config space selector. Pick your vibe check πoffsetβ Dword word offset of the register to start reading. Dword word offset, bestie, it's specific πΈlengthβ Number of dwords to read. Count 'em πtimeout_msecβ Timeout in ms how long to wait for the response. Don't wait forever, it's not worth it π
π¦ DESCRIPTION π¦
Reads from router config space without translating the possible error.
That's the whole vibe: it fetches the raw goods and does not do the error-translation glow-up for you. You get it exactly as it comes, bestie β¨
β RETURN β
Returns a struct tb_cfg_result with a non-zero err field if an error has occurred. So like, check that field. Please. For me π
π SEE ALSO π
All the linked-up lore, in the order the page gives it:
- 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_write_raw(9)tb_cfg_get_upstream_port(9)
And that's the page, periodt π Signing off from ./drivers/thunderbolt, dated October 2026 β ty for coming to my TED talk, drink water, and always check your err field πππ
π¦ 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