mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
mhi: core: pm lock not needed to read pm state
Acquiring of pm lock is necessary if data is going over the PCIe link to avoid another thread from turning off the link. For reading pm state, acquiring pm lock is not necessary so remove grabbing the lock when entering process ctrl event thread. CRs-Fixed: 2248650 Change-Id: I68b894f41cac5a4a4c58bc94a20eaef4d70bf311 Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
This commit is contained in:
parent
e04e35914c
commit
d2dd62695b
@ -728,14 +728,16 @@ int mhi_process_ctrl_ev_ring(struct mhi_controller *mhi_cntrl,
|
||||
&mhi_cntrl->mhi_ctxt->er_ctxt[mhi_event->er_index];
|
||||
int count = 0;
|
||||
|
||||
read_lock_bh(&mhi_cntrl->pm_lock);
|
||||
/*
|
||||
* this is a quick check to avoid unnecessary event processing
|
||||
* in case we already in error state, but it's still possible
|
||||
* to transition to error state while processing events
|
||||
*/
|
||||
if (unlikely(MHI_EVENT_ACCESS_INVALID(mhi_cntrl->pm_state))) {
|
||||
MHI_ERR("No EV access, PM_STATE:%s\n",
|
||||
to_mhi_pm_state_str(mhi_cntrl->pm_state));
|
||||
read_unlock_bh(&mhi_cntrl->pm_lock);
|
||||
return -EIO;
|
||||
}
|
||||
read_unlock_bh(&mhi_cntrl->pm_lock);
|
||||
|
||||
dev_rp = mhi_to_virtual(ev_ring, er_ctxt->rp);
|
||||
local_rp = ev_ring->rp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user