ufshcd_issue...man_upiu_cmd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ufshcd_issue_devman_upiu_cmd β€” NAME

okay so bestie, we're in the Kernel API Manual today, and the star of the show is:

ufshcd_issue_devman_upiu_cmd β€” the API for sending "utrd" type requests ✨


πŸ“œ SYNOPSIS

int ufshcd_issue_devman_upiu_cmd (struct ufs_hba *hba , struct utp_upiu_req *req_upiu , struct utp_upiu_req *rsp_upiu , u8 *desc_buff , int *buff_len , enum dev_cmd_type cmd_type , enum query_opcode desc_op );

πŸŽ€ ARGUMENTS

  • hba β€” per-adapter instance. your main character, fr.
  • req_upiu β€” upiu request. the ask πŸ’Œ
  • rsp_upiu β€” upiu reply. the text back 🫢
  • desc_buff β€” pointer to descriptor buffer, NULL if NA
  • buff_len β€” descriptor size, 0 if NA
  • cmd_type β€” specifies the type (NOP, Query...)
  • desc_op β€” descriptor operation

πŸ’– DESCRIPTION

So these types of requests use the UTP Transfer Request Descriptor β€” utrd, iykyk. Which means it literally "rides" the device management infrastructure: it uses its tag and its tasks work queues. not me being a lil passenger princess on the devman infra πŸ˜­πŸ‘‘

And here's the part where you gotta pay attention bestie β€” since there is only one available tag for device management commands, the caller is expected to hold the hba->dev_cmd.lock mutex. πŸ”’

⚠️ fr fr: only one tag exists for device management commands, so the caller is expected to hold the hba->dev_cmd.lock mutex. don't skip this, it's giving race condition energy and not in a cute way πŸ’€

⭐ RETURN

0 upon success; < 0 upon failure. slay or flop, no in-between πŸ’…


🌈 SEE ALSO

Kernel file ./drivers/ufs/core/ufshcd.c β€” and honestly the whole extended ufshcd family reunion:


k that's the whole page bestie, go hold that mutex and be iconic πŸ«ΆπŸ’œ

sign-off szn: this one lives under ./drivers/ufs/core, dated October 2026 β€” same page name, ufshcd_issue...man_upiu_cmd(9), mwah πŸ’‹

πŸ“¦ where this page comes from