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

Commit 77e95203 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mhi: core: handle low priority events after controller is ready"

parents ff4ce429 13305135
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1642,6 +1642,7 @@ irqreturn_t mhi_intvec_handlr(int irq_number, void *dev)
	wake_up_all(&mhi_cntrl->state_event);
	MHI_VERB("Exit\n");

	if (MHI_IN_MISSION_MODE(mhi_cntrl->ee))
		schedule_work(&mhi_cntrl->low_priority_worker);

	return IRQ_WAKE_THREAD;
+8 −8
Original line number Diff line number Diff line
@@ -456,22 +456,24 @@ int mhi_pm_m3_transition(struct mhi_controller *mhi_cntrl)
static int mhi_pm_mission_mode_transition(struct mhi_controller *mhi_cntrl)
{
	int i, ret;
	enum mhi_ee ee = 0;
	struct mhi_event *mhi_event;

	MHI_LOG("Processing Mission Mode Transition\n");

	write_lock_irq(&mhi_cntrl->pm_lock);
	if (MHI_REG_ACCESS_VALID(mhi_cntrl->pm_state))
		mhi_cntrl->ee = mhi_get_exec_env(mhi_cntrl);
		ee = mhi_get_exec_env(mhi_cntrl);
	write_unlock_irq(&mhi_cntrl->pm_lock);

	if (!MHI_IN_MISSION_MODE(mhi_cntrl->ee))
	if (!MHI_IN_MISSION_MODE(ee))
		return -EIO;

	wake_up_all(&mhi_cntrl->state_event);

	mhi_cntrl->status_cb(mhi_cntrl, mhi_cntrl->priv_data,
			     MHI_CB_EE_MISSION_MODE);
	mhi_cntrl->ee = ee;

	wake_up_all(&mhi_cntrl->state_event);

	/* force MHI to be in M0 state before continuing */
	ret = __mhi_device_get_sync(mhi_cntrl);
@@ -791,11 +793,9 @@ void mhi_low_priority_worker(struct work_struct *work)
		 TO_MHI_EXEC_STR(mhi_cntrl->ee));

	/* check low priority event rings and process events */
	list_for_each_entry(mhi_event, &mhi_cntrl->lp_ev_rings, node) {
		if (MHI_IN_MISSION_MODE(mhi_cntrl->ee))
	list_for_each_entry(mhi_event, &mhi_cntrl->lp_ev_rings, node)
		mhi_event->process_event(mhi_cntrl, mhi_event, U32_MAX);
}
}

void mhi_process_sys_err(struct mhi_controller *mhi_cntrl)
{