MMC host:
- 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 -----BEGIN PGP SIGNATURE----- iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmYsBW4XHHVsZi5oYW5z c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjClo4A/+OccOI5V64s/INp2D9VdP3aRj 8bSlK0wp6cnMXVdFpYYItM/HvHlsd0ACHNyDSIqbZ5uh2qHUvNnthBnZ61zZGKTk I60if0iOg0NS5MnWWy2J4L/djq3xMF+tqAvBsD3UcgaUcpfyvggR7AdmzPsfBawy BBQUnELu2LUpRHU7mmJ3gnkXemjdOL1BSvtH24o9tf4Tz/1u7sCjI45eNd9hKnrD GT7CAqCwVhJtcuQl2AH/2/jV/r6Ffsek3JbHtAbYPDQMh3Y7U+bj8DtHxxX4+pGn OEIrUCHH/1xXajVAaX62TeX1gbszNCKye2VxCQxeCnfo9ocptP3aG0pcOCSJG8JN mLett85SK/IKmveQSmSh5qOUpRS677T2uF/O1mBeoqFHMWeao5Nvu0bZMtABqp/+ T7dGldPj+IvksP1qc1naB0K+Iz4xJfbZNARz3WHPsxw9WIBIHLGrteqSDHH0Js1U A5jVMqfChtETMTKGcfmjKZEO5x0knK8gOuhel4jY35M2BZuQqdZ4P0af4c+qok0I FUQ7Dm+3wqUqrRHNz34Yk6Zu6f7GyHmqrxGxAvY27lI6zOIOjkDDuluBOP1htbDp TBw/DRX51AfXaJDjclsVeYDWfY+j7OMwC6KXonrfz97EAwHr0TJ3VpBgj5QxmIbc /JObflLakgaC+gKx+iM= =lioY -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
4630932a55
|
@ -300,6 +300,7 @@ static void moxart_transfer_pio(struct moxart_host *host)
|
||||||
remain = sgm->length;
|
remain = sgm->length;
|
||||||
if (remain > host->data_len)
|
if (remain > host->data_len)
|
||||||
remain = host->data_len;
|
remain = host->data_len;
|
||||||
|
sgm->consumed = 0;
|
||||||
|
|
||||||
if (data->flags & MMC_DATA_WRITE) {
|
if (data->flags & MMC_DATA_WRITE) {
|
||||||
while (remain > 0) {
|
while (remain > 0) {
|
||||||
|
|
|
@ -2694,6 +2694,11 @@ static __maybe_unused int sdhci_msm_runtime_suspend(struct device *dev)
|
||||||
struct sdhci_host *host = dev_get_drvdata(dev);
|
struct sdhci_host *host = dev_get_drvdata(dev);
|
||||||
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
||||||
struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
|
struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
|
||||||
|
unsigned long flags;
|
||||||
|
|
||||||
|
spin_lock_irqsave(&host->lock, flags);
|
||||||
|
host->runtime_suspended = true;
|
||||||
|
spin_unlock_irqrestore(&host->lock, flags);
|
||||||
|
|
||||||
/* Drop the performance vote */
|
/* Drop the performance vote */
|
||||||
dev_pm_opp_set_rate(dev, 0);
|
dev_pm_opp_set_rate(dev, 0);
|
||||||
|
@ -2708,6 +2713,7 @@ static __maybe_unused int sdhci_msm_runtime_resume(struct device *dev)
|
||||||
struct sdhci_host *host = dev_get_drvdata(dev);
|
struct sdhci_host *host = dev_get_drvdata(dev);
|
||||||
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
||||||
struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
|
struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
|
||||||
|
unsigned long flags;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = clk_bulk_prepare_enable(ARRAY_SIZE(msm_host->bulk_clks),
|
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)
|
||||||
|
|
||||||
dev_pm_opp_set_rate(dev, msm_host->clk_rate);
|
dev_pm_opp_set_rate(dev, msm_host->clk_rate);
|
||||||
|
|
||||||
return sdhci_msm_ice_resume(msm_host);
|
ret = sdhci_msm_ice_resume(msm_host);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
spin_lock_irqsave(&host->lock, flags);
|
||||||
|
host->runtime_suspended = false;
|
||||||
|
spin_unlock_irqrestore(&host->lock, flags);
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct dev_pm_ops sdhci_msm_pm_ops = {
|
static const struct dev_pm_ops sdhci_msm_pm_ops = {
|
||||||
|
|
|
@ -626,6 +626,7 @@ static int th1520_execute_tuning(struct sdhci_host *host, u32 opcode)
|
||||||
|
|
||||||
/* perform tuning */
|
/* perform tuning */
|
||||||
sdhci_start_tuning(host);
|
sdhci_start_tuning(host);
|
||||||
|
host->tuning_loop_count = 128;
|
||||||
host->tuning_err = __sdhci_execute_tuning(host, opcode);
|
host->tuning_err = __sdhci_execute_tuning(host, opcode);
|
||||||
if (host->tuning_err) {
|
if (host->tuning_err) {
|
||||||
/* disable auto-tuning upon tuning error */
|
/* disable auto-tuning upon tuning error */
|
||||||
|
|
Loading…
Reference in New Issue