]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
mmc: dw_mmc: Avoid accessing registers in runtime suspended state
authorShawn Lin <shawn.lin@rock-chips.com>
Fri, 23 Feb 2018 08:47:25 +0000 (16:47 +0800)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 15 Mar 2018 13:27:34 +0000 (08:27 -0500)
commite56b4c64f4c508372bb44f5da4224fe13db80f0b
tree0895192d9dfde113af8c4bccf69f517d1a772adf
parent59abce95cbe9b4cc353917d65f21f5336c32cc2d
mmc: dw_mmc: Avoid accessing registers in runtime suspended state

BugLink: http://bugs.launchpad.net/bugs/1755179
commit 5b43df8b4c1a7f0c3fbf793c9566068e6b1e570c upstream.

cat /sys/kernel/debug/mmc0/regs will hang up the system since
it's in runtime suspended state, so the genpd and biu_clk is
off. This patch fixes this problem by calling pm_runtime_get_sync
to wake it up before reading the registers.

Fixes: e9ed8835e990 ("mmc: dw_mmc: add runtime PM callback")
Cc: <stable@vger.kernel.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/mmc/host/dw_mmc.c