STRUCT HSI_MSG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:


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