提交 03f8590d 编写于 作者: D David Vrabel 提交者: Pierre Ossman

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: NDavid Vrabel <david.vrabel@csr.com>
Signed-off-by: NPierre Ossman <drzeus@drzeus.cx>
上级 2b061973
...@@ -1347,12 +1347,11 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) ...@@ -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; mmc->max_blk_size = (caps & SDHCI_MAX_BLOCK_MASK) >> SDHCI_MAX_BLOCK_SHIFT;
if (mmc->max_blk_size >= 3) { 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); host->slot_descr);
ret = -ENODEV; mmc->max_blk_size = 512;
goto unmap; } else
} mmc->max_blk_size = 512 << mmc->max_blk_size;
mmc->max_blk_size = 512 << mmc->max_blk_size;
/* /*
* Maximum block count. * Maximum block count.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册