ssam_controller_receive_buf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ssam_controller_receive_buf(9) β€” a.k.a. the "kernel API manual" glow-up ✨

okay so bestie, welcome to the ssam_controller_receive_buf(9) page from the Kernel API Manual πŸŽ€ β€” this is the little function that hands raw input data over to the controller, and honestly it's giving "quietly carrying the whole transport layer on its back" energy. πŸ’…


✨ NAME ✨

ssam_controller_receive_buf β€” Provide input-data to the controller. like, that's literally the whole gig 🫢


🌸 SYNOPSIS 🌸

ssize_t ssam_controller_receive_buf (struct ssam_controller *ctrl ,
const u8 *buf , size_t n );

three little args, one ssize_t return, no cap πŸ’€βœ¨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ctrl β€” The controller. the main character of this whole situation πŸ‘‘
  • buf β€” The input buffer. the actual bytes live here πŸ“
  • n β€” The number of bytes in the input buffer. so like, how much of buf we're actually vibing with πŸ”₯

πŸ’œ DESCRIPTION πŸ’œ

So here's the tea: you call this to provide input data to be evaluated by the controller, and that data has already been received via the lower-level transport. 🌈

Think of it as the handoff moment β€” the transport layer did its lil thing, and now the controller gets to actually look at the bytes. very "you dropped this, queen" of the transport layer, fr fr πŸŽ€


⭐ RETURN ⭐

Returns the number of bytes consumed β€” slay, mission accomplished πŸ’–

BUT β€” and this is the important bit, so listen up πŸ™ˆ β€” if the packet transport layer of the controller has been shut down, you get -ESHUTDOWN instead. πŸ’€ no bytes consumed, just shutdown sadness. not a vibe, but the kernel said what it said.


🌈 SEE ALSO 🌈

Kernel file ./drivers/platform/surface/aggregator/controller.h β€” and the whole squad of related structs and functions, all here for your reading pleasure, bestie 🫢

  • struct ssh_seq_counter(9)
  • struct ssh_rqid_counter(9)
  • struct ssam_nf_head(9)
  • struct ssam_nf(9)
  • struct ssam_event_item(9)
  • struct ssam_event_queue(9)
  • struct ssam_event_target(9)
  • struct ssam_cplt(9)
  • enum ssam_controller_state(9)
  • struct ssam_controller_caps(9)
  • struct ssam_controller(9)
  • ssam_controller_write_wakeup(9)

like, that's the whole friend group, go say hi ✨🐝


okay and finally, the sign-off πŸ’… this page is brought to you by ./drivers/platform/surface/agg... (the path got a lil truncated, she's shy), dated October 2026, and it's all about ssam_controller_receive_buf(9) β€” read it, love it, ship it. πŸŽ€πŸ’–πŸŒˆ

πŸ“¦ where this page comes from