cvs commit: src/sys/boot/arm/at91/libat91 sd-card.c

Bernd Walter ticso at cicely12.cicely.de
Wed Mar 28 23:10:20 UTC 2007


On Wed, Mar 28, 2007 at 10:31:32PM +0000, Warner Losh wrote:
> imp         2007-03-28 22:31:32 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/boot/arm/at91/libat91 sd-card.c 
>   Log:
>   All SD cards have a block size of 512.  The READ_BL_LEN field in the
>   CSD is usually 512 (well, 9), but for 2GB (and the rogue 4GB SD cards)
>   it is 1024 (or 2048 for 4GB).  This value doesn't work for the block
>   read commands (which really want 512).  Hardcode 512 for those.  This
>   may break really old MMC cards that don't have a 512 block size (I've
>   never seen one: make my day and send me one :-), but since the MMC
>   side of the house is currently broken, it should only have the effect
>   that 2GB (and non-conforming 4GB) SD cards will work.

Great!
That explains why the partition table was read fine with my 2G card,
but although it calculated the right block it failed to read the
disklabel.
  
-- 
B.Walter                http://www.bwct.de      http://www.fizon.de
bernd at bwct.de           info at bwct.de            support at fizon.de


More information about the cvs-src mailing list