Re: [PATCH] mmc: subtract boot sectors from disk size for eMMC 4.3+ devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/3/5 Linus Walleij <linus.walleij@xxxxxxxxxxxxxx>:

> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux