]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdhci: Fix read-only detection with JMicron 388 chip
authorTakashi Iwai <tiwai@suse.de>
Thu, 21 Apr 2011 18:26:38 +0000 (20:26 +0200)
committerChris Ball <cjb@laptop.org>
Wed, 25 May 2011 01:02:42 +0000 (21:02 -0400)
commit4a6311e3209eff7b28283179fd15d690fc30894f
treef3f140be979623ae8b83b79841eb842858ed054b
parent3479a354b77cc5b7cb4696aae686863e5ab9e0bc
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>
drivers/mmc/host/sdhci-pci.c
drivers/mmc/host/sdhci.c
include/linux/mmc/sdhci.h