diff options
author | David Vrabel <david.vrabel@csr.com> | 2007-08-10 08:25:03 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-08-23 00:27:50 -0400 |
commit | 03f8590d90844f04d20488a80e75eaf4c4e0b35c (patch) | |
tree | 8ab7bc1dbbc56aee21e252ab98a57b420a537233 /drivers/mmc/host/sdhci.c | |
parent | 2b061973404802fb87db93175b856ee0dfbe38e4 (diff) |
mmc: ignore bad max block size in sdhci
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>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 7181e867863e..2b327b40fa81 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -1347,12 +1347,11 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) | |||
1347 | */ | 1347 | */ |
1348 | mmc->max_blk_size = (caps & SDHCI_MAX_BLOCK_MASK) >> SDHCI_MAX_BLOCK_SHIFT; | 1348 | mmc->max_blk_size = (caps & SDHCI_MAX_BLOCK_MASK) >> SDHCI_MAX_BLOCK_SHIFT; |
1349 | if (mmc->max_blk_size >= 3) { | 1349 | if (mmc->max_blk_size >= 3) { |
1350 | printk(KERN_ERR "%s: Invalid maximum block size.\n", | 1350 | printk(KERN_WARNING "%s: Invalid maximum block size, assuming 512\n", |
1351 | host->slot_descr); | 1351 | host->slot_descr); |
1352 | ret = -ENODEV; | 1352 | mmc->max_blk_size = 512; |
1353 | goto unmap; | 1353 | } else |
1354 | } | 1354 | mmc->max_blk_size = 512 << mmc->max_blk_size; |
1355 | mmc->max_blk_size = 512 << mmc->max_blk_size; | ||
1356 | 1355 | ||
1357 | /* | 1356 | /* |
1358 | * Maximum block count. | 1357 | * Maximum block count. |