ssam_nf_ref...disable_free(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, welcome to the Kernel API Manual page for ssam_nf_ref...disable_free(9) β€” and yes, the main-character function here is ssam_nf_refcount_disable_free. Let’s get into it πŸ’…βœ¨

🌸 NAME 🌸

ssam_nf_refcount_disable_free β€” disables the event for a reference count entry if it is no longer in use, and frees the corresponding entry. Periodt. πŸ’–


✨ SYNOPSIS ✨

int ssam_nf_refcount_disable_free (struct ssam_controller *ctrl , struct
       ssam_nf_refcount_entry *entry , u8 flags , bool ec );

πŸŽ€ ARGUMENTS πŸŽ€

  • ctrl β€” the controller to disable the event on, bestie.
  • entry β€” the reference count entry for the event to be disabled.
  • flags β€” the flags used for enabling the event on the EC.
  • ec β€” flag specifying if the event should actually be disabled on the EC.

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here’s the vibe: if ec equals true and the reference count equals zero (i.e. the event is no longer requested by any client), the specified event will be disabled on the EC via the corresponding request. Slay. πŸ”₯

If ec equals false, no request will be sent to the EC and the event can be considered in a detached state (i.e. no longer used but still enabled). Disabling an event via this method may be required for hot-removable devices, where event disable requests may time out after the device has been physically removed. It’s giving β€œmessy cleanup energy,” but it’s necessary sometimes 😭.

In both cases, if the reference count equals zero, the corresponding reference count entry will be freed. The reference count entry must not be used any more after a call to this function. Like, do not touch it after this β€” fr fr. πŸ™ˆ

It also checks if the flags used for disabling the event match the flags used for enabling the event and warns if they do not (regardless of reference count). Vibe check: failed, but with a warning. πŸ’€

This does not modify the reference count itself, which is done with ssam_nf_refcount_inc / ssam_nf_refcount_dec. So don’t expect this function to handle the count for you, bestie. 🫢


πŸ”’ NOTE πŸ”’

nf->lock must be held when calling this function. No cap β€” lock it before you call it. πŸ”

⭐ RETURN ⭐

Returns zero on success. If the event is disabled by this call, returns the status of the event-enable EC command. That’s the whole return tea β˜•βœ¨


🌈 SEE ALSO 🌈

Bye bestie! This page’s source/version stamp is ./drivers/platform/surface/agg... and it’s dated October 2026 β€” footer title vibe: ssam_nf_ref...disable_free(9). Mwah! πŸ’–βœ¨

πŸ“¦ where this page comes from