From: David Vrabel <david.vrabel@csr.com>
To: linux-kernel@vger.kernel.org
Cc: Pierre Ossman <drzeus-list@drzeus.cx>
Subject: mmc: ignore bad max block size in sdhci
Date: Fri, 10 Aug 2007 13:25:03 +0100 [thread overview]
Message-ID: <46BC591F.90505@csr.com> (raw)
In-Reply-To: <46BC58E8.50300@csr.com>
[-- Attachment #1: Type: text/plain, Size: 152 bytes --]
--
David Vrabel, Software Engineer, Drivers group Tel: +44 (0)1223 692562
CSR plc, Churchill House, Cambridge Business Park, Cowley Road, CB4 0WZ
.
[-- Attachment #2: mmc-sdhci-ignore-invalid-block-size.patch --]
[-- Type: text/x-patch, Size: 988 bytes --]
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>
---
Index: mmc/drivers/mmc/host/sdhci.c
===================================================================
--- mmc.orig/drivers/mmc/host/sdhci.c 2007-08-10 01:15:54.000000000 +0100
+++ mmc/drivers/mmc/host/sdhci.c 2007-08-10 01:15:58.000000000 +0100
@@ -1344,12 +1344,11 @@
*/
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.
next prev parent reply other threads:[~2007-08-10 12:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-10 12:24 [patch 0/5] sdio: various bug fixes and CSR specific support David Vrabel
2007-08-10 12:25 ` David Vrabel [this message]
2007-08-10 13:34 ` mmc: ignore bad max block size in sdhci Pierre Ossman
2007-08-10 12:27 ` sdio: set host bus width David Vrabel
2007-08-10 13:35 ` Pierre Ossman
2007-08-10 13:46 ` David Vrabel
2007-08-10 12:28 ` sdio: add <linux/mmc/sdio_csr.h> for CSR specific CCCR registers David Vrabel
2007-08-10 12:59 ` Marcel Holtmann
2007-08-10 13:00 ` David Vrabel
2007-08-10 13:37 ` Pierre Ossman
2007-08-10 12:28 ` sdio: add CSR vendor/device IDs David Vrabel
2007-08-10 13:37 ` Pierre Ossman
2007-08-10 12:29 ` [patch 5/5] sdio: add sdio_f0_readb() and sdio_f0_writeb() David Vrabel
2007-08-10 13:38 ` Pierre Ossman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46BC591F.90505@csr.com \
--to=david.vrabel@csr.com \
--cc=drzeus-list@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox