Loading drivers/platform/msm/ipa/ipa_clients/ipa_gsb.c +3 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include <linux/debugfs.h> Loading Loading @@ -762,8 +763,6 @@ static void ipa_gsb_tx_dp_notify(void *priv, enum ipa_dp_evt_type evt, /* fetch iface handle from header */ mux_hdr = (struct ipa_gsb_mux_hdr *)skb->data; /* change to host order */ *(u32 *)mux_hdr = ntohl(*(u32 *)mux_hdr); hdl = mux_hdr->iface_hdl; if ((hdl < 0) || (hdl >= MAX_SUPPORTED_IFACE) || !ipa_gsb_ctx->iface[hdl]) { Loading Loading @@ -1215,9 +1214,9 @@ static int ipa_bridge_tx_dp_internal(u32 hdl, struct sk_buff *skb, /* add 4 byte header for mux */ mux_hdr = (struct ipa_gsb_mux_hdr *)skb_push(skb, sizeof(struct ipa_gsb_mux_hdr)); memset(mux_hdr, 0, sizeof(struct ipa_gsb_mux_hdr)); mux_hdr->iface_hdl = (u8)hdl; /* change to network order */ *(u32 *)mux_hdr = htonl(*(u32 *)mux_hdr); mux_hdr->qmap_id = (u8)ipa3_get_qmap_id(ipa_gsb_ctx->prod_hdl); ret = ipa_tx_dp(IPA_CLIENT_ODU_PROD, skb, metadata); if (ret) { Loading drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c +4 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifdef CONFIG_DEBUG_FS Loading Loading @@ -1359,6 +1360,7 @@ static ssize_t ipa3_read_stats(struct file *file, char __user *ubuf, "flow_disable=%u\n" "rx_page_drop_cnt=%u\n" "lower_order=%u\n", "pipe_setup_fail_cnt=%u\n", ipa3_ctx->stats.tx_sw_pkts, ipa3_ctx->stats.tx_hw_pkts, ipa3_ctx->stats.tx_non_linear, Loading @@ -1376,7 +1378,8 @@ static ssize_t ipa3_read_stats(struct file *file, char __user *ubuf, ipa3_ctx->stats.flow_enable, ipa3_ctx->stats.flow_disable, ipa3_ctx->stats.rx_page_drop_cnt, ipa3_ctx->stats.lower_order ipa3_ctx->stats.lower_order, ipa3_ctx->stats.pipe_setup_fail_cnt ); cnt += nbytes; Loading drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +9 −4 Original line number Diff line number Diff line Loading @@ -1383,10 +1383,14 @@ int ipa3_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) fail_gen3: ipa3_disable_data_path(ipa_ep_idx); fail_repl: ep->sys->repl_hdlr = ipa3_replenish_rx_cache; if (IPA_CLIENT_IS_CONS(ep->client)) ipa3_cleanup_rx(ep->sys); if(ep->sys->repl) { ep->sys->repl->capacity = 0; kfree(ep->sys->repl); ep->sys->repl = NULL; } fail_page_recycle_repl: if (ep->sys->page_recycle_repl) { ep->sys->page_recycle_repl->capacity = 0; Loading @@ -1410,6 +1414,7 @@ int ipa3_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) fail_and_disable_clocks: IPA_ACTIVE_CLIENTS_DEC_EP(sys_in->client); fail_gen: IPA_STATS_INC_CNT(ipa3_ctx->stats.pipe_setup_fail_cnt); return result; } Loading drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c +11 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include "ipa_i.h" Loading Loading @@ -94,8 +95,10 @@ static int ipa3_hdr_proc_ctx_to_hw_format(struct ipa_mem_buffer *mem, if (unlikely(!entry->hdr || !entry->hdr->offset_entry || !entry->offset_entry || entry->hdr->hdr_len == 0 || entry->hdr->hdr_len > ipa_hdr_bin_sz[IPA_HDR_BIN_MAX - 1])) entry->hdr->hdr_len > ipa_hdr_bin_sz[IPA_HDR_BIN_MAX - 1])) { IPAERR_RL("Found invalid hdr entry\n"); return -EINVAL; } ret = ipahal_cp_proc_ctx_to_hw_buff(entry->type, mem->base, entry->offset_entry->offset, Loading Loading @@ -128,6 +131,7 @@ static int ipa3_generate_hdr_proc_ctx_hw_tbl(u64 hdr_sys_addr, { u64 hdr_base_addr; gfp_t flag = GFP_KERNEL; int ret; mem->size = (ipa3_ctx->hdr_proc_ctx_tbl.end) ? : 4; Loading Loading @@ -156,7 +160,12 @@ static int ipa3_generate_hdr_proc_ctx_hw_tbl(u64 hdr_sys_addr, memset(aligned_mem->base, 0, aligned_mem->size); hdr_base_addr = (ipa3_ctx->hdr_tbl_lcl) ? IPA_MEM_PART(apps_hdr_ofst) : hdr_sys_addr; return ipa3_hdr_proc_ctx_to_hw_format(aligned_mem, hdr_base_addr); ret = ipa3_hdr_proc_ctx_to_hw_format(aligned_mem, hdr_base_addr); if (ret) { dma_free_coherent(ipa3_ctx->pdev, mem->size, mem->base, mem->phys_base); return ret; } return ret; } /** Loading drivers/platform/msm/ipa/ipa_v3/ipa_i.h +3 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef _IPA3_I_H_ Loading Loading @@ -1449,6 +1450,7 @@ struct ipa3_stats { u32 rx_page_drop_cnt; struct ipa3_page_recycle_stats page_recycle_stats[2]; u64 lower_order; u32 pipe_setup_fail_cnt; }; /* offset for each stats */ Loading Loading @@ -2813,6 +2815,7 @@ bool ipa3_is_client_handle_valid(u32 clnt_hdl); enum ipa_client_type ipa3_get_client_mapping(int pipe_idx); enum ipa_client_type ipa3_get_client_by_pipe(int pipe_idx); u32 ipa3_get_qmap_id(int pipe_idx); void ipa_init_ep_flt_bitmap(void); Loading Loading
drivers/platform/msm/ipa/ipa_clients/ipa_gsb.c +3 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include <linux/debugfs.h> Loading Loading @@ -762,8 +763,6 @@ static void ipa_gsb_tx_dp_notify(void *priv, enum ipa_dp_evt_type evt, /* fetch iface handle from header */ mux_hdr = (struct ipa_gsb_mux_hdr *)skb->data; /* change to host order */ *(u32 *)mux_hdr = ntohl(*(u32 *)mux_hdr); hdl = mux_hdr->iface_hdl; if ((hdl < 0) || (hdl >= MAX_SUPPORTED_IFACE) || !ipa_gsb_ctx->iface[hdl]) { Loading Loading @@ -1215,9 +1214,9 @@ static int ipa_bridge_tx_dp_internal(u32 hdl, struct sk_buff *skb, /* add 4 byte header for mux */ mux_hdr = (struct ipa_gsb_mux_hdr *)skb_push(skb, sizeof(struct ipa_gsb_mux_hdr)); memset(mux_hdr, 0, sizeof(struct ipa_gsb_mux_hdr)); mux_hdr->iface_hdl = (u8)hdl; /* change to network order */ *(u32 *)mux_hdr = htonl(*(u32 *)mux_hdr); mux_hdr->qmap_id = (u8)ipa3_get_qmap_id(ipa_gsb_ctx->prod_hdl); ret = ipa_tx_dp(IPA_CLIENT_ODU_PROD, skb, metadata); if (ret) { Loading
drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c +4 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifdef CONFIG_DEBUG_FS Loading Loading @@ -1359,6 +1360,7 @@ static ssize_t ipa3_read_stats(struct file *file, char __user *ubuf, "flow_disable=%u\n" "rx_page_drop_cnt=%u\n" "lower_order=%u\n", "pipe_setup_fail_cnt=%u\n", ipa3_ctx->stats.tx_sw_pkts, ipa3_ctx->stats.tx_hw_pkts, ipa3_ctx->stats.tx_non_linear, Loading @@ -1376,7 +1378,8 @@ static ssize_t ipa3_read_stats(struct file *file, char __user *ubuf, ipa3_ctx->stats.flow_enable, ipa3_ctx->stats.flow_disable, ipa3_ctx->stats.rx_page_drop_cnt, ipa3_ctx->stats.lower_order ipa3_ctx->stats.lower_order, ipa3_ctx->stats.pipe_setup_fail_cnt ); cnt += nbytes; Loading
drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +9 −4 Original line number Diff line number Diff line Loading @@ -1383,10 +1383,14 @@ int ipa3_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) fail_gen3: ipa3_disable_data_path(ipa_ep_idx); fail_repl: ep->sys->repl_hdlr = ipa3_replenish_rx_cache; if (IPA_CLIENT_IS_CONS(ep->client)) ipa3_cleanup_rx(ep->sys); if(ep->sys->repl) { ep->sys->repl->capacity = 0; kfree(ep->sys->repl); ep->sys->repl = NULL; } fail_page_recycle_repl: if (ep->sys->page_recycle_repl) { ep->sys->page_recycle_repl->capacity = 0; Loading @@ -1410,6 +1414,7 @@ int ipa3_setup_sys_pipe(struct ipa_sys_connect_params *sys_in, u32 *clnt_hdl) fail_and_disable_clocks: IPA_ACTIVE_CLIENTS_DEC_EP(sys_in->client); fail_gen: IPA_STATS_INC_CNT(ipa3_ctx->stats.pipe_setup_fail_cnt); return result; } Loading
drivers/platform/msm/ipa/ipa_v3/ipa_hdr.c +11 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #include "ipa_i.h" Loading Loading @@ -94,8 +95,10 @@ static int ipa3_hdr_proc_ctx_to_hw_format(struct ipa_mem_buffer *mem, if (unlikely(!entry->hdr || !entry->hdr->offset_entry || !entry->offset_entry || entry->hdr->hdr_len == 0 || entry->hdr->hdr_len > ipa_hdr_bin_sz[IPA_HDR_BIN_MAX - 1])) entry->hdr->hdr_len > ipa_hdr_bin_sz[IPA_HDR_BIN_MAX - 1])) { IPAERR_RL("Found invalid hdr entry\n"); return -EINVAL; } ret = ipahal_cp_proc_ctx_to_hw_buff(entry->type, mem->base, entry->offset_entry->offset, Loading Loading @@ -128,6 +131,7 @@ static int ipa3_generate_hdr_proc_ctx_hw_tbl(u64 hdr_sys_addr, { u64 hdr_base_addr; gfp_t flag = GFP_KERNEL; int ret; mem->size = (ipa3_ctx->hdr_proc_ctx_tbl.end) ? : 4; Loading Loading @@ -156,7 +160,12 @@ static int ipa3_generate_hdr_proc_ctx_hw_tbl(u64 hdr_sys_addr, memset(aligned_mem->base, 0, aligned_mem->size); hdr_base_addr = (ipa3_ctx->hdr_tbl_lcl) ? IPA_MEM_PART(apps_hdr_ofst) : hdr_sys_addr; return ipa3_hdr_proc_ctx_to_hw_format(aligned_mem, hdr_base_addr); ret = ipa3_hdr_proc_ctx_to_hw_format(aligned_mem, hdr_base_addr); if (ret) { dma_free_coherent(ipa3_ctx->pdev, mem->size, mem->base, mem->phys_base); return ret; } return ret; } /** Loading
drivers/platform/msm/ipa/ipa_v3/ipa_i.h +3 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef _IPA3_I_H_ Loading Loading @@ -1449,6 +1450,7 @@ struct ipa3_stats { u32 rx_page_drop_cnt; struct ipa3_page_recycle_stats page_recycle_stats[2]; u64 lower_order; u32 pipe_setup_fail_cnt; }; /* offset for each stats */ Loading Loading @@ -2813,6 +2815,7 @@ bool ipa3_is_client_handle_valid(u32 clnt_hdl); enum ipa_client_type ipa3_get_client_mapping(int pipe_idx); enum ipa_client_type ipa3_get_client_by_pipe(int pipe_idx); u32 ipa3_get_qmap_id(int pipe_idx); void ipa_init_ep_flt_bitmap(void); Loading