Skip to contentSkip to conversation

sdhci max_blk_size

DISCUSSION Matthieu CASTET 2 participants 3 messages Jan 4, 2012 – Jan 5, 2012 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

Hi,

our controller set "Max Block Length" to 3 (4096 byte), but the linux driver ignore this value [1].

Is there any reason to do that .
Or it is code that was written with an older sdhci spec, and we can ignore this check today.

Matthieu

PS : please keep me in CC.

[1]

if (mmc->max_blk_size >= 3) {
            pr_warning("%s: Invalid maximum block size, "
                "assuming 512 bytes\n", mmc_hostname(mmc));
            mmc->max_blk_size = 0;
        }
#1 lore raw
Quoted 6 lines · Matthieu CASTET

Hi,

our controller set "Max Block Length" to 3 (4096 byte), but the linux driver ignore this value [1].

Is there any reason to do that .

The reason is, sd host controller spec defines 3 as reserved, not 4096.

Quoted 2 lines

Or it is code that was written with an older sdhci spec, and we can ignore this check today.

The current sdhci driver follows v3 spec, is the v4 spec out that defined this bit?

Quoted 14 lines

Matthieu

PS : please keep me in CC.

[1]

if (mmc->max_blk_size >= 3) {
            pr_warning("%s: Invalid maximum block size, "
                "assuming 512 bytes\n", mmc_hostname(mmc));
            mmc->max_blk_size = 0;
        }

--

#2 lore raw
Quoted 9 lines · Aaron Lu
Quoted 6 lines · Matthieu CASTET

Hi,

our controller set "Max Block Length" to 3 (4096 byte), but the linux driver ignore this value [1].

Is there any reason to do that .

The reason is, sd host controller spec defines 3 as reserved, not 4096.

ok, in fact this is an extension of our controller : it claims to be sdhci v2, but they added extra registers and added some field in standard register.

For example they added 4K support by using bit 15 of Block size register.

I think we should use SDHCI_QUIRK_FORCE_BLK_SZ_2048.

Sorry for the mail.

Matthieu