mmc_hw_reset(9)
π 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 actualstruct 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 π
0on success π slay, the card got reset-errnoon 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:
mmc_request_done(9)mmc_cqe_request_done(9)mmc_cqe_post_req(9)mmc_is_req_done(9)mmc_wait_for_req(9)mmc_wait_for_cmd(9)mmc_set_data_timeout(9)__mmc_claim_host(9)mmc_release_host(9)mmc_vdd_to_ocrbitnum(9)mmc_vddrange_to_ocrmask(9)mmc_handle_undervoltage(9)mmc_detect_change(9)mmc_erase(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms