mmc: core: resolve dead lock problem in pm_notify
authorChuanxiao Dong <chuanxiao.dong@intel.com>
Thu, 20 Oct 2011 10:54:15 +0000 (18:54 +0800)
committermgross <mark.gross@intel.com>
Wed, 9 Nov 2011 21:15:59 +0000 (13:15 -0800)
commit6cf764aab96c296dc26a50a646e7feacd69c2681
tree26bb3415cef5b38382c3fc16d53f8b056bd2d315
parent67d363d87bbf8305371c7e154177ae1f1a45aec0
mmc: core: resolve dead lock problem in pm_notify

BZ 2106

when pm_suspend() is called, in mmc_pm_notify() it will call mmc_claim_host(),
in host->bus_ops->remove(host), that is mmc_sd_remove(), at last it will
call mmc_cleanup_queue(), suspend thread will wait the mmcqd/2 thread to stop,
but in mmcqd/2 thread, mmc_blk_issue_rw_rq() will call mmc_clain_host(),
mmcqd/2 thread will wait in mmc_clain_host(), it will cause dead lock.

Change-Id: I05462d71066c4182ab01934fe64a87957ab47c6a
Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
drivers/mmc/core/core.c