msm: mhi_dev: Process the PM_RST_DEAST event in the caller context

With the commit <37ea867103f2>("msm: ep-pcie: Use threaded irq for
PERST de-assertion handling"), PCIe driver notifies the PM_RST_DEAST
event in threadedIRQ context. Process this event in the same
context so that we can finish link initialization and training as
quickly as possible.

Change-Id: If920fd9b653d6ae82cea599effb2d912a9b08174
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
This commit is contained in:
Veerabhadrarao Badiganti 2021-09-20 18:57:50 +05:30
commit 04e87d8bc7

View file

@ -1407,7 +1407,18 @@ void mhi_dev_sm_pcie_handler(struct ep_pcie_notify *notify)
mhi_sm_ctx->stats.rst_deast_event_cnt++;
MHI_SM_DBG("Hold wake for perst deassert event\n");
pm_stay_awake(mhi->dev);
break;
atomic_inc(&mhi_sm_ctx->pending_pcie_events);
dstate_change_evt->event = event;
INIT_WORK(&dstate_change_evt->work, mhi_sm_pcie_event_manager);
/*
* Link init has to be completed as quicly as possible.
* Since this gets inovked from threaded IRQ context, do
* all processing in the same context, so that we don't run
* into any scheduling letencies.
*/
mhi_sm_pcie_event_manager(&dstate_change_evt->work);
goto exit;
case EP_PCIE_EVENT_PM_D0:
mhi_sm_ctx->stats.d0_event_cnt++;