Skip to contentSkip to conversation

mmc: at91_mci: enable large data blocks

PATCH New [email protected] 1 participant 1 message Mar 5, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 112/160 mmc: at91_mci: enable large data blocks

From: Wolfgang Muees <[email protected]>

This patch is setting some max_ variables for the IO elevator, so the elevator will put requests for large data blocks to the driver. This is critical for

a) speed

and

b) wear leveling of the flash chip controller: Otherwise the controller will treat the SD card badly with millions of single 4 KByte write commands. This will lead to a shorter life time for the SD cards.

---

 drivers/mmc/host/at91_mci.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/host/at91_mci.c renamed from drivers/mmc/host/at91_mci.c~mmc-at91_mci-enable-large-data-blocks +3 -0
diff -puN drivers/mmc/host/at91_mci.c~mmc-at91_mci-enable-large-data-blocks drivers/mmc/host/at91_mci.c
@@ -934,6 +934,9 @@ static int __init at91_mci_probe(struct 
 	mmc->max_blk_size  = MCI_MAXBLKSIZE;
 	mmc->max_blk_count = MCI_BLKATONCE;
 	mmc->max_req_size  = MCI_BUFSIZE;
+	mmc->max_phys_segs = MCI_BLKATONCE;
+	mmc->max_hw_segs   = MCI_BLKATONCE;
+	mmc->max_seg_size  = MCI_BUFSIZE;
 
 	host = mmc_priv(mmc);
 	host->mmc = mmc;

_