Răsfoiți Sursa

msm: ipa3: fix the aggregation disablement

Fixing aggregation disablement on LOW_LAT_CTRL pipe

Change-Id: Ic5705783209d9a158c03429c7f4638ea8a9646b1
Signed-off-by: Michael Adisumarta <[email protected]>
Michael Adisumarta 4 ani în urmă
părinte
comite
0ae88365be

+ 7 - 5
drivers/platform/msm/ipa/ipa_v3/ipa_dp.c

@@ -4007,15 +4007,10 @@ static int ipa3_assign_policy(struct ipa_sys_connect_params *in,
 				IPA_GENERIC_RX_BUFF_BASE_SZ);
 			sys->get_skb = ipa3_get_skb_ipa_rx;
 			sys->free_skb = ipa3_free_skb_rx;
-			in->ipa_ep_cfg.aggr.aggr_en = IPA_ENABLE_AGGR;
 			if (in->client == IPA_CLIENT_APPS_WAN_COAL_CONS)
 				in->ipa_ep_cfg.aggr.aggr = IPA_COALESCE;
 			else
 				in->ipa_ep_cfg.aggr.aggr = IPA_GENERIC;
-			if (in->client == IPA_CLIENT_APPS_LAN_CONS ||
-				!in->ext_ioctl_v2)
-				in->ipa_ep_cfg.aggr.aggr_time_limit =
-					IPA_GENERIC_AGGR_TIME_LIMIT;
 			if (in->client == IPA_CLIENT_APPS_LAN_CONS) {
 				INIT_WORK(&sys->repl_work, ipa3_wq_repl_rx);
 				sys->pyld_hdlr = ipa3_lan_rx_pyld_hdlr;
@@ -4025,12 +4020,19 @@ static int ipa3_assign_policy(struct ipa_sys_connect_params *in,
 					ipa3_recycle_rx_wrapper;
 				sys->rx_pool_sz =
 					ipa3_ctx->lan_rx_ring_size;
+				in->ipa_ep_cfg.aggr.aggr_en = IPA_ENABLE_AGGR;
 				in->ipa_ep_cfg.aggr.aggr_byte_limit =
 				IPA_GENERIC_AGGR_BYTE_LIMIT;
 				in->ipa_ep_cfg.aggr.aggr_pkt_limit =
 				IPA_GENERIC_AGGR_PKT_LIMIT;
+				in->ipa_ep_cfg.aggr.aggr_time_limit =
+					IPA_GENERIC_AGGR_TIME_LIMIT;
 			} else if (in->client == IPA_CLIENT_APPS_WAN_CONS ||
 				in->client == IPA_CLIENT_APPS_WAN_COAL_CONS) {
+				in->ipa_ep_cfg.aggr.aggr_en = IPA_ENABLE_AGGR;
+				if (!in->ext_ioctl_v2)
+					in->ipa_ep_cfg.aggr.aggr_time_limit =
+						IPA_GENERIC_AGGR_TIME_LIMIT;
 				if (ipa3_ctx->ipa_wan_skb_page
 					&& in->napi_obj) {
 					INIT_WORK(&sys->repl_work,

+ 0 - 5
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_reg.c

@@ -5031,11 +5031,6 @@ void ipahal_get_aggr_force_close_valmask(int ep_idx,
 		return;
 	}
 
-	if (ep_idx > (sizeof(valmask->val) * 8 - 1)) {
-		IPAHAL_ERR("too big ep_idx %d\n", ep_idx);
-		ipa_assert();
-		return;
-	}
 	IPA_SETFIELD_IN_REG(valmask->val,
 		IPA_BIT_MAP_CELL_MSK(ep_idx),
 		shft, bmsk);

+ 9 - 2
drivers/platform/msm/ipa/ipa_v3/rmnet_ipa.c

@@ -1792,6 +1792,7 @@ static int ipa3_setup_apps_wan_cons_pipes(
 	struct ipa_sys_connect_params *ipa_wan_ep_cfg;
 	int ep_idx, coal_ep_idx;
 	int rc = 0;
+	int wan_hdl;
 
 	if (ingress_param->pipe_setup_status == IPA_PIPE_SETUP_EXISTS)
 		return rc;
@@ -1892,8 +1893,14 @@ static int ipa3_setup_apps_wan_cons_pipes(
 	ipa_wan_ep_cfg->int_modc = ingress_param->int_modc;
 	ipa_wan_ep_cfg->buff_size = ingress_param->buff_size;
 
-	rc = ipa_setup_sys_pipe(&rmnet_ipa3_ctx->ipa_to_apps_ep_cfg,
-		&rmnet_ipa3_ctx->ipa3_to_apps_hdl);
+	/* Pass dummy handle if coal is already setup to avoid overriding */
+	if (ipa_wan_ep_cfg->client == IPA_CLIENT_APPS_WAN_CONS &&
+		(*ingress_eps_mask & IPA_AP_INGRESS_EP_COALS))
+		rc = ipa_setup_sys_pipe(&rmnet_ipa3_ctx->ipa_to_apps_ep_cfg,
+			&wan_hdl);
+	else
+		rc = ipa_setup_sys_pipe(&rmnet_ipa3_ctx->ipa_to_apps_ep_cfg,
+			&rmnet_ipa3_ctx->ipa3_to_apps_hdl);
 
 	if (rc) {
 		pipe_status->status = IPA_PIPE_SETUP_FAILURE;