mmc_read_tuning(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ mmc_read_tuning ✨

So bestie, you found yourself in the Kernel API Manual (that's the 9 section btw, kernel developer vibes only πŸ’…) and you're staring at mmc_read_tuning. Let me put you on. 🫢


🌸 NAME 🌸

mmc_read_tuning β€” read data blocks from the mmc

Literally what it says. Reading. Blocks. From the mmc. Iconic behavior honestly. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

int mmc_read_tuning (struct mmc_host *host , unsigned int blksz ,
       unsigned int blocks );

Three args, one int back. Clean. No notes. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • host β€” the mmc host doing the read. Like, the one actually pulling off the whole operation. main character energy fr. πŸ‘‘
  • blksz β€” data block size. how big each block is. yes it matters. πŸ’«
  • blocks β€” number of blocks to read. like, the count. how many. the quantity. you got this. πŸ“

🌈 DESCRIPTION 🌈

okay so here's the tea β˜• β€” this reads one or more blocks of data from the beginning of the mmc. Beginning! Not from wherever. From the start. noted. πŸ“Œ

It's a low-level helper for tuning operation, so don't go expecting it to do your whole life for you β€” it's a helper, it helps, that's the deal. 🧚

And here's the assumption you need to keep in your head: it's assumed that CMD23 can be used for multi-block read if the host supports it. if. conditional. iykyk. πŸ™ˆ


πŸ’œ NOTE πŸ’œ

Not me needing to tell you this but β€” it allocates and frees a temporary buffer to store the data read. πŸ’€

So the data? Not available outside of the function. Gone. Poof. The only thing you get back is the status of the read operation. That's it. That's the whole return package. no cap. πŸŽ€


πŸ”₯ RETURN πŸ”₯

  • 0 β€” success, we ate, everything's slay πŸ’…
  • otherwise:
    • -EIO
    • -ENOMEM
    • -E2BIG

Pick your fighter. 😭


⭐ SEE ALSO ⭐

Kernel file ./drivers/mmc/core/mmc_ops.c β€” go read it, bestie, it's right there:

Obsessed with a little cross-reference moment. 🌸


And that's the page! Signing off from ./drivers/mmc/core β€” October 2026, Kernel API Manual, mmc_read_tuning(9). go be great with your blocks. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from