Merge tag 'LA.VENDOR.13.2.0.r1-22900-KAILUA.QSSI15.0' into staging/lineage-21.0_merge-LA.VENDOR.13.2.0.r1-22900-KAILUA.QSSI15.0

LA.VENDOR.13.2.0.r1-22900-KAILUA.QSSI15.0

# By Ashok Vuyyuru (1) and others
# Via Gerrit - the friendly Code Review server (2) and others
* tag 'LA.VENDOR.13.2.0.r1-22900-KAILUA.QSSI15.0':
  msm: ipa3: ODL endpoint configuration for bengal
  msm: ipa3: Use atomic map API to avoid sleep in atomic context
  msm: ipa3: disable rndis over usb tethering in case of APQ-DMA.

Change-Id: I35a12406309fb681b3cfd579a24684df6fc9ab28
diff --git a/drivers/platform/msm/ipa/ipa_clients/ipa_clients_manager.c b/drivers/platform/msm/ipa/ipa_clients/ipa_clients_manager.c
index 711b334..00e32c2 100644
--- a/drivers/platform/msm/ipa/ipa_clients/ipa_clients_manager.c
+++ b/drivers/platform/msm/ipa/ipa_clients/ipa_clients_manager.c
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (c) 2020, The Linux Foundation. All rights reserved.
- * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <linux/init.h>
@@ -15,7 +15,11 @@
 {
 	pr_info("IPA clients manager init\n");
 
-	ipa3_usb_init();
+	/*RNDIS over USB tethering is not supported for APQ targets.
+	Initialize USB & RMNET drivers only for non-APQ-DMA targets.*/
+	if (!ipa3_ctx->ipa_config_is_apq_dma) {
+		ipa3_usb_init();
+	}
 
 	ipa_wdi3_register();
 
@@ -45,7 +49,9 @@
 {
 	pr_debug("IPA clients manger exit\n");
 
-	ipa3_usb_exit();
+	if (!ipa3_ctx->ipa_config_is_apq_dma) {
+		ipa3_usb_exit();
+	}
 }
 module_exit(ipa_clients_manager_exit);
 
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa.c b/drivers/platform/msm/ipa/ipa_v3/ipa.c
index d20b59e..417fe33 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa.c
@@ -12107,7 +12107,7 @@
 	if (cb->is_cache_coherent)
 		prot |= IOMMU_CACHE;
 
-	return iommu_map(domain, iova, paddr, size, prot);
+	return iommu_map_atomic(domain, iova, paddr, size, prot);
 }
 EXPORT_SYMBOL(ipa3_iommu_map);
 
diff --git a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
index 504b9af..727cc43 100644
--- a/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
+++ b/drivers/platform/msm/ipa/ipa_v3/ipa_utils.c
@@ -1,7 +1,7 @@
 // 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.
+ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <net/ip.h>
@@ -2475,6 +2475,12 @@
 			IPA_DPS_HPS_SEQ_TYPE_INVALID,
 			QMB_MASTER_SELECT_DDR,
 			{ 12, 4, 4, 4, IPA_EE_AP, GSI_ESCAPE_BUF_ONLY}, IPA_TX_INSTANCE_NA },
+	[IPA_4_2][IPA_CLIENT_ODL_DPL_CONS]	= {
+			true, IPA_v4_2_GROUP_UL_DL,
+			false,
+			IPA_DPS_HPS_SEQ_TYPE_INVALID,
+			QMB_MASTER_SELECT_DDR,
+			{ 13, 10, 6, 6, IPA_EE_AP, GSI_ESCAPE_BUF_ONLY} },
 	[IPA_4_2][IPA_CLIENT_APPS_LAN_CONS]       = {
 			true, IPA_v4_2_GROUP_UL_DL,
 			false,
@@ -2499,12 +2505,6 @@
 			IPA_DPS_HPS_SEQ_TYPE_INVALID,
 			QMB_MASTER_SELECT_DDR,
 			{ 10, 2, 6, 6, IPA_EE_Q6,  GSI_ESCAPE_BUF_ONLY}, IPA_TX_INSTANCE_NA },
-	[IPA_4_2][IPA_CLIENT_Q6_LTE_WIFI_AGGR_CONS] = {
-			true, IPA_v4_2_GROUP_UL_DL,
-			false,
-			IPA_DPS_HPS_SEQ_TYPE_INVALID,
-			QMB_MASTER_SELECT_DDR,
-			{ 13, 4, 6, 6, IPA_EE_Q6, GSI_ESCAPE_BUF_ONLY}, IPA_TX_INSTANCE_NA },
 	[IPA_4_2][IPA_CLIENT_ETHERNET_CONS] = {
 			true, IPA_v4_2_GROUP_UL_DL,
 			false,