ramips: Fix sdhci kernel panics on MT7621
authorAndrew Yong <me@ndoo.sg>
Mon, 21 Nov 2016 07:14:16 +0000 (15:14 +0800)
committerJohn Crispin <john@phrozen.org>
Mon, 21 Nov 2016 11:31:39 +0000 (12:31 +0100)
Enable work-arounds present in the code commented-out but needed to write to
sdcard on mt7621 which currently causes kernel to oops when engaging in
serious writing to sdcard. With this change applied, there are still
occasional warnings thrown by the mmc driver, however, at least it no longer
crashes the system and even large writes (full-card dump/erase/write/compare)
don't show any corruption.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Rebase to LEDE and added "CONFIG_SOC_MT7621" check to ensure non-MT7621 devices do not face performance regressions.
Signed-off-by: Andrew Yong <me@ndoo.sg>
target/linux/ramips/patches-4.4/0046-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch

index b36c77c78bbecac95d9ba4cc9f3d705b57137e56..348b563c0c5fb9c4e0237ae346d6787ae5832e1f 100644 (file)
@@ -3906,8 +3906,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +    host->mrq = mrq;    
 +
 +    if (msdc_do_request(mmc,mrq)) {   
-+        if(host->hw->flags & MSDC_REMOVABLE && mrq->data && mrq->data->error) {
-+            //msdc_tune_request(mmc,mrq);                                     
++        if(host->hw->flags & MSDC_REMOVABLE && CONFIG_SOC_MT7621 && mrq->data && mrq->data->error) {
++            msdc_tune_request(mmc,mrq);                                       
 +        }             
 +    }
 +