[Top] [All Lists]

[PATCH] Force MMC/SD to 512 byte block sizes

Subject: [PATCH] Force MMC/SD to 512 byte block sizes
From: "Jordan Crouse" <>
Date: Fri, 6 Jan 2006 09:44:06 -0700
Original-recipient: rfc822;
User-agent: Mutt/1.5.11
This patch is not specific to the AU1200 SD driver, but thats what
we used to debug and verify this, so thats why it is applied against
the linux-mips tree.   Pierre, I'm sending this to you too, because I thought
you may be interested.

Large SD cards (>=2GB) report a physical block size greater then 512 bytes
(2GB reports 1024, and 4GB reports 2048).  However, a sample of different 
brands of USB attached SD readers have shown that the logical block size 
is still forced to 512 bytes.

The original mmc_block code was setting the block size to whatever the
card was reporting, thereby causing much pain and suffering when using
a card initialized elsewhere (bad partition tables, invalid FAT tables, etc).

This patch forces the block size to be 512 bytes, and adjusts the 
capacity accordingly.   With this you should be able to happily use very
large cards interchangeably between platforms.  At least, it has worked for

Comments welcome,

Jordan Crouse
Senior Linux Engineer
AMD - Personal Connectivity Solutions Group

Attachment: mmc_fix.patch
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>