Re: [PATCH] mmc: rtsx: fix possible circular locking dependency

2014-04-18 Thread Peter Wu
Hi! On Wednesday 16 April 2014 09:38:44 micky_ch...@realsil.com.cn wrote: From: Micky Ching micky_ch...@realsil.com.cn To avoid dead lock, we need make sure host-lock is always acquire before pcr-lock. But in irq handler, we acquired pcr-lock in rtsx mfd driver, and sd_isr_done_transfer()

Locking issues in mmc: rtsx: add support for pre_req and post_req (was: Re: [PATCH] mmc: rtsx: fix possible circular locking dependency)

2014-04-18 Thread Peter Wu
. According to the tasklets documentation[1], they always run at interrupts (i.e., at any time, possibly right after tasklet_schedule if I got this right?). These tasklets however do get scheduled *under* the host-lock which will cause a deadlock. This proposed patch (mmc: rtsx: fix possible circular

[PATCH] mmc: rtsx: fix possible circular locking dependency

2014-04-15 Thread micky_ching
From: Micky Ching micky_ch...@realsil.com.cn To avoid dead lock, we need make sure host-lock is always acquire before pcr-lock. But in irq handler, we acquired pcr-lock in rtsx mfd driver, and sd_isr_done_transfer() is called during pcr-lock already acquired. Since in sd_isr_done_transfer() the