]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
CHROMIUM: rts_pstor: prevent deadlock and detection issues
authorDerek Basehore <dbasehore@chromium.org>
Tue, 27 Nov 2012 04:07:12 +0000 (20:07 -0800)
committerGerrit <chrome-bot@google.com>
Tue, 27 Nov 2012 23:24:29 +0000 (15:24 -0800)
Patch from Realtek that fixes a deadlock issue when combined with removing the
sdhci_pci module from the kernel. This disables the card interrupt over the bus
and something else that's undocumented.

The change also prevents issues with the card reader either not detecting an SD
card insertion or removal.

TEST=suspend, insert sd card, resume
BUG=chrome-os-partner:14934, chrome-os-partner:16053

Change-Id: Ibe81ab819662b8d6721dcfe5357d12eaf2a2335d
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38713
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
drivers/staging/rts_pstor/rtsx_card.c
drivers/staging/rts_pstor/rtsx_chip.h

index 4f971f2e930aa0f08a3f96a13ecbd511305d2c81..1fac11f5a843b2cc59b902f7620a8142f69832b2 100644 (file)
@@ -392,9 +392,8 @@ void rtsx_reset_cards(struct rtsx_chip *chip)
                }
        }
        if (chip->need_reset & SD_CARD) {
-               chip->card_exist |= SD_CARD;
-
                if (chip->sd_show_cnt >= MAX_SHOW_CNT) {
+                       chip->card_exist |= SD_CARD;
                        rtsx_write_register(chip, RBCTL, RB_FLUSH, RB_FLUSH);
                        do_reset_sd_card(chip);
                } else {
index 9f7cd82a1541302460ee863ef8f796dcb9a45095..1bc8413e7a8c662ce4f7fd5ec9255d9c6c55c30f 100644 (file)
@@ -37,7 +37,7 @@
 /* Enable hardware interrupt write clear */
 #define HW_INT_WRITE_CLR
 /* #define LED_AUTO_BLINK */
-/* #define DISABLE_CARD_INT */
+#define DISABLE_CARD_INT
 
 #ifdef SUPPORT_MAGIC_GATE
        /* Using NORMAL_WRITE instead of AUTO_WRITE to set ICV */