Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bus: mhi: core: Improve mhi_sync_power_up handling for SYS_ERR state

Allow mhi_sync_power_up to handle SYS_ERR during power-up, reboot,
or recovery. This is to avoid premature exit when MHI_PM_IN_ERROR_STATE is
observed during above mentioned system states.

To achieve this, treat SYS_ERR as a valid state and let its handler process
the error and queue the next transition to Mission Mode instead of aborting
early.

Signed-off-by: Vivek Pernamitta <quic_vpernami@quicinc.com>
[mani: reworded description]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Link: https://patch.msgid.link/20250912-uevent_vdev_next-20250911-v4-5-fa2f6ccd301b@quicinc.com

authored by

Vivek Pernamitta and committed by
Manivannan Sadhasivam
aa1a0e93 12543f44

+3 -1
+2
drivers/bus/mhi/host/internal.h
··· 170 170 MHI_PM_IN_ERROR_STATE(pm_state)) 171 171 #define MHI_PM_IN_SUSPEND_STATE(pm_state) (pm_state & \ 172 172 (MHI_PM_M3_ENTER | MHI_PM_M3)) 173 + #define MHI_PM_FATAL_ERROR(pm_state) ((pm_state == MHI_PM_FW_DL_ERR) || \ 174 + (pm_state >= MHI_PM_SYS_ERR_FAIL)) 173 175 174 176 #define NR_OF_CMD_RINGS 1 175 177 #define CMD_EL_PER_RING 128
+1 -1
drivers/bus/mhi/host/pm.c
··· 1287 1287 mhi_cntrl->ready_timeout_ms : mhi_cntrl->timeout_ms; 1288 1288 wait_event_timeout(mhi_cntrl->state_event, 1289 1289 MHI_IN_MISSION_MODE(mhi_cntrl->ee) || 1290 - MHI_PM_IN_ERROR_STATE(mhi_cntrl->pm_state), 1290 + MHI_PM_FATAL_ERROR(mhi_cntrl->pm_state), 1291 1291 msecs_to_jiffies(timeout_ms)); 1292 1292 1293 1293 ret = (MHI_IN_MISSION_MODE(mhi_cntrl->ee)) ? 0 : -ETIMEDOUT;