Loading arch/arm/mach-msm/include/mach/ipa.h +6 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,8 @@ typedef void (*ipa_notify_cb)(void *priv, enum ipa_dp_evt_type evt, * to sys mem if pipe mem alloc fails * @desc: desc FIFO meta-data when client has allocated it * @data: data FIFO meta-data when client has allocated it * @skip_ep_cfg: boolean field that determines if EP should be configured * by IPA driver */ struct ipa_connect_params { struct ipa_ep_cfg ipa_ep_cfg; Loading @@ -433,6 +435,7 @@ struct ipa_connect_params { bool pipe_mem_preferred; struct sps_mem_buffer desc; struct sps_mem_buffer data; bool skip_ep_cfg; }; /** Loading Loading @@ -496,6 +499,8 @@ struct ipa_ext_intf { * evt - type of event * data - data relevant to event. May not be valid. See event_type * enum for valid cases. * @skip_ep_cfg: boolean field that determines if EP should be configured * by IPA driver */ struct ipa_sys_connect_params { struct ipa_ep_cfg ipa_ep_cfg; Loading @@ -503,6 +508,7 @@ struct ipa_sys_connect_params { u32 desc_fifo_sz; void *priv; ipa_notify_cb notify; bool skip_ep_cfg; }; /** Loading drivers/platform/msm/ipa/ipa_client.c +4 −5 Original line number Diff line number Diff line Loading @@ -239,6 +239,7 @@ int ipa_connect(const struct ipa_connect_params *in, struct ipa_sps_params *sps, memset(&ipa_ctx->ep[ipa_ep_idx], 0, sizeof(struct ipa_ep_context)); ipa_inc_client_enable_clks(); ep->skip_ep_cfg = in->skip_ep_cfg; ep->valid = 1; ep->client = in->client; ep->client_notify = in->notify; Loading @@ -251,12 +252,12 @@ int ipa_connect(const struct ipa_connect_params *in, struct ipa_sps_params *sps, goto ipa_cfg_ep_fail; } if (ipa_ctx->ipa_hw_type != IPA_HW_v2_0 || ep->priv == NULL || (enum ipa_config_this_ep)ep->priv != IPA_DO_NOT_CONFIGURE_THIS_EP) { if (!ep->skip_ep_cfg) { if (ipa_cfg_ep(ipa_ep_idx, &in->ipa_ep_cfg)) { IPAERR("fail to configure EP.\n"); goto ipa_cfg_ep_fail; } IPADBG("ep configuration successful\n"); } else { IPADBG("Skipping endpoint configuration.\n"); } Loading Loading @@ -325,9 +326,7 @@ int ipa_connect(const struct ipa_connect_params *in, struct ipa_sps_params *sps, ipa_program_holb(ep, ipa_ep_idx); if (in->client == IPA_CLIENT_USB_PROD && ((enum ipa_config_this_ep)ep->priv != IPA_DO_NOT_CONFIGURE_THIS_EP)) if (!ep->skip_ep_cfg && IPA_CLIENT_IS_PROD(in->client)) ipa_install_dflt_flt_rules(ipa_ep_idx); IPADBG("client %d (ep: %d) connected\n", in->client, ipa_ep_idx); Loading drivers/platform/msm/ipa/ipa_dp.c +25 −11 Original line number Diff line number Diff line Loading @@ -943,17 +943,18 @@ int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) goto fail_wq; } ep->sys->ep = ep; if (ipa_assign_policy(sys_in, ep->sys)) { IPAERR("failed to sys ctx for client %d\n", sys_in->client); result = -ENOMEM; goto fail_gen2; } ep->skip_ep_cfg = sys_in->skip_ep_cfg; ep->valid = 1; ep->client = sys_in->client; ep->client_notify = sys_in->notify; ep->priv = sys_in->priv; ep->sys->ep = ep; ep->avail_fifo_desc = ((sys_in->desc_fifo_sz/sizeof(struct sps_iovec))-1); INIT_LIST_HEAD(&ep->sys->head_desc_list); Loading @@ -967,11 +968,15 @@ int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) goto fail_gen2; } if (!ep->skip_ep_cfg) { if (ipa_cfg_ep(ipa_ep_idx, &sys_in->ipa_ep_cfg)) { IPAERR("fail to configure EP.\n"); goto fail_gen2; } IPADBG("ep configuration successful\n"); } else { IPADBG("skipping ep configuration\n"); } /* Default Config */ ep->ep_hdl = sps_alloc_endpoint(); Loading Loading @@ -1049,7 +1054,7 @@ int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) ipa_allocate_wlan_rx_common_cache(IPA_WLAN_COMM_RX_POOL_LOW); } if (sys_in->client == IPA_CLIENT_WLAN1_PROD) if (!ep->skip_ep_cfg && IPA_CLIENT_IS_PROD(sys_in->client)) ipa_install_dflt_flt_rules(ipa_ep_idx); IPADBG("client %d (ep: %d) connected sys=%p\n", sys_in->client, Loading Loading @@ -2085,11 +2090,20 @@ static int ipa_assign_policy(struct ipa_sys_connect_params *in, } else if (ipa_ctx->ipa_hw_type == IPA_HW_v2_0) { in->ipa_ep_cfg.status.status_en = true; if (IPA_CLIENT_IS_PROD(in->client)) { if (!sys->ep->skip_ep_cfg) { sys->policy = IPA_POLICY_NOINTR_MODE; sys->sps_option = SPS_O_AUTO_ENABLE; sys->sps_callback = NULL; in->ipa_ep_cfg.status.status_ep = ipa_get_ep_mapping(IPA_CLIENT_APPS_LAN_CONS); ipa_get_ep_mapping( IPA_CLIENT_APPS_LAN_CONS); } else { sys->policy = IPA_POLICY_INTR_MODE; sys->sps_option = (SPS_O_AUTO_ENABLE | SPS_O_EOT); sys->sps_callback = ipa_sps_irq_tx_no_aggr_notify; } } else { sys->policy = IPA_POLICY_INTR_MODE; sys->sps_option = (SPS_O_AUTO_ENABLE | SPS_O_EOT); Loading drivers/platform/msm/ipa/ipa_i.h +3 −0 Original line number Diff line number Diff line Loading @@ -317,6 +317,8 @@ struct ipa_tree_node { * @desc_fifo_client_allocated: if descriptors FIFO was allocated by a client * @data_fifo_client_allocated: if data FIFO was allocated by a client * @suspended: valid for B2B pipes, whether IPA EP is suspended * @skip_ep_cfg: boolean field that determines if EP should be configured * by IPA driver */ struct ipa_ep_context { int valid; Loading @@ -341,6 +343,7 @@ struct ipa_ep_context { u32 avail_fifo_desc; u32 dflt_flt4_rule_hdl; u32 dflt_flt6_rule_hdl; bool skip_ep_cfg; }; enum ipa_sys_pipe_policy { Loading Loading
arch/arm/mach-msm/include/mach/ipa.h +6 −0 Original line number Diff line number Diff line Loading @@ -420,6 +420,8 @@ typedef void (*ipa_notify_cb)(void *priv, enum ipa_dp_evt_type evt, * to sys mem if pipe mem alloc fails * @desc: desc FIFO meta-data when client has allocated it * @data: data FIFO meta-data when client has allocated it * @skip_ep_cfg: boolean field that determines if EP should be configured * by IPA driver */ struct ipa_connect_params { struct ipa_ep_cfg ipa_ep_cfg; Loading @@ -433,6 +435,7 @@ struct ipa_connect_params { bool pipe_mem_preferred; struct sps_mem_buffer desc; struct sps_mem_buffer data; bool skip_ep_cfg; }; /** Loading Loading @@ -496,6 +499,8 @@ struct ipa_ext_intf { * evt - type of event * data - data relevant to event. May not be valid. See event_type * enum for valid cases. * @skip_ep_cfg: boolean field that determines if EP should be configured * by IPA driver */ struct ipa_sys_connect_params { struct ipa_ep_cfg ipa_ep_cfg; Loading @@ -503,6 +508,7 @@ struct ipa_sys_connect_params { u32 desc_fifo_sz; void *priv; ipa_notify_cb notify; bool skip_ep_cfg; }; /** Loading
drivers/platform/msm/ipa/ipa_client.c +4 −5 Original line number Diff line number Diff line Loading @@ -239,6 +239,7 @@ int ipa_connect(const struct ipa_connect_params *in, struct ipa_sps_params *sps, memset(&ipa_ctx->ep[ipa_ep_idx], 0, sizeof(struct ipa_ep_context)); ipa_inc_client_enable_clks(); ep->skip_ep_cfg = in->skip_ep_cfg; ep->valid = 1; ep->client = in->client; ep->client_notify = in->notify; Loading @@ -251,12 +252,12 @@ int ipa_connect(const struct ipa_connect_params *in, struct ipa_sps_params *sps, goto ipa_cfg_ep_fail; } if (ipa_ctx->ipa_hw_type != IPA_HW_v2_0 || ep->priv == NULL || (enum ipa_config_this_ep)ep->priv != IPA_DO_NOT_CONFIGURE_THIS_EP) { if (!ep->skip_ep_cfg) { if (ipa_cfg_ep(ipa_ep_idx, &in->ipa_ep_cfg)) { IPAERR("fail to configure EP.\n"); goto ipa_cfg_ep_fail; } IPADBG("ep configuration successful\n"); } else { IPADBG("Skipping endpoint configuration.\n"); } Loading Loading @@ -325,9 +326,7 @@ int ipa_connect(const struct ipa_connect_params *in, struct ipa_sps_params *sps, ipa_program_holb(ep, ipa_ep_idx); if (in->client == IPA_CLIENT_USB_PROD && ((enum ipa_config_this_ep)ep->priv != IPA_DO_NOT_CONFIGURE_THIS_EP)) if (!ep->skip_ep_cfg && IPA_CLIENT_IS_PROD(in->client)) ipa_install_dflt_flt_rules(ipa_ep_idx); IPADBG("client %d (ep: %d) connected\n", in->client, ipa_ep_idx); Loading
drivers/platform/msm/ipa/ipa_dp.c +25 −11 Original line number Diff line number Diff line Loading @@ -943,17 +943,18 @@ int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) goto fail_wq; } ep->sys->ep = ep; if (ipa_assign_policy(sys_in, ep->sys)) { IPAERR("failed to sys ctx for client %d\n", sys_in->client); result = -ENOMEM; goto fail_gen2; } ep->skip_ep_cfg = sys_in->skip_ep_cfg; ep->valid = 1; ep->client = sys_in->client; ep->client_notify = sys_in->notify; ep->priv = sys_in->priv; ep->sys->ep = ep; ep->avail_fifo_desc = ((sys_in->desc_fifo_sz/sizeof(struct sps_iovec))-1); INIT_LIST_HEAD(&ep->sys->head_desc_list); Loading @@ -967,11 +968,15 @@ int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) goto fail_gen2; } if (!ep->skip_ep_cfg) { if (ipa_cfg_ep(ipa_ep_idx, &sys_in->ipa_ep_cfg)) { IPAERR("fail to configure EP.\n"); goto fail_gen2; } IPADBG("ep configuration successful\n"); } else { IPADBG("skipping ep configuration\n"); } /* Default Config */ ep->ep_hdl = sps_alloc_endpoint(); Loading Loading @@ -1049,7 +1054,7 @@ int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) ipa_allocate_wlan_rx_common_cache(IPA_WLAN_COMM_RX_POOL_LOW); } if (sys_in->client == IPA_CLIENT_WLAN1_PROD) if (!ep->skip_ep_cfg && IPA_CLIENT_IS_PROD(sys_in->client)) ipa_install_dflt_flt_rules(ipa_ep_idx); IPADBG("client %d (ep: %d) connected sys=%p\n", sys_in->client, Loading Loading @@ -2085,11 +2090,20 @@ static int ipa_assign_policy(struct ipa_sys_connect_params *in, } else if (ipa_ctx->ipa_hw_type == IPA_HW_v2_0) { in->ipa_ep_cfg.status.status_en = true; if (IPA_CLIENT_IS_PROD(in->client)) { if (!sys->ep->skip_ep_cfg) { sys->policy = IPA_POLICY_NOINTR_MODE; sys->sps_option = SPS_O_AUTO_ENABLE; sys->sps_callback = NULL; in->ipa_ep_cfg.status.status_ep = ipa_get_ep_mapping(IPA_CLIENT_APPS_LAN_CONS); ipa_get_ep_mapping( IPA_CLIENT_APPS_LAN_CONS); } else { sys->policy = IPA_POLICY_INTR_MODE; sys->sps_option = (SPS_O_AUTO_ENABLE | SPS_O_EOT); sys->sps_callback = ipa_sps_irq_tx_no_aggr_notify; } } else { sys->policy = IPA_POLICY_INTR_MODE; sys->sps_option = (SPS_O_AUTO_ENABLE | SPS_O_EOT); Loading
drivers/platform/msm/ipa/ipa_i.h +3 −0 Original line number Diff line number Diff line Loading @@ -317,6 +317,8 @@ struct ipa_tree_node { * @desc_fifo_client_allocated: if descriptors FIFO was allocated by a client * @data_fifo_client_allocated: if data FIFO was allocated by a client * @suspended: valid for B2B pipes, whether IPA EP is suspended * @skip_ep_cfg: boolean field that determines if EP should be configured * by IPA driver */ struct ipa_ep_context { int valid; Loading @@ -341,6 +343,7 @@ struct ipa_ep_context { u32 avail_fifo_desc; u32 dflt_flt4_rule_hdl; u32 dflt_flt6_rule_hdl; bool skip_ep_cfg; }; enum ipa_sys_pipe_policy { Loading