sdio_set_block_size(9)
π 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, pass0and 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:
sdio_claim_host(9)sdio_release_host(9)sdio_enable_func(9)sdio_disable_func(9)sdio_align_size(9)sdio_readb(9)sdio_writeb(9)sdio_writeb_readb(9)sdio_memcpy_fromio(9)sdio_memcpy_toio(9)sdio_readsb(9)sdio_writesb(9)sdio_readw(9)sdio_writew(9)sdio_readl(9)sdio_writel(9)sdio_f0_readb(9)sdio_f0_writeb(9)sdio_get_host_pm_caps(9)sdio_set_host_pm_flags(9)sdio_retune_crc_disable(9)sdio_retune_crc_enable(9)sdio_retune_hold_now(9)sdio_retune_release(9)
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
- 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