Skip to content

Commit

Permalink
bus: mhi: host: Remove duplicate ee check for syserr
Browse files Browse the repository at this point in the history
If we detect a system error via intvec, we only process the syserr if the
current ee is different than the last observed ee.  The reason for this
check is to prevent bhie from running multiple times, but with the single
queue handling syserr, that is not possible.

The check can cause an issue with device recovery.  If PBL loads a bad SBL
via BHI, but that SBL hangs before notifying the host of an ee change,
then issuing soc_reset to crash the device and retry (after supplying a
fixed SBL) will not recover the device as the host will observe a PBL->PBL
transition and not process the syserr.  The device will be stuck until
either the driver is reloaded, or the host is rebooted.  Instead, remove
the check so that we can attempt to recover the device.

Fixes: ef2126c ("bus: mhi: core: Process execution environment changes serially")
Cc: [email protected]
Signed-off-by: Jeffrey Hugo <[email protected]>
Reviewed-by: Carl Vanderlip <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Manivannan Sadhasivam <[email protected]>
  • Loading branch information
quic-jhugo authored and Mani-Sadhasivam committed Apr 10, 2023
1 parent 4308c68 commit d469d94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/bus/mhi/host/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ irqreturn_t mhi_intvec_threaded_handler(int irq_number, void *priv)
}
write_unlock_irq(&mhi_cntrl->pm_lock);

if (pm_state != MHI_PM_SYS_ERR_DETECT || ee == mhi_cntrl->ee)
if (pm_state != MHI_PM_SYS_ERR_DETECT)
goto exit_intvec;

switch (ee) {
Expand Down

0 comments on commit d469d94

Please sign in to comment.