SSAM_SDEV(9)
π SSAM_SDEV β the kernel macro that gets your device ID cute and ready
Okay bestie, you're looking at the SSAM_SDEV page from the Kernel API Manual β a 9 section manpage, so you know it's kernel-internals territory. Let's get into it π«Ά
β¨ NAME β¨
SSAM_SDEV β literally the macro that initializes a &struct ssam_device_id as a physical SSH device using whatever parameters you hand it. That's it, that's the whole vibe. π
πΈ SYNOPSIS πΈ
SSAM_SDEV (cat , tid , iid , fun );
Look at her go. Four args, no cap.
π¦ ARGUMENTS π¦
catβ the target category of the device. The main character of the group chat, ngl.tidβ the target ID of the device.iidβ the instance ID of the device.funβ the sub-function of the device.
Four little parameters, all doing their thing π
π₯ DESCRIPTION π₯
So what she does: SSAM_SDEV initializes a struct ssam_device_id with the parameters you gave her, up there in the SSH domain. If you want the full tea on what those parameters actually mean, go peek at struct ssam_device_uid β that's where the details live.
Now here's the slay part β¨ β there are three special values you can drop in:
SSAM_SSH_TID_ANYSSAM_SSH_IID_ANYSSAM_SSH_FUN_ANY
and they do exactly what they sound like: they say "hey, matching should ignore the target ID / instance ID / sub-function respectively." Respectively!! Use them for whichever one you're not picky about, iykyk.
This macro also initializes the match_flags field based on whatever parameters you handed over. Not me being thorough π
β NOTE β
Real talk though, read this before you go feral with it π
The parameter cat must be a valid u8 value. Meanwhile tid, iid, and fun must either be valid u8 values or SSAM_SSH_TID_ANY, SSAM_SSH_IID_ANY, or SSAM_SSH_FUN_ANY, respectively (respectively again, she loves that word). Other non-u8 values are not allowed β like, at all. Periodt. β οΈ
π SEE ALSO π
The kernel file ./include/linux/surface_aggregator/device.h, plus this whole friend group:
enum ssam_device_domain(9)enum ssam_virtual_tc(9)struct ssam_device_uid(9)SSAM_DEVICE(9)SSAM_VDEV(9)struct ssam_device(9)struct ssam_device_driver(9)is_ssam_device(9)to_ssam_device(9)to_ssam_device_driver(9)ssam_device_mark_hot_removed(9)ssam_device_is_hot_removed(9)ssam_device_get(9)ssam_device_put(9)ssam_device_get_drvdata(9)ssam_device_set_drvdata(9)ssam_device_driver_register(9)module_ssam_device_driver(9)ssam_register_clients(9)ssam_device_register_clients(9)SSAM_DEFINE_SYNC_REQUEST_CL_N(9)SSAM_DEFINE_SYNC_REQUEST_CL_W(9)SSAM_DEFINE_SYNC_REQUEST_CL_R(9)SSAM_DEFINE_SYNC_REQUEST_CL_WR(9)ssam_device_notifier_register(9)ssam_device_notifier_unregister(9)
Go read them all, they're iconic, I promise π§ββοΈ
Mwah π β this page came from ./include/linux/surface_aggreg... and is dated October 2026, and she's serving SSAM_SDEV(9) energy from the Kernel API Manual. Catch you in the next one, bestie π
π¦ 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