Loading drivers/bus/mhi/controllers/mhi_arch_qcom.c +6 −3 Original line number Diff line number Diff line Loading @@ -190,6 +190,7 @@ static int mhi_arch_esoc_ops_power_on(void *priv, unsigned int flags) return ret; } mhi_dev->mdm_state = (flags & ESOC_HOOK_MDM_CRASH); return mhi_pci_probe(pci_dev, NULL); } Loading Loading @@ -312,7 +313,8 @@ static void mhi_boot_monitor(void *data, async_cookie_t cookie) /* wait for device to enter boot stage */ wait_event_timeout(mhi_cntrl->state_event, mhi_cntrl->ee == MHI_EE_AMSS || mhi_cntrl->ee == MHI_EE_DISABLE_TRANSITION, || mhi_cntrl->ee == MHI_EE_DISABLE_TRANSITION || mhi_cntrl->power_down, timeout); ipc_log_string(arch_info->boot_ipc_log, HLOG "Device current ee = %s\n", Loading @@ -334,7 +336,8 @@ int mhi_arch_power_up(struct mhi_controller *mhi_cntrl) struct mhi_dev *mhi_dev = mhi_controller_get_devdata(mhi_cntrl); struct arch_info *arch_info = mhi_dev->arch_info; /* start a boot monitor */ /* start a boot monitor if not in crashed state */ if (!mhi_dev->mdm_state) arch_info->cookie = async_schedule(mhi_boot_monitor, mhi_cntrl); return 0; Loading drivers/bus/mhi/controllers/mhi_qcom.c +2 −1 Original line number Diff line number Diff line Loading @@ -559,8 +559,9 @@ static int mhi_qcom_power_up(struct mhi_controller *mhi_cntrl) return -EIO; } /* when coming out of SSR, initial ee state is not valid */ /* when coming out of SSR, initial states are not valid */ mhi_cntrl->ee = 0; mhi_cntrl->power_down = false; ret = mhi_arch_power_up(mhi_cntrl); if (ret) Loading drivers/bus/mhi/controllers/mhi_qcom.h +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ struct mhi_dev { int resn; void *arch_info; bool powered_on; bool mdm_state; dma_addr_t iova_start; dma_addr_t iova_stop; enum mhi_suspend_mode suspend_mode; Loading drivers/bus/mhi/core/mhi_pm.c +2 −0 Original line number Diff line number Diff line Loading @@ -565,6 +565,8 @@ static void mhi_pm_disable_transition(struct mhi_controller *mhi_cntrl, mhi_cntrl->ee = MHI_EE_DISABLE_TRANSITION; mhi_cntrl->dev_state = MHI_STATE_RESET; } /* notify controller of power down regardless of state transitions */ mhi_cntrl->power_down = true; write_unlock_irq(&mhi_cntrl->pm_lock); /* wake up any threads waiting for state transitions */ Loading include/linux/mhi.h +1 −0 Original line number Diff line number Diff line Loading @@ -373,6 +373,7 @@ struct mhi_controller { enum MHI_DEBUG_LEVEL log_lvl; /* controller specific data */ bool power_down; void *priv_data; void *log_buf; struct dentry *dentry; Loading Loading
drivers/bus/mhi/controllers/mhi_arch_qcom.c +6 −3 Original line number Diff line number Diff line Loading @@ -190,6 +190,7 @@ static int mhi_arch_esoc_ops_power_on(void *priv, unsigned int flags) return ret; } mhi_dev->mdm_state = (flags & ESOC_HOOK_MDM_CRASH); return mhi_pci_probe(pci_dev, NULL); } Loading Loading @@ -312,7 +313,8 @@ static void mhi_boot_monitor(void *data, async_cookie_t cookie) /* wait for device to enter boot stage */ wait_event_timeout(mhi_cntrl->state_event, mhi_cntrl->ee == MHI_EE_AMSS || mhi_cntrl->ee == MHI_EE_DISABLE_TRANSITION, || mhi_cntrl->ee == MHI_EE_DISABLE_TRANSITION || mhi_cntrl->power_down, timeout); ipc_log_string(arch_info->boot_ipc_log, HLOG "Device current ee = %s\n", Loading @@ -334,7 +336,8 @@ int mhi_arch_power_up(struct mhi_controller *mhi_cntrl) struct mhi_dev *mhi_dev = mhi_controller_get_devdata(mhi_cntrl); struct arch_info *arch_info = mhi_dev->arch_info; /* start a boot monitor */ /* start a boot monitor if not in crashed state */ if (!mhi_dev->mdm_state) arch_info->cookie = async_schedule(mhi_boot_monitor, mhi_cntrl); return 0; Loading
drivers/bus/mhi/controllers/mhi_qcom.c +2 −1 Original line number Diff line number Diff line Loading @@ -559,8 +559,9 @@ static int mhi_qcom_power_up(struct mhi_controller *mhi_cntrl) return -EIO; } /* when coming out of SSR, initial ee state is not valid */ /* when coming out of SSR, initial states are not valid */ mhi_cntrl->ee = 0; mhi_cntrl->power_down = false; ret = mhi_arch_power_up(mhi_cntrl); if (ret) Loading
drivers/bus/mhi/controllers/mhi_qcom.h +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ struct mhi_dev { int resn; void *arch_info; bool powered_on; bool mdm_state; dma_addr_t iova_start; dma_addr_t iova_stop; enum mhi_suspend_mode suspend_mode; Loading
drivers/bus/mhi/core/mhi_pm.c +2 −0 Original line number Diff line number Diff line Loading @@ -565,6 +565,8 @@ static void mhi_pm_disable_transition(struct mhi_controller *mhi_cntrl, mhi_cntrl->ee = MHI_EE_DISABLE_TRANSITION; mhi_cntrl->dev_state = MHI_STATE_RESET; } /* notify controller of power down regardless of state transitions */ mhi_cntrl->power_down = true; write_unlock_irq(&mhi_cntrl->pm_lock); /* wake up any threads waiting for state transitions */ Loading
include/linux/mhi.h +1 −0 Original line number Diff line number Diff line Loading @@ -373,6 +373,7 @@ struct mhi_controller { enum MHI_DEBUG_LEVEL log_lvl; /* controller specific data */ bool power_down; void *priv_data; void *log_buf; struct dentry *dentry; Loading