STRUCT HSI_MSG(9)
β¨ struct hsi_msg(9) β¨
okay so this is a page straight outta the Kernel API Manual β it's the whole glow-up guide to struct hsi_msg, aka the HSI message descriptor. bestie, this is literally the little envelope your data gets stuffed into before it goes zooming down an HSI line. let's get into it π
πΈ NAME πΈ
struct hsi_msg β the HSI message descriptor, no cap β¨
π¦ SYNOPSIS π¦
here's the whole struct, copy-paste energy, do not touch the formatting she's fragile:
struct hsi_msg {
struct list_head link;
struct hsi_client *cl;
struct sg_table sgt;
void *context;
void (*complete)(struct hsi_msg *msg);
void (*destructor)(struct hsi_msg *msg);
int status;
unsigned int actual_len;
unsigned int channel;
unsigned int ttype:1;
unsigned int break_frame:1;
};
π Members π
every field, one by one, because we do not skip β¨
linkβ this one is free real estate π it's totally up to whoever currently owns the descriptor to use it however they want.clβ the HSI device client that's issuing the transfer. the main character who hit send, basically πsgtβ head of the scatterlist array. this is where your buffers live π§Ίcontextβ client context data that's associated to the transfer. your little side-quest payload πcompleteβ the transfer completion callback. she gets called when the transfer is done, periodt π£destructorβ the destructor, there to free resources when flushing π§Ήstatusβ status of the transfer once it's completed. the vibe check of the whole operation πactual_lenβ actual length of the data transferred on completion. not the length you hoped for, the length you got πchannelβ the channel where the message is gonna TX/RX π‘ttypeβ transfer type: TX if set, RX otherwise. binary icon behaviour honestly π₯break_frameβ if true, HSI will send/receive a break frame. and heads up > β οΈ the data buffers are ignored in the request when this is set, so don't be out here expecting your buffers to do anything π«Ά
π SEE ALSO π
go read these next, bestie, they're all in the kernel file ./include/linux/hsi/hsi.h β iykyk:
struct hsi_channel(9)struct hsi_config(9)struct hsi_board_info(9)struct hsi_client(9)struct hsi_client_driver(9)struct hsi_port(9)struct hsi_controller(9)hsi_id(9)hsi_port_id(9)hsi_setup(9)hsi_flush(9)hsi_async_read(9)hsi_async_write(9)hsi_start_tx(9)hsi_stop_tx(9)
and that's the whole page, mwah π this lil number lives in ./include/linux/hsi and it's dated October 2026 β signed, sealed, delivered, struct hsi_msg(9) out π«Άβ¨
π¦ 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