]> err.no Git - linux-2.6/commitdiff
mmc: ignore bad max block size in sdhci
authorDavid Vrabel <david.vrabel@csr.com>
Fri, 10 Aug 2007 12:25:03 +0000 (13:25 +0100)
committerPierre Ossman <drzeus@drzeus.cx>
Thu, 23 Aug 2007 04:27:50 +0000 (06:27 +0200)
Some SDHC cards report an invalid maximum block size, in these cases
assume they support block sizes up to 512 bytes instead of returning
an error.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
drivers/mmc/host/sdhci.c

index 7181e867863e8fda756cb7744ecf47c3bd306c09..2b327b40fa8124953e70d86f4f1d6c1c5336c8df 100644 (file)
@@ -1347,12 +1347,11 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
         */
        mmc->max_blk_size = (caps & SDHCI_MAX_BLOCK_MASK) >> SDHCI_MAX_BLOCK_SHIFT;
        if (mmc->max_blk_size >= 3) {
-               printk(KERN_ERR "%s: Invalid maximum block size.\n",
+               printk(KERN_WARNING "%s: Invalid maximum block size, assuming 512\n",
                        host->slot_descr);
-               ret = -ENODEV;
-               goto unmap;
-       }
-       mmc->max_blk_size = 512 << mmc->max_blk_size;
+               mmc->max_blk_size = 512;
+       } else
+               mmc->max_blk_size = 512 << mmc->max_blk_size;
 
        /*
         * Maximum block count.