ssam_request..._with_buffer(9)
π ssam_request_do_sync_with_buffer β the Kernel API Manual, but make it make sense β¨
okay so bestie, this one is from the kernel API manual, section 9 (that's the kernel API section, iykyk). Buckle up π
π¦ NAME
ssam_request_do_sync_with_buffer β literally just: execute a synchronous request, and use the buffer you hand it as the back-end for the message buffer. That's the whole vibe. No cap. β¨
πΈ SYNOPSIS
int ssam_request_do_sync_with_buffer (struct ssam_controller *ctrl ,
const struct ssam_request *spec , struct ssam_response *rsp , struct
ssam_span *buf );
π ARGUMENTS
ctrlβ the controller that the request gets submitted through. It's the main character of this whole operation, fr fr πspecβ the request specification and the payload. Two jobs, one struct, we love a multitasker πrspβ the response buffer. It's where the answer lands.bufβ the buffer that holds the request message data.
π DESCRIPTION
okay so here's the tea π: this function allocates a synchronous request struct on the stack, fully initializes it using the buffer you passed in as the message data buffer, submits the whole thing, and then waits for it to complete before returning its status. So it's synchronous-synchronous. It does not ghost you, it sits there until the request is done π
and like, the SSH_COMMAND_MESSAGE_LENGTH macro is right there if you need to compute the required message buffer size. Use it. Don't guess. π«Ά
The way that this is basically ssam_request_do_sync's cousin: it does essentially the same thing, but instead of dynamically allocating the request and the message data buffer, it uses the message data buffer you provided and stores the (small) request struct on the heap. yes, both of those statements are in here, and no, we're not editing the lore π
π₯ RETURN
Returns the status of the request, or any failure that happened during setup. So like β either the actual result, or the setup tripping over itself. Either way you're getting a status back π
π§ SEE ALSO
Kernel file ./drivers/platform/surface/aggregator/controller.c β
and then the whole friend group, in order, no one left behind:
ssh_seq_reset(9), ssh_seq_next(9), ssh_rqid_reset(9), ssh_rqid_next(9), ssam_event_matches_notifier(9), ssam_nfblk_call_chain(9), ssam_nfblk_insert(9), ssam_nfblk_find(9), ssam_nfblk_remove(9), ssam_nf_head_init(9), ssam_nf_head_destroy(9), struct ssam_nf_refcount_key(9), struct ssam_nf_refcount_entry(9), ssam_nf_refcount_inc(9), ssam_nf_refcount_dec(9), ssam_nf_refcount_dec_free(9), ssam_nf_refcount_empty(9), ssam_nf_call(9), ssam_nf_init(9), ssam_nf_destroy(9), ssam_event_item_cache_init(9), ssam_event_item_cache_destroy(9), ssam_event_item_free(9), ssam_event_item_alloc(9), ssam_event_queue_push(9), ssam_event_queue_pop(9), ssam_event_queue_is_empty(9), ssam_cplt_get_event_queue(9), ssam_cplt_submit(9), ssam_cplt_submit_event(9), ssam_cplt_flush(9), ssam_event_queue_init(9), ssam_cplt_init(9), ssam_cplt_destroy(9), ssam_controller_device(9), ssam_controller_get(9), ssam_controller_put(9), ssam_controller_statelock(9), ssam_controller_stateunlock(9), ssam_controller_lock(9), ssam_controller_caps_load_from_acpi(9), ssam_controller_caps_load_from_of(9), ssam_controller_caps_load(9), ssam_controller_init(9), ssam_controller_start(9), ssam_controller_shutdown(9), ssam_controller_destroy(9), ssam_controller_suspend(9), ssam_controller_resume(9), ssam_request_write_data(9), ssam_request_sync_alloc(9), ssam_request_sync_free(9), ssam_request_sync_init(9), ssam_request_sync_submit(9), ssam_request_do_sync(9), struct ssh_notification_params(9), ssam_ssh_event_enable(9), ssam_ssh_event_disable(9), ssam_get_firmware_version(9), ssam_ctrl_notif_display_off(9), ssam_ctrl_notif_display_on(9), ssam_ctrl_notif_d0_exit(9), ssam_ctrl_notif_d0_entry(9), ssam_nf_refcount_enable(9), ssam_nf_refcount_disable_free(9), ssam_notifier_register(9), __ssam_notifier_unregister(9), ssam_controller_event_enable(9), ssam_controller_event_disable(9), ssam_notifier_disable_registered(9), ssam_notifier_restore_registered(9), ssam_notifier_is_empty(9), ssam_notifier_unregister_all(9), ssam_irq_setup(9), ssam_irq_free(9), ssam_irq_arm_for_wakeup(9), ssam_irq_disarm_wakeup(9)
like, that's the whole squad. iconique. π
lowkey important: this page lives at ./drivers/platform/surface/agg... and it's dated October 2026, so if you're reading this from the future β hiii π
and that's the page, bestie. go forth and sync your requests responsibly π§ββοΈβ¨π«Ά
π¦ 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