Loading drivers/platform/msm/ipa/ipa_api.c +4 −4 Original line number Diff line number Diff line /* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -2510,15 +2510,15 @@ EXPORT_SYMBOL(ipa_create_wdi_mapping); /** * ipa_get_gsi_ep_info() - provide gsi ep information * @ipa_ep_idx: IPA endpoint index * @client: IPA client type * * Return value: pointer to ipa_gsi_ep_info */ struct ipa_gsi_ep_config *ipa_get_gsi_ep_info(int ipa_ep_idx) const struct ipa_gsi_ep_config *ipa_get_gsi_ep_info(enum ipa_client_type client) { if (!ipa_api_ctrl || !ipa_api_ctrl->ipa_get_gsi_ep_info) return NULL; return ipa_api_ctrl->ipa_get_gsi_ep_info(ipa_ep_idx); return ipa_api_ctrl->ipa_get_gsi_ep_info(client); } EXPORT_SYMBOL(ipa_get_gsi_ep_info); Loading drivers/platform/msm/ipa/ipa_api.h +3 −2 Original line number Diff line number Diff line /* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -331,7 +331,8 @@ struct ipa_api_controller { int (*ipa_create_wdi_mapping)(u32 num_buffers, struct ipa_wdi_buffer_info *info); struct ipa_gsi_ep_config *(*ipa_get_gsi_ep_info)(int ipa_ep_idx); const struct ipa_gsi_ep_config *(*ipa_get_gsi_ep_info) (enum ipa_client_type client); int (*ipa_register_ipa_ready_cb)(void (*ipa_ready_cb)(void *user_data), void *user_data); Loading drivers/platform/msm/ipa/ipa_v2/ipa_utils.c +2 −1 Original line number Diff line number Diff line Loading @@ -4929,7 +4929,8 @@ int ipa2_disable_apps_wan_cons_deaggr(uint32_t agg_size, uint32_t agg_count) return res; } static struct ipa_gsi_ep_config *ipa2_get_gsi_ep_info(int ipa_ep_idx) static const struct ipa_gsi_ep_config *ipa2_get_gsi_ep_info (enum ipa_client_type client) { IPAERR("Not supported for IPA 2.x\n"); return NULL; Loading drivers/platform/msm/ipa/ipa_v3/ipa_client.c +2 −4 Original line number Diff line number Diff line Loading @@ -1152,8 +1152,7 @@ int ipa3_request_gsi_channel(struct ipa_request_gsi_channel_params *params, struct ipahal_reg_ep_cfg_status ep_status; unsigned long gsi_dev_hdl; enum gsi_status gsi_res; struct ipa_gsi_ep_config gsi_ep_cfg; struct ipa_gsi_ep_config *gsi_ep_cfg_ptr = &gsi_ep_cfg; const struct ipa_gsi_ep_config *gsi_ep_cfg_ptr; IPADBG("entry\n"); if (params == NULL || out_params == NULL || Loading Loading @@ -1227,8 +1226,7 @@ int ipa3_request_gsi_channel(struct ipa_request_gsi_channel_params *params, goto write_evt_scratch_fail; } memset(gsi_ep_cfg_ptr, 0, sizeof(struct ipa_gsi_ep_config)); gsi_ep_cfg_ptr = ipa_get_gsi_ep_info(ipa_ep_idx); gsi_ep_cfg_ptr = ipa3_get_gsi_ep_info(ep->client); params->chan_params.evt_ring_hdl = ep->gsi_evt_ring_hdl; params->chan_params.ch_id = gsi_ep_cfg_ptr->ipa_gsi_chan_num; gsi_res = gsi_alloc_channel(¶ms->chan_params, gsi_dev_hdl, Loading drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +10 −16 Original line number Diff line number Diff line Loading @@ -474,8 +474,7 @@ int ipa3_send(struct ipa3_sys_context *sys, int fail_dma_wrap = 0; uint size; u32 mem_flag = GFP_ATOMIC; int ipa_ep_idx; struct ipa_gsi_ep_config *gsi_ep_cfg; const struct ipa_gsi_ep_config *gsi_ep_cfg; if (unlikely(!in_atomic)) mem_flag = GFP_KERNEL; Loading @@ -483,16 +482,10 @@ int ipa3_send(struct ipa3_sys_context *sys, size = num_desc * sizeof(struct sps_iovec); if (ipa3_ctx->transport_prototype == IPA_TRANSPORT_TYPE_GSI) { ipa_ep_idx = ipa3_get_ep_mapping(sys->ep->client); if (unlikely(ipa_ep_idx < 0)) { IPAERR("invalid ep_index of client = %d\n", sys->ep->client); return -EFAULT; } gsi_ep_cfg = ipa3_get_gsi_ep_info(ipa_ep_idx); gsi_ep_cfg = ipa3_get_gsi_ep_info(sys->ep->client); if (unlikely(!gsi_ep_cfg)) { IPAERR("failed to get gsi EP config of ep_idx=%d\n", ipa_ep_idx); IPAERR("failed to get gsi EP config for client=%d\n", sys->ep->client); return -EFAULT; } if (unlikely(num_desc > gsi_ep_cfg->ipa_if_tlv)) { Loading Loading @@ -1723,7 +1716,7 @@ int ipa3_tx_dp(enum ipa_client_type dst, struct sk_buff *skb, struct ipa3_sys_context *sys; int src_ep_idx; int num_frags, f; struct ipa_gsi_ep_config *gsi_ep; const struct ipa_gsi_ep_config *gsi_ep; if (unlikely(!ipa3_ctx)) { IPAERR("IPA3 driver was not initialized\n"); Loading Loading @@ -1777,7 +1770,7 @@ int ipa3_tx_dp(enum ipa_client_type dst, struct sk_buff *skb, * 2 descriptors are needed for IP_PACKET_INIT and TAG_STATUS. * 1 descriptor needed for the linear portion of skb. */ gsi_ep = ipa3_get_gsi_ep_info(src_ep_idx); gsi_ep = ipa3_get_gsi_ep_info(ipa3_ctx->ep[src_ep_idx].client); if (gsi_ep && (num_frags + 3 > gsi_ep->ipa_if_tlv)) { if (skb_linearize(skb)) { IPAERR("Failed to linear skb with %d frags\n", Loading Loading @@ -3958,7 +3951,7 @@ static int ipa_gsi_setup_channel(struct ipa_sys_connect_params *in, struct gsi_evt_ring_props gsi_evt_ring_props; struct gsi_chan_props gsi_channel_props; union __packed gsi_channel_scratch ch_scratch; struct ipa_gsi_ep_config *gsi_ep_info; const struct ipa_gsi_ep_config *gsi_ep_info; dma_addr_t dma_addr; dma_addr_t evt_dma_addr; int result; Loading Loading @@ -4021,9 +4014,10 @@ static int ipa_gsi_setup_channel(struct ipa_sys_connect_params *in, gsi_channel_props.max_re_expected = ep->sys->rx_pool_sz; } gsi_ep_info = ipa3_get_gsi_ep_info(ipa3_get_ep_mapping(ep->client)); gsi_ep_info = ipa3_get_gsi_ep_info(ep->client); if (!gsi_ep_info) { IPAERR("Invalid ep number\n"); IPAERR("Failed getting GSI EP info for client=%d\n", ep->client); result = -EINVAL; goto fail_get_gsi_ep_info; } else Loading Loading
drivers/platform/msm/ipa/ipa_api.c +4 −4 Original line number Diff line number Diff line /* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -2510,15 +2510,15 @@ EXPORT_SYMBOL(ipa_create_wdi_mapping); /** * ipa_get_gsi_ep_info() - provide gsi ep information * @ipa_ep_idx: IPA endpoint index * @client: IPA client type * * Return value: pointer to ipa_gsi_ep_info */ struct ipa_gsi_ep_config *ipa_get_gsi_ep_info(int ipa_ep_idx) const struct ipa_gsi_ep_config *ipa_get_gsi_ep_info(enum ipa_client_type client) { if (!ipa_api_ctrl || !ipa_api_ctrl->ipa_get_gsi_ep_info) return NULL; return ipa_api_ctrl->ipa_get_gsi_ep_info(ipa_ep_idx); return ipa_api_ctrl->ipa_get_gsi_ep_info(client); } EXPORT_SYMBOL(ipa_get_gsi_ep_info); Loading
drivers/platform/msm/ipa/ipa_api.h +3 −2 Original line number Diff line number Diff line /* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved. /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -331,7 +331,8 @@ struct ipa_api_controller { int (*ipa_create_wdi_mapping)(u32 num_buffers, struct ipa_wdi_buffer_info *info); struct ipa_gsi_ep_config *(*ipa_get_gsi_ep_info)(int ipa_ep_idx); const struct ipa_gsi_ep_config *(*ipa_get_gsi_ep_info) (enum ipa_client_type client); int (*ipa_register_ipa_ready_cb)(void (*ipa_ready_cb)(void *user_data), void *user_data); Loading
drivers/platform/msm/ipa/ipa_v2/ipa_utils.c +2 −1 Original line number Diff line number Diff line Loading @@ -4929,7 +4929,8 @@ int ipa2_disable_apps_wan_cons_deaggr(uint32_t agg_size, uint32_t agg_count) return res; } static struct ipa_gsi_ep_config *ipa2_get_gsi_ep_info(int ipa_ep_idx) static const struct ipa_gsi_ep_config *ipa2_get_gsi_ep_info (enum ipa_client_type client) { IPAERR("Not supported for IPA 2.x\n"); return NULL; Loading
drivers/platform/msm/ipa/ipa_v3/ipa_client.c +2 −4 Original line number Diff line number Diff line Loading @@ -1152,8 +1152,7 @@ int ipa3_request_gsi_channel(struct ipa_request_gsi_channel_params *params, struct ipahal_reg_ep_cfg_status ep_status; unsigned long gsi_dev_hdl; enum gsi_status gsi_res; struct ipa_gsi_ep_config gsi_ep_cfg; struct ipa_gsi_ep_config *gsi_ep_cfg_ptr = &gsi_ep_cfg; const struct ipa_gsi_ep_config *gsi_ep_cfg_ptr; IPADBG("entry\n"); if (params == NULL || out_params == NULL || Loading Loading @@ -1227,8 +1226,7 @@ int ipa3_request_gsi_channel(struct ipa_request_gsi_channel_params *params, goto write_evt_scratch_fail; } memset(gsi_ep_cfg_ptr, 0, sizeof(struct ipa_gsi_ep_config)); gsi_ep_cfg_ptr = ipa_get_gsi_ep_info(ipa_ep_idx); gsi_ep_cfg_ptr = ipa3_get_gsi_ep_info(ep->client); params->chan_params.evt_ring_hdl = ep->gsi_evt_ring_hdl; params->chan_params.ch_id = gsi_ep_cfg_ptr->ipa_gsi_chan_num; gsi_res = gsi_alloc_channel(¶ms->chan_params, gsi_dev_hdl, Loading
drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +10 −16 Original line number Diff line number Diff line Loading @@ -474,8 +474,7 @@ int ipa3_send(struct ipa3_sys_context *sys, int fail_dma_wrap = 0; uint size; u32 mem_flag = GFP_ATOMIC; int ipa_ep_idx; struct ipa_gsi_ep_config *gsi_ep_cfg; const struct ipa_gsi_ep_config *gsi_ep_cfg; if (unlikely(!in_atomic)) mem_flag = GFP_KERNEL; Loading @@ -483,16 +482,10 @@ int ipa3_send(struct ipa3_sys_context *sys, size = num_desc * sizeof(struct sps_iovec); if (ipa3_ctx->transport_prototype == IPA_TRANSPORT_TYPE_GSI) { ipa_ep_idx = ipa3_get_ep_mapping(sys->ep->client); if (unlikely(ipa_ep_idx < 0)) { IPAERR("invalid ep_index of client = %d\n", sys->ep->client); return -EFAULT; } gsi_ep_cfg = ipa3_get_gsi_ep_info(ipa_ep_idx); gsi_ep_cfg = ipa3_get_gsi_ep_info(sys->ep->client); if (unlikely(!gsi_ep_cfg)) { IPAERR("failed to get gsi EP config of ep_idx=%d\n", ipa_ep_idx); IPAERR("failed to get gsi EP config for client=%d\n", sys->ep->client); return -EFAULT; } if (unlikely(num_desc > gsi_ep_cfg->ipa_if_tlv)) { Loading Loading @@ -1723,7 +1716,7 @@ int ipa3_tx_dp(enum ipa_client_type dst, struct sk_buff *skb, struct ipa3_sys_context *sys; int src_ep_idx; int num_frags, f; struct ipa_gsi_ep_config *gsi_ep; const struct ipa_gsi_ep_config *gsi_ep; if (unlikely(!ipa3_ctx)) { IPAERR("IPA3 driver was not initialized\n"); Loading Loading @@ -1777,7 +1770,7 @@ int ipa3_tx_dp(enum ipa_client_type dst, struct sk_buff *skb, * 2 descriptors are needed for IP_PACKET_INIT and TAG_STATUS. * 1 descriptor needed for the linear portion of skb. */ gsi_ep = ipa3_get_gsi_ep_info(src_ep_idx); gsi_ep = ipa3_get_gsi_ep_info(ipa3_ctx->ep[src_ep_idx].client); if (gsi_ep && (num_frags + 3 > gsi_ep->ipa_if_tlv)) { if (skb_linearize(skb)) { IPAERR("Failed to linear skb with %d frags\n", Loading Loading @@ -3958,7 +3951,7 @@ static int ipa_gsi_setup_channel(struct ipa_sys_connect_params *in, struct gsi_evt_ring_props gsi_evt_ring_props; struct gsi_chan_props gsi_channel_props; union __packed gsi_channel_scratch ch_scratch; struct ipa_gsi_ep_config *gsi_ep_info; const struct ipa_gsi_ep_config *gsi_ep_info; dma_addr_t dma_addr; dma_addr_t evt_dma_addr; int result; Loading Loading @@ -4021,9 +4014,10 @@ static int ipa_gsi_setup_channel(struct ipa_sys_connect_params *in, gsi_channel_props.max_re_expected = ep->sys->rx_pool_sz; } gsi_ep_info = ipa3_get_gsi_ep_info(ipa3_get_ep_mapping(ep->client)); gsi_ep_info = ipa3_get_gsi_ep_info(ep->client); if (!gsi_ep_info) { IPAERR("Invalid ep number\n"); IPAERR("Failed getting GSI EP info for client=%d\n", ep->client); result = -EINVAL; goto fail_get_gsi_ep_info; } else Loading