mmc: at91_mci: enable large data blocks
authorWolfgang Muees <[email protected]>
Fri, 5 Mar 2010 21:43:42 +0000 (13:43 -0800)
committerLinus Torvalds <[email protected]>
Sat, 6 Mar 2010 19:26:43 +0000 (11:26 -0800)
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.

Signed-off-by: Wolfgang Muees <[email protected]>
Signed-off-by: Nicolas Ferre <[email protected]>
Cc: Andrew Victor <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/mmc/host/at91_mci.c

index 818b4e75708afe53532324ae43945a4a2ec4a34f..3cd00c6f258417055dbcec9fd25811b6362b3020 100644 (file)
@@ -934,6 +934,9 @@ static int __init at91_mci_probe(struct platform_device *pdev)
        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;