Skip to content

Commit 4630932

Browse files
committed
Merge tag 'mmc-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
Pull MMC host fixes from Ulf Hansson: - moxart: Fix regression for sg_miter for PIO mode - sdhci-msm: Avoid hang by preventing access to suspended controller - sdhci-of-dwcmshc: Fix SD card tuning error for th1520 * tag 'mmc-v6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: moxart: fix handling of sgm->consumed, otherwise WARN_ON triggers mmc: sdhci-of-dwcmshc: th1520: Increase tuning loop count to 128 mmc: sdhci-msm: pervent access to suspended controller
2 parents c9e35b4 + e027e72 commit 4630932

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

drivers/mmc/host/moxart-mmc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ static void moxart_transfer_pio(struct moxart_host *host)
300300
remain = sgm->length;
301301
if (remain > host->data_len)
302302
remain = host->data_len;
303+
sgm->consumed = 0;
303304

304305
if (data->flags & MMC_DATA_WRITE) {
305306
while (remain > 0) {

drivers/mmc/host/sdhci-msm.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2694,6 +2694,11 @@ static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev)
26942694
struct sdhci_host *host = dev_get_drvdata(dev);
26952695
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
26962696
struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
2697+
unsigned long flags;
2698+
2699+
spin_lock_irqsave(&host->lock, flags);
2700+
host->runtime_suspended = true;
2701+
spin_unlock_irqrestore(&host->lock, flags);
26972702

26982703
/* Drop the performance vote */
26992704
dev_pm_opp_set_rate(dev, 0);
@@ -2708,6 +2713,7 @@ static __maybe_unused int sdhci_msm_runtime_resume(struct device *dev)
27082713
struct sdhci_host *host = dev_get_drvdata(dev);
27092714
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
27102715
struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
2716+
unsigned long flags;
27112717
int ret;
27122718

27132719
ret = clk_bulk_prepare_enable(ARRAY_SIZE(msm_host->bulk_clks),
@@ -2726,7 +2732,15 @@ static __maybe_unused int sdhci_msm_runtime_resume(struct device *dev)
27262732

27272733
dev_pm_opp_set_rate(dev, msm_host->clk_rate);
27282734

2729-
return sdhci_msm_ice_resume(msm_host);
2735+
ret = sdhci_msm_ice_resume(msm_host);
2736+
if (ret)
2737+
return ret;
2738+
2739+
spin_lock_irqsave(&host->lock, flags);
2740+
host->runtime_suspended = false;
2741+
spin_unlock_irqrestore(&host->lock, flags);
2742+
2743+
return ret;
27302744
}
27312745

27322746
static const struct dev_pm_ops sdhci_msm_pm_ops = {

drivers/mmc/host/sdhci-of-dwcmshc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ static int th1520_execute_tuning(struct sdhci_host *host, u32 opcode)
626626

627627
/* perform tuning */
628628
sdhci_start_tuning(host);
629+
host->tuning_loop_count = 128;
629630
host->tuning_err = __sdhci_execute_tuning(host, opcode);
630631
if (host->tuning_err) {
631632
/* disable auto-tuning upon tuning error */

0 commit comments

Comments
 (0)