ufshcd_query_attr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ufshcd_query_attr(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” this page is literally ufshcd_query_attr, and it's the API function for sending attribute requests. no cap, that's the whole NAME vibe. ✨

🌸 NAME 🌸

ufshcd_query_attr β€” API function for sending attribute requests. periodt. πŸ’–

✨ SYNOPSIS ✨

the signature is giving β€œI know my types” energy:

int ufshcd_query_attr (struct ufs_hba *hba , enum query_opcode opcode ,
enum attr_idn idn , u8 index , u8 selector , u32 *attr_val );

πŸŽ€ ARGUMENTS πŸŽ€

  • hba β€” per-adapter instance, aka the main character context for this call. 🫢
  • opcode β€” attribute opcode; this is the β€œwhat are we doing” vibe. πŸ’…
  • idn β€” attribute idn to access, iykyk. πŸ”₯
  • index β€” the index field. yes bestie, it's a field for the index. πŸŽ€
  • selector β€” the selector field. iconic little selector. πŸ¦‹
  • attr_val β€” the attribute value after the query request completes β€” that's the payoff, bestie. πŸ“

πŸ”₯ RETURN πŸ”₯

  • 0 upon success. slay. βœ…
  • > 0 in case the UFS device reported an OCS error. 😭
  • < 0 if another error occurred. πŸ’€

that's the whole vibe check. πŸ’–

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/ufs/core/ufshcd.c β€” yes, the actual source file β€” plus this absolutely iconic lineup of references:

mwah πŸ’– this page lives in ./drivers/ufs/core, dated October 2026, and it's literally ufshcd_query_attr(9) β€” periodt. πŸŽ€

πŸ“¦ where this page comes from