Message ID | 20180309061021.9882-1-jh80.chung@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi, On 2018년 03월 09일 15:10, Jaehoon Chung wrote: > Before enabling the clock, dwmmc exynos driver is trying to access the > register. Then the kernel panic can be occurred. > > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> > --- > drivers/mmc/host/dw_mmc-exynos.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c > index fa41d9422d57..3dcf15131926 100644 > --- a/drivers/mmc/host/dw_mmc-exynos.c > +++ b/drivers/mmc/host/dw_mmc-exynos.c > @@ -165,9 +165,15 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing) > static int dw_mci_exynos_runtime_resume(struct device *dev) > { > struct dw_mci *host = dev_get_drvdata(dev); > + int ret = 0; 'ret = 0' is not necessary because dw_mci_runtime_resume() return 0 if success. But, I don't force to modify it due to trivial issue. > + > + ret = dw_mci_runtime_resume(dev); > + if (ret) > + return ret; > > dw_mci_exynos_config_smu(host); > - return dw_mci_runtime_resume(dev); > + > + return ret; > } > > /** > Looks good to me. I tested the suspend-to-ram with this patch on Exynos5433-based TM2 board. Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Tested-by: Chanwoo Choi <cw00.choi@samsung.com>
On 9 March 2018 at 07:31, Chanwoo Choi <cw00.choi@samsung.com> wrote: > Hi, > > On 2018년 03월 09일 15:10, Jaehoon Chung wrote: >> Before enabling the clock, dwmmc exynos driver is trying to access the >> register. Then the kernel panic can be occurred. >> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >> --- >> drivers/mmc/host/dw_mmc-exynos.c | 8 +++++++- >> 1 file changed, 7 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c >> index fa41d9422d57..3dcf15131926 100644 >> --- a/drivers/mmc/host/dw_mmc-exynos.c >> +++ b/drivers/mmc/host/dw_mmc-exynos.c >> @@ -165,9 +165,15 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing) >> static int dw_mci_exynos_runtime_resume(struct device *dev) >> { >> struct dw_mci *host = dev_get_drvdata(dev); >> + int ret = 0; > > 'ret = 0' is not necessary because dw_mci_runtime_resume() return 0 if success. > But, I don't force to modify it due to trivial issue. I amended the patch according to the above. > >> + >> + ret = dw_mci_runtime_resume(dev); >> + if (ret) >> + return ret; >> >> dw_mci_exynos_config_smu(host); >> - return dw_mci_runtime_resume(dev); >> + >> + return ret; >> } >> >> /** >> > > Looks good to me. > I tested the suspend-to-ram with this patch on Exynos5433-based TM2 board. > > Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> > Tested-by: Chanwoo Choi <cw00.choi@samsung.com> > Thanks, applied for fixes and by adding a stable tag. Kind regards Uffe -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index fa41d9422d57..3dcf15131926 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -165,9 +165,15 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing) static int dw_mci_exynos_runtime_resume(struct device *dev) { struct dw_mci *host = dev_get_drvdata(dev); + int ret = 0; + + ret = dw_mci_runtime_resume(dev); + if (ret) + return ret; dw_mci_exynos_config_smu(host); - return dw_mci_runtime_resume(dev); + + return ret; } /**
Before enabling the clock, dwmmc exynos driver is trying to access the register. Then the kernel panic can be occurred. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> --- drivers/mmc/host/dw_mmc-exynos.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)