2011/3/5 Linus Walleij <linus.wall...@stericsson.com>:

> This patch is a squash of patches from Gary King and Ulf
> Hansson done in Android trees, hopefully fixing the issue properly.
>
> The csd sector count reported by eMMC 4.3+ cards includes the boot
> partition size; subtract this from the size reported to the disk
> since the boot partition is inaccessible.

I'm trying to get somewhere with this.

AFAICT reading the spec it does not say anything about the
boot sectors being subtracted from the pool of available sectors,
i.e. either you set these sectors aside permanently or you do not
support the feature.

So the behaviour fixed in this patch should be a per-card quirk,
not generic.

Then this:

> +                       /* size is in 256K chunks, i.e. 512 sectors each */
> +                       boot_sectors = ext_csd[EXT_CSD_BOOT_SIZE_MULTI] * 512;

This is not what the spec says. It states that the size is
in 128KB chunks, so the correct code shoul be:

boot_sectors = ext_csd[EXT_CSD_BOOT_SIZE_MULTI] * 256;

Any comments on this? I guess it's been working, the
patch prent in the Android kernels simply remove twice as
many sectors as required from the card sector pool :-/

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to