mmc_hw_reset(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mmc_hw_reset β€” like, the kernel API manual page, bestie ✨

okay so we're doing mmc_hw_reset(9) today, straight out of the Kernel API Manual. it's a whole function. it resets a card. in hardware. that's the tweet. now let me actually tell you the details πŸŽ€


✨ NAME ✨

mmc_hw_reset β€” reset the card in hardware πŸ”₯

like. physically. in the silicon. not a vibe reset, a hardware reset.


🌸 SYNOPSIS 🌸

int mmc_hw_reset (struct mmc_card *card );

she takes one argument and returns an int, periodt πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • card β€” the card to be reset πŸƒ like, the actual struct mmc_card * you want to yeet back into a known state.

πŸ’– DESCRIPTION πŸ’–

Hard reset the card. that's it, that's the whole bit ✨

so the way that this works: this function is only for upper layers, like the block layer or card drivers. iykyk πŸ‘‘

🚨 you CANNOT use it in host drivers β€” struct mmc_card might be gone by then. like, literally gone. not me calling a function on a freed pointer πŸ˜­πŸ’€ that's undefined-behaviour o'clock and we are NOT going there.

🌈 RETURN 🌈

  • 0 on success πŸŽ‰ slay, the card got reset
  • -errno on failure 😭 the classic negative-errno situation, go check that errno bestie

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./drivers/mmc/core/core.c β€” and while you're there, go check out all of these:

that's the whole reading list, bestie, no skimming 🫢


mwah πŸ’‹ this page lives in ./drivers/mmc/core, dated October 2026, and it's mmc_hw_reset(9) β€” go reset something responsibly πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from