sdio_set_block_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sdio_set_block_size(9)

okay bestie, welcome to the sdio_set_block_size page from the Kernel API Manual β€” yes it's a 9-section manpage, yes we're gonna make it cute, no we are NOT skipping anything πŸ’–


✨ NAME ✨

sdio_set_block_size β€” literally just sets the block size of an SDIO function. that's the whole gig. icon behavior honestly πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

int sdio_set_block_size (struct sdio_func *func , unsigned blksz );

🌸 ARGUMENTS 🌸

  • func β€” the SDIO function you're changing. your main character, your project, your blorbo 🫢
  • blksz β€” the new block size. or, plot twist, pass 0 and it'll use the default. so valid of it πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so the default block size? it's the biggest one that both the function and the host can support β€” capped at a max of 512, and the reason is lowkey genius: it makes sure arbitrarily sized data transfers use the optimal (aka least) number of commands. efficiency slay ✨

a driver can call this to override that default block size that the core set. and here's the spicy part πŸ”₯ β€” you can use this to set a block size greater than the maximum reported by the card. but ngl, that means it's the driver's responsibility to make sure it's actually using a value the card supports. no hand-holding, you're on your own bestie 😭

returns 0 on success. returns -EINVAL if the host doesn't support the block size you asked for (rude). or -EIO (etc.) if one of the resultant FBR block size register writes failed. register writes failing is giving πŸ’€ not the vibe.


πŸ’œ SEE ALSO πŸ’œ

kernel file ./drivers/mmc/core/sdio_io.c, plus the whole friend group:

like, the whole squad. periodt 🧚


and that's the page!! πŸŽ€ this lil gem lives in ./drivers/mmc/core, and it's dated October 2026 β€” future-vibes only, no cap ⭐ bye bestie, go set some block sizes responsibly πŸ’–

πŸ“¦ where this page comes from