]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mfd: rtsx: Fix issue that booting OS with SD card inserted
authorWei WANG <wei_wang@realsil.com.cn>
Fri, 8 Feb 2013 07:24:27 +0000 (15:24 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Mar 2013 18:26:35 +0000 (11:26 -0700)
commit58e0b94e48bc225343102f9debe626359dffab57
tree5b1d3904ffe0d9b3e1b1279c637be83124d9fecb
parentd233157ab0476cb80e6fb73817a6979597d759e4
mfd: rtsx: Fix issue that booting OS with SD card inserted

commit c3481955f6c78c8dd99921759306d7469c999ec2 upstream.

Realtek card reader supports both SD and MS card. According to the
settings of rtsx MFD driver, SD host will be probed before MS host.
If we boot/reboot Linux with SD card inserted, the resetting flow of SD
card will succeed, and the following resetting flow of MS is sure to fail.
Then MS upper-level driver will ask rtsx driver to turn power off. This
request leads to the result that the following SD commands fail and SD card
can't be accessed again.

In this commit, Realtek's SD and MS host driver will check whether the card
that upper driver requesting is the one existing in the slot. If not, Realtek's
host driver will refuse the operation to make sure the exlusive accessing
at the same time.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Cc: Tim Gardner <rtg.canonical@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/memstick/host/rtsx_pci_ms.c
drivers/mfd/rtsx_pcr.c
drivers/mmc/host/rtsx_pci_sdmmc.c
include/linux/mfd/rtsx_pci.h