From fdd8f35392e4301a729823f6257069fabf707abb Mon Sep 17 00:00:00 2001 From: Aparna Annapragada Date: Thu, 27 Oct 2022 10:59:52 +0530 Subject: [PATCH 1/2] msm: ipa3: Adding check for odl stats Adding Null check while getting odl stats change-Id: Ic1692cc4b1a1d3c8b559b20fbb2e1371e0b9f9b2 Signed-off-by: Aparna Annapragada --- drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c b/drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c index b07fc3554ef5..43884914263e 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_debugfs.c @@ -1398,6 +1398,11 @@ static ssize_t ipa3_read_odlstats(struct file *file, char __user *ubuf, int nbytes; int cnt = 0; + if (!ipa3_odl_ctx) { + IPADBG("ODL stats not supported\n"); + return 0; + } + nbytes = scnprintf(dbg_buff, IPA_MAX_MSG_LEN, "ODL received pkt =%u\n" "ODL processed pkt to DIAG=%u\n" From 96bf8d6ea077498e47be7949c71f5590fd1e2462 Mon Sep 17 00:00:00 2001 From: Ashok Vuyyuru Date: Mon, 14 Nov 2022 12:30:53 +0530 Subject: [PATCH 2/2] msm: ipa3: Adding changes to retry page allocation in WQ Currently WQ was exiting when page allocation was failed, due to that number of WQ schedule will increase. To avoid this retrying the page allocation in same WQ context. Change-Id: Iefb85ae1552aa595a0959664c3ba55f6aa742551 Signed-off-by: Ashok Vuyyuru --- drivers/platform/msm/ipa/ipa_v3/ipa_dp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c index 3d829bedd7c4..53d0644578b4 100644 --- a/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c +++ b/drivers/platform/msm/ipa/ipa_v3/ipa_dp.c @@ -2,6 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -2146,8 +2147,8 @@ begin: goto fail_kmem_cache_alloc; rx_pkt = ipa3_alloc_rx_pkt_page(GFP_KERNEL, true); if (unlikely(!rx_pkt)) { - IPAERR("ipa3_alloc_rx_pkt_page fails\n"); - break; + IPAERR_RL("ipa3_alloc_rx_pkt_page fails\n"); + goto fail_kmem_cache_alloc; } rx_pkt->sys = sys; sys->repl->cache[curr] = rx_pkt;