efx_siena_mcdi_rpc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ efx_siena_mcdi_rpc(9) ✨

okay so this is a page from the Kernel API Manual bestie, and it's literally about efx_siena_mcdi_rpc β€” issuing an MCDI command and waiting for it to finish. yes, waiting. it's giving "I'll text you back when I'm done" energy πŸ’…


🌸 NAME 🌸

efx_siena_mcdi_rpc β€” issue an MCDI command and then just… wait for completion 🫢


πŸŽ€ SYNOPSIS πŸŽ€

int efx_siena_mcdi_rpc (struct efx_nic *efx , unsigned int cmd , const
efx_dword_t *inbuf , size_t inlen , efx_dword_t *outbuf , size_t outlen
, size_t *outlen_actual );

like, look at all those arguments. she's high maintenance but she's worth it πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • efx β€” the NIC you're sending the command through. main character of this whole operation ✨
  • cmd β€” the command type number. just a lil number that says what you want πŸ‘‘
  • inbuf β€” command parameters go here. that's the tea you're sending πŸ“
  • inlen β€” length of the command parameters in bytes. must be a multiple of 4 and no greater than MCDI_CTL_SDU_LEN_MAX_V1. no cap, those are the rules 😀
  • outbuf β€” the response buffer. may be NULL if outlen is 0. slay, optional queen πŸ™ˆ
  • outlen β€” length of the response buffer, in bytes. if the actual response is longer than outlen & ~3, it gets truncated to that length. yes it will just chop it, don't come for her πŸ’€
  • outlen_actual β€” pointer through which the actual response length gets returned. may be NULL if you literally don't need it πŸ’œ

🌈 DESCRIPTION 🌈

this function may sleep, so bestie you gotta call it in an appropriate context. not me warning you about context β€” it's important, iykyk 😭


πŸ”₯ RETURN πŸ”₯

so it returns a negative error code, or zero if it's all good ✨

and like, the error code can come from two places:

  • the MCDI response β€” in which case the response will still be copied to outbuf and *outlen_actual will be set accordingly 🫢
  • a failure to communicate with the MC β€” in which case *outlen_actual will be set to zero. gone. zeroed. nothing there πŸ’€

⭐ SEE ALSO ⭐

  • Kernel file ./drivers/net/ethernet/sfc/siena/mcdi.c
  • efx_siena_mcdi_rpc_async(9) β€” the not-waiting version, go read it too 🧚

and that's the whole vibe, bestie πŸ’– this icon lives in ./drivers/net/ethernet/sfc/siena, dated October 2026 β€” see you in the kernel source, mwah πŸŽ€

πŸ“¦ where this page comes from