Loading drivers/platform/msm/ipa/ipa_clients/ipa_usb.c +38 −39 Original line number Diff line number Diff line Loading @@ -2058,7 +2058,7 @@ static int ipa3_usb_xdci_connect_internal( result = ipa_mpm_mhip_xdci_pipe_enable(params->teth_prot); if (result) { IPA_USB_ERR("failed to connect MHIP channel\n"); goto connect_dl_fail; goto connect_teth_prot_fail; } } Loading @@ -2066,7 +2066,7 @@ static int ipa3_usb_xdci_connect_internal( result = ipa3_usb_connect_teth_prot(params->teth_prot); if (result) { IPA_USB_ERR("failed to connect teth protocol\n"); goto connect_teth_prot_fail; goto connect_mhip_prot_fail; } if (!ipa3_usb_set_state(IPA_USB_CONNECTED, false, ttype)) { Loading @@ -2080,6 +2080,9 @@ static int ipa3_usb_xdci_connect_internal( state_change_connected_fail: ipa3_usb_disconnect_teth_prot(params->teth_prot); connect_mhip_prot_fail: if (ipa3_is_mhip_offload_enabled()) ipa_mpm_mhip_xdci_pipe_disable(params->teth_prot); connect_teth_prot_fail: ipa3_xdci_disconnect(params->ipa_to_usb_clnt_hdl, false, -1); ipa3_reset_gsi_channel(params->ipa_to_usb_clnt_hdl); Loading Loading @@ -2530,7 +2533,8 @@ int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl, /* Stop UL MHIP channel */ if (ipa3_is_mhip_offload_enabled()) { result = ipa_mpm_mhip_ul_data_stop(teth_prot); result = ipa_mpm_mhip_ul_start_stop_data( MPM_MHIP_STOP, teth_prot); if (result) { IPA_USB_ERR("fail UL MHIPData stop\n"); goto bad_params; Loading @@ -2552,21 +2556,6 @@ int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl, } else spin_unlock_irqrestore(&ipa3_usb_ctx->state_lock, flags); if (teth_prot == IPA_USB_RMNET) { IPA_USB_DBG("USB suspend resetting dma mode\n"); result = ipa_mpm_reset_dma_mode(IPA_CLIENT_USB_PROD, IPA_CLIENT_MHI_PRIME_RMNET_CONS); if (result) { IPA_USB_ERR("failed to reset dma mode\n"); goto bad_params; } } result = ipa_usb_xdci_dismiss_channels(ul_clnt_hdl, dl_clnt_hdl, teth_prot); if (result) goto bad_params; /* Stop UL/DL MHIP channels */ if (ipa3_is_mhip_offload_enabled()) { result = ipa_mpm_mhip_xdci_pipe_disable(teth_prot); Loading @@ -2576,6 +2565,10 @@ int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl, } } result = ipa_usb_xdci_dismiss_channels(ul_clnt_hdl, dl_clnt_hdl, teth_prot); if (result) goto bad_params; /* Disconnect tethering protocol */ result = ipa3_usb_disconnect_teth_prot(teth_prot); Loading Loading @@ -2752,20 +2745,38 @@ static int ipa3_usb_suspend_no_remote_wakeup(u32 ul_clnt_hdl, u32 dl_clnt_hdl, } if (!IPA3_USB_IS_TTYPE_DPL(ttype)) { /* Stop UL MHIP channel - enable HOLB */ if (ipa3_is_mhip_offload_enabled()) { result = ipa_mpm_mhip_ul_start_stop_data(MPM_MHIP_STOP, teth_prot); if (result) { IPA_USB_ERR("fail UL MHIP Data stop\n"); goto start_dl; } } /* Stop UL channel */ result = ipa3_xdci_disconnect(ul_clnt_hdl, true, ipa3_usb_ctx->qmi_req_id); if (result) { IPA_USB_ERR("failed disconnect UL channel\n"); goto start_dl; goto start_mhip; } ipa3_usb_ctx->qmi_req_id++; } /* Stop MHIP channel */ if (ipa3_is_mhip_offload_enabled()) { result = ipa_mpm_mhip_xdci_pipe_disable(teth_prot); if (result) { IPA_USB_ERR("failed to disconnect MHIP channel\n"); goto start_ul; } } /* Disconnect tethering protocol */ result = ipa3_usb_disconnect_teth_prot(teth_prot); if (result) goto start_ul; goto enable_mhip; if (ipa_pm_is_used()) result = ipa_pm_deactivate_sync( Loading @@ -2786,9 +2797,16 @@ static int ipa3_usb_suspend_no_remote_wakeup(u32 ul_clnt_hdl, u32 dl_clnt_hdl, connect_teth: (void)ipa3_usb_connect_teth_prot(teth_prot); enable_mhip: if (ipa3_is_mhip_offload_enabled()) (void)ipa_mpm_mhip_xdci_pipe_enable(teth_prot); start_ul: if (!IPA3_USB_IS_TTYPE_DPL(ttype)) (void)ipa3_xdci_connect(ul_clnt_hdl); start_mhip: if (ipa3_is_mhip_offload_enabled() && !IPA3_USB_IS_TTYPE_DPL(ttype)) (void)ipa_mpm_mhip_ul_start_stop_data(MPM_MHIP_START, teth_prot); start_dl: (void)ipa3_xdci_connect(dl_clnt_hdl); fail_exit: Loading Loading @@ -2838,16 +2856,6 @@ int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl, goto bad_params; } if (teth_prot == IPA_USB_RMNET) { IPA_USB_DBG("USB suspend resetting dma mode\n"); result = ipa_mpm_reset_dma_mode(IPA_CLIENT_USB_PROD, IPA_CLIENT_MHI_PRIME_RMNET_CONS); if (result) { IPA_USB_ERR("failed to reset dma mode\n"); goto bad_params; } } /* Stop UL channel & suspend DL/DPL EP */ result = ipa3_xdci_suspend(ul_clnt_hdl, dl_clnt_hdl, true, Loading Loading @@ -2897,15 +2905,6 @@ int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl, } spin_unlock_irqrestore(&ipa3_usb_ctx->state_lock, flags); /* Stop MHIP channel */ if (ipa3_is_mhip_offload_enabled()) { result = ipa_mpm_mhip_xdci_pipe_disable(teth_prot); if (result) { IPA_USB_ERR("failed to disconnect MHIP channel\n"); goto release_prod_fail; } } IPA_USB_DBG_LOW("exit\n"); mutex_unlock(&ipa3_usb_ctx->general_mutex); return 0; Loading drivers/platform/msm/ipa/ipa_v3/ipa_i.h +11 −3 Original line number Diff line number Diff line Loading @@ -225,6 +225,11 @@ enum { NUM_SMEM_SUBSYSTEMS, }; enum ipa_mpm_start_stop_type { MPM_MHIP_STOP, MPM_MHIP_START, }; #define IPA_WDI_RX_RING_RES 0 #define IPA_WDI_RX_RING_RP_RES 1 #define IPA_WDI_RX_COMP_RING_RES 2 Loading Loading @@ -2931,7 +2936,9 @@ int ipa3_get_gsi_chan_info(struct gsi_chan_info *gsi_chan_info, int ipa_mpm_mhip_xdci_pipe_enable(enum ipa_usb_teth_prot prot); int ipa_mpm_mhip_xdci_pipe_disable(enum ipa_usb_teth_prot xdci_teth_prot); int ipa_mpm_notify_wan_state(void); int ipa_mpm_mhip_ul_data_stop(enum ipa_usb_teth_prot xdci_teth_prot); int ipa_mpm_mhip_ul_start_stop_data( enum ipa_mpm_start_stop_type start_stop, enum ipa_usb_teth_prot xdci_teth_prot); int ipa3_is_mhip_offload_enabled(void); int ipa_mpm_reset_dma_mode(enum ipa_client_type src_pipe, enum ipa_client_type dst_pipe); Loading @@ -2951,7 +2958,8 @@ static inline int ipa_mpm_notify_wan_state(void) { return 0; } static inline int ipa_mpm_mhip_ul_data_stop( static inline int ipa_mpm_mhip_ul_start_stop_data( enum ipa_mpm_start_stop_type start_stop, enum ipa_usb_teth_prot xdci_teth_prot) { return 0; Loading drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c +36 −23 Original line number Diff line number Diff line Loading @@ -113,11 +113,6 @@ enum ipa_mpm_mhip_client_type { IPA_MPM_MHIP_NONE, }; enum ipa_mpm_start_stop_type { STOP, START, }; enum ipa_mpm_clk_vote_type { CLK_ON, CLK_OFF, Loading Loading @@ -1255,7 +1250,7 @@ static void ipa_mpm_mhip_shutdown(int mhip_idx) if (mhip_idx != IPA_MPM_MHIP_CH_ID_2) { /* For DPL, stop only DL channel */ ipa_mpm_start_stop_ul_mhip_data_path(mhip_idx, STOP); ipa_mpm_start_stop_ul_mhip_data_path(mhip_idx, MPM_MHIP_STOP); ipa_mpm_clean_mhip_chan(mhip_idx, ul_prod_chan); } Loading Loading @@ -1427,7 +1422,7 @@ static enum mhip_status_type ipa_mpm_start_stop_mhip_chan( } } is_start = (start_stop == START) ? true : false; is_start = (start_stop == MPM_MHIP_START) ? true : false; if (is_start) { if (mhip_chan == IPA_MPM_MHIP_CHAN_UL) { Loading Loading @@ -1551,12 +1546,13 @@ int ipa_mpm_notify_wan_state(void) } status = ipa_mpm_start_stop_mhip_chan( IPA_MPM_MHIP_CHAN_UL, probe_id, START); IPA_MPM_MHIP_CHAN_UL, probe_id, MPM_MHIP_START); switch (status) { case MHIP_STATUS_SUCCESS: case MHIP_STATUS_NO_OP: ipa_mpm_change_teth_state(probe_id, IPA_MPM_TETH_CONNECTED); ret = ipa_mpm_start_stop_ul_mhip_data_path(probe_id, START); ret = ipa_mpm_start_stop_ul_mhip_data_path(probe_id, MPM_MHIP_START); if (ret) { IPA_MPM_ERR("Couldnt start UL GSI channel"); Loading Loading @@ -2064,10 +2060,10 @@ static int ipa_mpm_mhi_probe_cb(struct mhi_device *mhi_dev, if (ul_prod != IPA_CLIENT_MAX) { /* No teth started yet, disable UL channel */ ipa_mpm_start_stop_mhip_chan(IPA_MPM_MHIP_CHAN_UL, probe_id, STOP); probe_id, MPM_MHIP_STOP); /* Disable data path */ if (ipa_mpm_start_stop_ul_mhip_data_path(probe_id, STOP)) { MPM_MHIP_STOP)) { IPA_MPM_ERR("MHIP Enable data path failed\n"); goto fail_start_channel; } Loading @@ -2082,7 +2078,7 @@ static int ipa_mpm_mhi_probe_cb(struct mhi_device *mhi_dev, /* Enable data path */ if (ul_prod != IPA_CLIENT_MAX) { if (ipa_mpm_start_stop_ul_mhip_data_path(probe_id, START)) { MPM_MHIP_START)) { IPA_MPM_ERR("MHIP Enable data path failed\n"); goto fail_start_channel; } Loading Loading @@ -2215,7 +2211,7 @@ static void ipa_mpm_mhi_status_cb(struct mhi_device *mhi_dev, if (!ipa_mpm_ctx->md[mhip_idx].in_lpm) { status = ipa_mpm_start_stop_mhip_chan( IPA_MPM_MHIP_CHAN_DL, mhip_idx, STOP); mhip_idx, MPM_MHIP_STOP); IPA_MPM_DBG("status = %d\n", status); ipa_mpm_vote_unvote_ipa_clk(CLK_OFF, mhip_idx); ipa_mpm_ctx->md[mhip_idx].in_lpm = true; Loading @@ -2228,7 +2224,7 @@ static void ipa_mpm_mhi_status_cb(struct mhi_device *mhi_dev, ipa_mpm_vote_unvote_ipa_clk(CLK_ON, mhip_idx); status = ipa_mpm_start_stop_mhip_chan( IPA_MPM_MHIP_CHAN_DL, mhip_idx, START); mhip_idx, MPM_MHIP_START); IPA_MPM_DBG("status = %d\n", status); ipa_mpm_ctx->md[mhip_idx].in_lpm = false; } else { Loading Loading @@ -2364,12 +2360,14 @@ int ipa_mpm_mhip_xdci_pipe_enable(enum ipa_usb_teth_prot xdci_teth_prot) if (mhip_client != IPA_MPM_MHIP_USB_DPL) /* Start UL MHIP channel for offloading teth connection */ status = ipa_mpm_start_stop_mhip_chan(IPA_MPM_MHIP_CHAN_UL, probe_id, START); probe_id, MPM_MHIP_START); switch (status) { case MHIP_STATUS_SUCCESS: case MHIP_STATUS_NO_OP: ipa_mpm_change_teth_state(probe_id, IPA_MPM_TETH_CONNECTED); ipa_mpm_start_stop_ul_mhip_data_path(probe_id, START); ipa_mpm_start_stop_ul_mhip_data_path(probe_id, MPM_MHIP_START); /* Lift the delay for rmnet USB prod pipe */ ipa3_set_reset_client_prod_pipe_delay(false, IPA_CLIENT_USB_PROD); Loading Loading @@ -2399,7 +2397,8 @@ int ipa_mpm_mhip_xdci_pipe_enable(enum ipa_usb_teth_prot xdci_teth_prot) return ret; } int ipa_mpm_mhip_ul_data_stop(enum ipa_usb_teth_prot xdci_teth_prot) int ipa_mpm_mhip_ul_start_stop_data(enum ipa_mpm_start_stop_type start_stop, enum ipa_usb_teth_prot xdci_teth_prot) { int probe_id = IPA_MPM_MHIP_CH_ID_MAX; int i; Loading Loading @@ -2428,10 +2427,17 @@ int ipa_mpm_mhip_ul_data_stop(enum ipa_usb_teth_prot xdci_teth_prot) IPA_MPM_DBG("Map xdci prot %d to mhip_client = %d probe_id = %d\n", xdci_teth_prot, mhip_client, probe_id); ret = ipa_mpm_start_stop_ul_mhip_data_path(probe_id, STOP); if (start_stop == MPM_MHIP_STOP) { ret = ipa_mpm_start_stop_ul_mhip_data_path(probe_id, MPM_MHIP_STOP); if (ret) IPA_MPM_ERR("Error stopping UL path, err = %d\n", ret); } else if (start_stop == MPM_MHIP_START) { ret = ipa_mpm_start_stop_ul_mhip_data_path(probe_id, MPM_MHIP_START); if (ret) IPA_MPM_ERR("Error starting UL path, err = %d\n", ret); } return ret; } Loading Loading @@ -2468,6 +2474,13 @@ int ipa_mpm_mhip_xdci_pipe_disable(enum ipa_usb_teth_prot xdci_teth_prot) switch (mhip_client) { case IPA_MPM_MHIP_USB_RMNET: ret = ipa_mpm_reset_dma_mode(IPA_CLIENT_USB_PROD, IPA_CLIENT_MHI_PRIME_RMNET_CONS); if (ret) { IPA_MPM_ERR("failed to reset dma mode\n"); return ret; } break; case IPA_MPM_MHIP_TETH: IPA_MPM_DBG("Teth Disconnecting for prot %d\n", mhip_client); break; Loading @@ -2486,14 +2499,14 @@ int ipa_mpm_mhip_xdci_pipe_disable(enum ipa_usb_teth_prot xdci_teth_prot) } status = ipa_mpm_start_stop_mhip_chan(IPA_MPM_MHIP_CHAN_UL, probe_id, STOP); probe_id, MPM_MHIP_STOP); switch (status) { case MHIP_STATUS_SUCCESS: case MHIP_STATUS_NO_OP: case MHIP_STATUS_EP_NOT_READY: ipa_mpm_change_teth_state(probe_id, IPA_MPM_TETH_INIT); ipa_mpm_start_stop_ul_mhip_data_path(probe_id, STOP); ipa_mpm_start_stop_ul_mhip_data_path(probe_id, MPM_MHIP_STOP); break; case MHIP_STATUS_FAIL: case MHIP_STATUS_BAD_STATE: Loading Loading
drivers/platform/msm/ipa/ipa_clients/ipa_usb.c +38 −39 Original line number Diff line number Diff line Loading @@ -2058,7 +2058,7 @@ static int ipa3_usb_xdci_connect_internal( result = ipa_mpm_mhip_xdci_pipe_enable(params->teth_prot); if (result) { IPA_USB_ERR("failed to connect MHIP channel\n"); goto connect_dl_fail; goto connect_teth_prot_fail; } } Loading @@ -2066,7 +2066,7 @@ static int ipa3_usb_xdci_connect_internal( result = ipa3_usb_connect_teth_prot(params->teth_prot); if (result) { IPA_USB_ERR("failed to connect teth protocol\n"); goto connect_teth_prot_fail; goto connect_mhip_prot_fail; } if (!ipa3_usb_set_state(IPA_USB_CONNECTED, false, ttype)) { Loading @@ -2080,6 +2080,9 @@ static int ipa3_usb_xdci_connect_internal( state_change_connected_fail: ipa3_usb_disconnect_teth_prot(params->teth_prot); connect_mhip_prot_fail: if (ipa3_is_mhip_offload_enabled()) ipa_mpm_mhip_xdci_pipe_disable(params->teth_prot); connect_teth_prot_fail: ipa3_xdci_disconnect(params->ipa_to_usb_clnt_hdl, false, -1); ipa3_reset_gsi_channel(params->ipa_to_usb_clnt_hdl); Loading Loading @@ -2530,7 +2533,8 @@ int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl, /* Stop UL MHIP channel */ if (ipa3_is_mhip_offload_enabled()) { result = ipa_mpm_mhip_ul_data_stop(teth_prot); result = ipa_mpm_mhip_ul_start_stop_data( MPM_MHIP_STOP, teth_prot); if (result) { IPA_USB_ERR("fail UL MHIPData stop\n"); goto bad_params; Loading @@ -2552,21 +2556,6 @@ int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl, } else spin_unlock_irqrestore(&ipa3_usb_ctx->state_lock, flags); if (teth_prot == IPA_USB_RMNET) { IPA_USB_DBG("USB suspend resetting dma mode\n"); result = ipa_mpm_reset_dma_mode(IPA_CLIENT_USB_PROD, IPA_CLIENT_MHI_PRIME_RMNET_CONS); if (result) { IPA_USB_ERR("failed to reset dma mode\n"); goto bad_params; } } result = ipa_usb_xdci_dismiss_channels(ul_clnt_hdl, dl_clnt_hdl, teth_prot); if (result) goto bad_params; /* Stop UL/DL MHIP channels */ if (ipa3_is_mhip_offload_enabled()) { result = ipa_mpm_mhip_xdci_pipe_disable(teth_prot); Loading @@ -2576,6 +2565,10 @@ int ipa_usb_xdci_disconnect(u32 ul_clnt_hdl, u32 dl_clnt_hdl, } } result = ipa_usb_xdci_dismiss_channels(ul_clnt_hdl, dl_clnt_hdl, teth_prot); if (result) goto bad_params; /* Disconnect tethering protocol */ result = ipa3_usb_disconnect_teth_prot(teth_prot); Loading Loading @@ -2752,20 +2745,38 @@ static int ipa3_usb_suspend_no_remote_wakeup(u32 ul_clnt_hdl, u32 dl_clnt_hdl, } if (!IPA3_USB_IS_TTYPE_DPL(ttype)) { /* Stop UL MHIP channel - enable HOLB */ if (ipa3_is_mhip_offload_enabled()) { result = ipa_mpm_mhip_ul_start_stop_data(MPM_MHIP_STOP, teth_prot); if (result) { IPA_USB_ERR("fail UL MHIP Data stop\n"); goto start_dl; } } /* Stop UL channel */ result = ipa3_xdci_disconnect(ul_clnt_hdl, true, ipa3_usb_ctx->qmi_req_id); if (result) { IPA_USB_ERR("failed disconnect UL channel\n"); goto start_dl; goto start_mhip; } ipa3_usb_ctx->qmi_req_id++; } /* Stop MHIP channel */ if (ipa3_is_mhip_offload_enabled()) { result = ipa_mpm_mhip_xdci_pipe_disable(teth_prot); if (result) { IPA_USB_ERR("failed to disconnect MHIP channel\n"); goto start_ul; } } /* Disconnect tethering protocol */ result = ipa3_usb_disconnect_teth_prot(teth_prot); if (result) goto start_ul; goto enable_mhip; if (ipa_pm_is_used()) result = ipa_pm_deactivate_sync( Loading @@ -2786,9 +2797,16 @@ static int ipa3_usb_suspend_no_remote_wakeup(u32 ul_clnt_hdl, u32 dl_clnt_hdl, connect_teth: (void)ipa3_usb_connect_teth_prot(teth_prot); enable_mhip: if (ipa3_is_mhip_offload_enabled()) (void)ipa_mpm_mhip_xdci_pipe_enable(teth_prot); start_ul: if (!IPA3_USB_IS_TTYPE_DPL(ttype)) (void)ipa3_xdci_connect(ul_clnt_hdl); start_mhip: if (ipa3_is_mhip_offload_enabled() && !IPA3_USB_IS_TTYPE_DPL(ttype)) (void)ipa_mpm_mhip_ul_start_stop_data(MPM_MHIP_START, teth_prot); start_dl: (void)ipa3_xdci_connect(dl_clnt_hdl); fail_exit: Loading Loading @@ -2838,16 +2856,6 @@ int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl, goto bad_params; } if (teth_prot == IPA_USB_RMNET) { IPA_USB_DBG("USB suspend resetting dma mode\n"); result = ipa_mpm_reset_dma_mode(IPA_CLIENT_USB_PROD, IPA_CLIENT_MHI_PRIME_RMNET_CONS); if (result) { IPA_USB_ERR("failed to reset dma mode\n"); goto bad_params; } } /* Stop UL channel & suspend DL/DPL EP */ result = ipa3_xdci_suspend(ul_clnt_hdl, dl_clnt_hdl, true, Loading Loading @@ -2897,15 +2905,6 @@ int ipa_usb_xdci_suspend(u32 ul_clnt_hdl, u32 dl_clnt_hdl, } spin_unlock_irqrestore(&ipa3_usb_ctx->state_lock, flags); /* Stop MHIP channel */ if (ipa3_is_mhip_offload_enabled()) { result = ipa_mpm_mhip_xdci_pipe_disable(teth_prot); if (result) { IPA_USB_ERR("failed to disconnect MHIP channel\n"); goto release_prod_fail; } } IPA_USB_DBG_LOW("exit\n"); mutex_unlock(&ipa3_usb_ctx->general_mutex); return 0; Loading
drivers/platform/msm/ipa/ipa_v3/ipa_i.h +11 −3 Original line number Diff line number Diff line Loading @@ -225,6 +225,11 @@ enum { NUM_SMEM_SUBSYSTEMS, }; enum ipa_mpm_start_stop_type { MPM_MHIP_STOP, MPM_MHIP_START, }; #define IPA_WDI_RX_RING_RES 0 #define IPA_WDI_RX_RING_RP_RES 1 #define IPA_WDI_RX_COMP_RING_RES 2 Loading Loading @@ -2931,7 +2936,9 @@ int ipa3_get_gsi_chan_info(struct gsi_chan_info *gsi_chan_info, int ipa_mpm_mhip_xdci_pipe_enable(enum ipa_usb_teth_prot prot); int ipa_mpm_mhip_xdci_pipe_disable(enum ipa_usb_teth_prot xdci_teth_prot); int ipa_mpm_notify_wan_state(void); int ipa_mpm_mhip_ul_data_stop(enum ipa_usb_teth_prot xdci_teth_prot); int ipa_mpm_mhip_ul_start_stop_data( enum ipa_mpm_start_stop_type start_stop, enum ipa_usb_teth_prot xdci_teth_prot); int ipa3_is_mhip_offload_enabled(void); int ipa_mpm_reset_dma_mode(enum ipa_client_type src_pipe, enum ipa_client_type dst_pipe); Loading @@ -2951,7 +2958,8 @@ static inline int ipa_mpm_notify_wan_state(void) { return 0; } static inline int ipa_mpm_mhip_ul_data_stop( static inline int ipa_mpm_mhip_ul_start_stop_data( enum ipa_mpm_start_stop_type start_stop, enum ipa_usb_teth_prot xdci_teth_prot) { return 0; Loading
drivers/platform/msm/ipa/ipa_v3/ipa_mpm.c +36 −23 Original line number Diff line number Diff line Loading @@ -113,11 +113,6 @@ enum ipa_mpm_mhip_client_type { IPA_MPM_MHIP_NONE, }; enum ipa_mpm_start_stop_type { STOP, START, }; enum ipa_mpm_clk_vote_type { CLK_ON, CLK_OFF, Loading Loading @@ -1255,7 +1250,7 @@ static void ipa_mpm_mhip_shutdown(int mhip_idx) if (mhip_idx != IPA_MPM_MHIP_CH_ID_2) { /* For DPL, stop only DL channel */ ipa_mpm_start_stop_ul_mhip_data_path(mhip_idx, STOP); ipa_mpm_start_stop_ul_mhip_data_path(mhip_idx, MPM_MHIP_STOP); ipa_mpm_clean_mhip_chan(mhip_idx, ul_prod_chan); } Loading Loading @@ -1427,7 +1422,7 @@ static enum mhip_status_type ipa_mpm_start_stop_mhip_chan( } } is_start = (start_stop == START) ? true : false; is_start = (start_stop == MPM_MHIP_START) ? true : false; if (is_start) { if (mhip_chan == IPA_MPM_MHIP_CHAN_UL) { Loading Loading @@ -1551,12 +1546,13 @@ int ipa_mpm_notify_wan_state(void) } status = ipa_mpm_start_stop_mhip_chan( IPA_MPM_MHIP_CHAN_UL, probe_id, START); IPA_MPM_MHIP_CHAN_UL, probe_id, MPM_MHIP_START); switch (status) { case MHIP_STATUS_SUCCESS: case MHIP_STATUS_NO_OP: ipa_mpm_change_teth_state(probe_id, IPA_MPM_TETH_CONNECTED); ret = ipa_mpm_start_stop_ul_mhip_data_path(probe_id, START); ret = ipa_mpm_start_stop_ul_mhip_data_path(probe_id, MPM_MHIP_START); if (ret) { IPA_MPM_ERR("Couldnt start UL GSI channel"); Loading Loading @@ -2064,10 +2060,10 @@ static int ipa_mpm_mhi_probe_cb(struct mhi_device *mhi_dev, if (ul_prod != IPA_CLIENT_MAX) { /* No teth started yet, disable UL channel */ ipa_mpm_start_stop_mhip_chan(IPA_MPM_MHIP_CHAN_UL, probe_id, STOP); probe_id, MPM_MHIP_STOP); /* Disable data path */ if (ipa_mpm_start_stop_ul_mhip_data_path(probe_id, STOP)) { MPM_MHIP_STOP)) { IPA_MPM_ERR("MHIP Enable data path failed\n"); goto fail_start_channel; } Loading @@ -2082,7 +2078,7 @@ static int ipa_mpm_mhi_probe_cb(struct mhi_device *mhi_dev, /* Enable data path */ if (ul_prod != IPA_CLIENT_MAX) { if (ipa_mpm_start_stop_ul_mhip_data_path(probe_id, START)) { MPM_MHIP_START)) { IPA_MPM_ERR("MHIP Enable data path failed\n"); goto fail_start_channel; } Loading Loading @@ -2215,7 +2211,7 @@ static void ipa_mpm_mhi_status_cb(struct mhi_device *mhi_dev, if (!ipa_mpm_ctx->md[mhip_idx].in_lpm) { status = ipa_mpm_start_stop_mhip_chan( IPA_MPM_MHIP_CHAN_DL, mhip_idx, STOP); mhip_idx, MPM_MHIP_STOP); IPA_MPM_DBG("status = %d\n", status); ipa_mpm_vote_unvote_ipa_clk(CLK_OFF, mhip_idx); ipa_mpm_ctx->md[mhip_idx].in_lpm = true; Loading @@ -2228,7 +2224,7 @@ static void ipa_mpm_mhi_status_cb(struct mhi_device *mhi_dev, ipa_mpm_vote_unvote_ipa_clk(CLK_ON, mhip_idx); status = ipa_mpm_start_stop_mhip_chan( IPA_MPM_MHIP_CHAN_DL, mhip_idx, START); mhip_idx, MPM_MHIP_START); IPA_MPM_DBG("status = %d\n", status); ipa_mpm_ctx->md[mhip_idx].in_lpm = false; } else { Loading Loading @@ -2364,12 +2360,14 @@ int ipa_mpm_mhip_xdci_pipe_enable(enum ipa_usb_teth_prot xdci_teth_prot) if (mhip_client != IPA_MPM_MHIP_USB_DPL) /* Start UL MHIP channel for offloading teth connection */ status = ipa_mpm_start_stop_mhip_chan(IPA_MPM_MHIP_CHAN_UL, probe_id, START); probe_id, MPM_MHIP_START); switch (status) { case MHIP_STATUS_SUCCESS: case MHIP_STATUS_NO_OP: ipa_mpm_change_teth_state(probe_id, IPA_MPM_TETH_CONNECTED); ipa_mpm_start_stop_ul_mhip_data_path(probe_id, START); ipa_mpm_start_stop_ul_mhip_data_path(probe_id, MPM_MHIP_START); /* Lift the delay for rmnet USB prod pipe */ ipa3_set_reset_client_prod_pipe_delay(false, IPA_CLIENT_USB_PROD); Loading Loading @@ -2399,7 +2397,8 @@ int ipa_mpm_mhip_xdci_pipe_enable(enum ipa_usb_teth_prot xdci_teth_prot) return ret; } int ipa_mpm_mhip_ul_data_stop(enum ipa_usb_teth_prot xdci_teth_prot) int ipa_mpm_mhip_ul_start_stop_data(enum ipa_mpm_start_stop_type start_stop, enum ipa_usb_teth_prot xdci_teth_prot) { int probe_id = IPA_MPM_MHIP_CH_ID_MAX; int i; Loading Loading @@ -2428,10 +2427,17 @@ int ipa_mpm_mhip_ul_data_stop(enum ipa_usb_teth_prot xdci_teth_prot) IPA_MPM_DBG("Map xdci prot %d to mhip_client = %d probe_id = %d\n", xdci_teth_prot, mhip_client, probe_id); ret = ipa_mpm_start_stop_ul_mhip_data_path(probe_id, STOP); if (start_stop == MPM_MHIP_STOP) { ret = ipa_mpm_start_stop_ul_mhip_data_path(probe_id, MPM_MHIP_STOP); if (ret) IPA_MPM_ERR("Error stopping UL path, err = %d\n", ret); } else if (start_stop == MPM_MHIP_START) { ret = ipa_mpm_start_stop_ul_mhip_data_path(probe_id, MPM_MHIP_START); if (ret) IPA_MPM_ERR("Error starting UL path, err = %d\n", ret); } return ret; } Loading Loading @@ -2468,6 +2474,13 @@ int ipa_mpm_mhip_xdci_pipe_disable(enum ipa_usb_teth_prot xdci_teth_prot) switch (mhip_client) { case IPA_MPM_MHIP_USB_RMNET: ret = ipa_mpm_reset_dma_mode(IPA_CLIENT_USB_PROD, IPA_CLIENT_MHI_PRIME_RMNET_CONS); if (ret) { IPA_MPM_ERR("failed to reset dma mode\n"); return ret; } break; case IPA_MPM_MHIP_TETH: IPA_MPM_DBG("Teth Disconnecting for prot %d\n", mhip_client); break; Loading @@ -2486,14 +2499,14 @@ int ipa_mpm_mhip_xdci_pipe_disable(enum ipa_usb_teth_prot xdci_teth_prot) } status = ipa_mpm_start_stop_mhip_chan(IPA_MPM_MHIP_CHAN_UL, probe_id, STOP); probe_id, MPM_MHIP_STOP); switch (status) { case MHIP_STATUS_SUCCESS: case MHIP_STATUS_NO_OP: case MHIP_STATUS_EP_NOT_READY: ipa_mpm_change_teth_state(probe_id, IPA_MPM_TETH_INIT); ipa_mpm_start_stop_ul_mhip_data_path(probe_id, STOP); ipa_mpm_start_stop_ul_mhip_data_path(probe_id, MPM_MHIP_STOP); break; case MHIP_STATUS_FAIL: case MHIP_STATUS_BAD_STATE: Loading