mmc: tmio: fix a deadlock
Currently the tmio-mmc driver contains a recursive runtime PM method invocation, which leads to a deadlock on a mutex. Avoid it by taking care not to request DMA too early. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:

committed by
Chris Ball

parent
332bdb506f
commit
162f43e31c
@@ -984,7 +984,7 @@ int tmio_mmc_host_resume(struct device *dev)
|
||||
if (host->pm_global) {
|
||||
/* Runtime PM resume callback didn't run */
|
||||
tmio_mmc_reset(host);
|
||||
tmio_mmc_request_dma(host, host->pdata);
|
||||
tmio_mmc_enable_dma(host, true);
|
||||
host->pm_global = false;
|
||||
}
|
||||
|
||||
@@ -1007,7 +1007,7 @@ int tmio_mmc_host_runtime_resume(struct device *dev)
|
||||
struct tmio_mmc_data *pdata = host->pdata;
|
||||
|
||||
tmio_mmc_reset(host);
|
||||
tmio_mmc_request_dma(host, host->pdata);
|
||||
tmio_mmc_enable_dma(host, true);
|
||||
|
||||
if (pdata->power) {
|
||||
/* Only entered after a card-insert interrupt */
|
||||
|
Reference in New Issue
Block a user