Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a95906d5 authored by Ritesh Harjani's avatar Ritesh Harjani Committed by Gerrit - the friendly Code Review server
Browse files

mmc: mmc: Remove suspend/resume clk-scaling logic from mmc_reset



mmc_reset can be called from mmc_cmdq_hw_reset. We are
seeing below deadlock.
Remove suspend/resume of clk-scaling logic from mmc_reset.

<MMC CMDQ error handler kworker>
=======================================================
Process: kworker/7:2, cpu: 7 pid: 9303 start: 0xffffffc04172cd80
=====================================================
    Task name: kworker/7:2 pid: 9303 cpu: 7 start: ffffffc04172cd80
    state: 0x2 exit_state: 0x0 stack base: 0xffffffc0ad778000 Prio: 120
    Stack:
    [<ffffff8102486e68>] __switch_to+0xa4
    [<ffffff8103438d8c>] __schedule+0x2e0
    [<ffffff8103439424>] schedule+0x3c
    [<ffffff8103439a80>] schedule_preempt_disabled+0x1c
    [<ffffff810343c418>] __mutex_lock_slowpath+0x15c
    [<ffffff810343c680>] mutex_lock+0x34
    [<ffffff81030fd4ec>] devfreq_monitor_suspend+0x24
    [<ffffff81030ff908>] devfreq_simple_ondemand_handler+0x70
    [<ffffff81030fd2a0>] devfreq_suspend_device+0x38
    [<ffffff8102f88200>] mmc_suspend_clk_scaling+0x68
    [<ffffff8102f93154>] mmc_reset+0x38
    [<ffffff8102f84028>] mmc_cmdq_hw_reset+0x2c
    [<ffffff8102fa4114>] mmc_blk_cmdq_reset.constprop.45+0x44
    [<ffffff8102fa4260>] mmc_blk_cmdq_err+0xc8
    [<ffffff8102fa7ed8>] mmc_cmdq_error_work+0x28	// host is already claimed by mmc_cmdq_thread but that is waiting for err-handler to finish
    [<ffffff81024d3298>] process_one_work+0x184
    [<ffffff81024d36d4>] worker_thread+0x140
    [<ffffff81024da688>] kthread+0xf4
    [<ffffff8102483ac0>] ret_from_fork+0x10

<clk scaling work>
=======================================================
Process: kworker/u16:0, cpu: 7 pid: 6 start: 0xffffffc0b0594d80
=====================================================
    Task name: kworker/u16:0 pid: 6 cpu: 7 start: ffffffc0b0594d80
    state: 0x2 exit_state: 0x0 stack base: 0xffffffc0b05e4000 Prio: 120
    Stack:
    [<ffffff8102486e68>] __switch_to+0xa4
    [<ffffff8103438d8c>] __schedule+0x2e0
    [<ffffff8103439424>] schedule+0x3c
    [<ffffff8102f86488>] __mmc_claim_host+0xc4
    [<ffffff8102f8ac90>] mmc_devfreq_set_target+0x148
    [<ffffff81030ff044>] update_devfreq+0xe0
    [<ffffff81030ff16c>] devfreq_monitor+0x34      // mutex_lock acquired here
    [<ffffff81024d3298>] process_one_work+0x184
    [<ffffff81024d36d4>] worker_thread+0x140
    [<ffffff81024da688>] kthread+0xf4
    [<ffffff8102483ac0>] ret_from_fork+0x10

Change-Id: I9685a9fd4f9fd25b59fc1e3480ab7d0efc5b970d
Signed-off-by: default avatarRitesh Harjani <riteshh@codeaurora.org>
parent d51367a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment