sdio_align_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so picture this: you're in the kernel, you're doing SDIO stuff, and you've got a transfer size that's just... not it. this little icon <rainbow>sdio_align_size</rainbow> is here to pad your transfer size up to a way more optimal value. that's the whole vibe. πŸŽ€


✨ SYNOPSIS ✨

unsigned int sdio_align_size (struct sdio_func *func , unsigned int sz
);

like, that's the signature. unsigned int in, unsigned int out, two args, slay.


🫢 ARGUMENTS 🫢

  • func β€” the SDIO function. the main character of this whole operation, honestly.
  • sz β€” your original transfer size. the before picture. πŸ“Έ

πŸ’– DESCRIPTION πŸ’–

so what it does is: it pads the original data size with a number of extra bytes. why? because we're avoiding controller bugs and/or performance hits, and no cap, some controllers literally revert to PIO for certain sizes. like... embarrassing for them, but okay, we work around it. 😭

if possible, it will also adjust the size so that it can be handled in just a single request. one request. iconic behavior. one and done. ✨

and what do you get back? the improved size. yes bestie, the improved size. but heads up β€” it might be unmodified, so don't go assuming it always changed. it's giving "we tried, and sometimes trying is enough." πŸ™ˆ


πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./drivers/mmc/core/sdio_io.c β€” go read it, iykyk πŸ‘‘


lowkey the whole family is linked above, so if you're lost in the SDIO cinematic universe, that's your watchlist. πŸ“

and that's the page, bestie!! 🌸 this one lives in ./drivers/mmc/core and it's dated October 2026 β€” so go forth, align those sizes, and remember: extra bytes are not wasted bytes, they're curated bytes. periodt. πŸ’…πŸ”₯⭐

πŸ“¦ where this page comes from