do_xfer_with_response(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… do_xfer_with_response(9) β€” from the Kernel API Manual, bestie πŸŽ€

okay so real talk, this one lives in do_xfer_with_response(9) land and it is exactly what it says on the tin. let me walk you through it 🫢


✨ NAME ✨

do_xfer_with_response β€” do one transfer and then literally just sit there and wait until the delayed response shows up. no cap, that's the whole job πŸ’€


🌸 SYNOPSIS 🌸

int do_xfer_with_response (const struct scmi_protocol_handle *ph ,
                           struct scmi_xfer *xfer );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • ph β€” pointer to the SCMI protocol handle. your VIP pass to the protocol, basically πŸ‘‘
  • xfer β€” the transfer you're kicking off and waiting on for a response. it's giving "start it and stay tuned" energy ✨

🧚 DESCRIPTION 🧚

okay bestie, listen up, this part is important πŸ”₯

using asynchronous commands in atomic/polling mode? avoid, avoid, avoid. it could cause some seriously long busy-waiting right here, and nobody has time for that. so this function ignores polling for the delayed response, and it will WARN if polling was requested for this command transaction β€” because upper layers are supposed to refrain from issuing that kind of request in the first place πŸ™ˆ

and before you ask "well what was the other option?" β€” here's the tea β˜• the only other option would have been to not use any asynchronous command at all, even if one was made available, whenever an atomic transport is detected, and instead forcibly use the synchronous version (which, ngl, is a thing that can be easily attained at the protocol layer). but that would also have led to longer stalls of the channel for synchronous commands and possibly timeouts 😭

in other words: there's usually a good reason when a platform provides an asynchronous version of a command, and we should prefer to use it… just not when using atomic/polling mode. periodt πŸ’…


⭐ RETURN ⭐

  • -ETIMEDOUT β€” bestie, no delayed response came πŸ˜”
  • if it's a transmit error, you get the corresponding error back
  • else, if everything goes well? 0 πŸŽ‰ slay

πŸ’– SEE ALSO πŸ’–

the whole squad, gathered for you 🫢 first up, the kernel file itself:


and that's the whole page, bestie πŸ“ mwah πŸ’‹

signing off from ./drivers/firmware/arm_scmi, dated October 2026 β€” catch you in the next manpage, ily, bye πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from