diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-04-21 20:26:38 +0200 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-05-25 03:02:42 +0200 |
commit | 82b0e23a295cc58d1290017ee97a40956ad68d94 (patch) | |
tree | f3f140be979623ae8b83b79841eb842858ed054b /drivers/mmc/host/sdhci-pci.c | |
parent | mmc: Ensure hardware partitions don't mess with mmcblk device naming. (diff) | |
download | linux-82b0e23a295cc58d1290017ee97a40956ad68d94.tar.xz linux-82b0e23a295cc58d1290017ee97a40956ad68d94.zip |
mmc: sdhci: Fix read-only detection with JMicron 388 chip
On HP laptops with JMicron 388 chip, the write-locked SD card isn't
detected correctly as read-only in many cases. This is because the
PRESENT_STATE register becomes unsable just after plugging, and it
returns the WRITE_PROTECT bit wrongly at the first read.
This patch fixes the read-only detection by adding a new sdhci quirk
indicating to check the register more intensively with a relatively
long delay.
The patch is tested with 2.6.39-rc4 kernel.
Cc: Aries Lee <arieslee@jmicron.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-pci.c')
-rw-r--r-- | drivers/mmc/host/sdhci-pci.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 82c5dc412679..936bbca19c0a 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -327,6 +327,11 @@ static int jmicron_probe(struct sdhci_pci_chip *chip) return ret; } + /* quirk for unsable RO-detection on JM388 chips */ + if (chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_SD || + chip->pdev->device == PCI_DEVICE_ID_JMICRON_JMB388_ESD) + chip->quirks |= SDHCI_QUIRK_UNSTABLE_RO_DETECT; + return 0; } |