Browse Source

Merge "msm: ipa3: set HOLB on eth-tx when getting disconnect"

qctecmdr 3 years ago
parent
commit
cdcf7c86c2

+ 16 - 0
drivers/platform/msm/ipa/ipa_clients/ipa_eth.c

@@ -682,6 +682,7 @@ static int ipa_eth_client_disconn_pipes_internal(struct ipa_eth_client *client)
 {
 	int rc;
 	struct ipa_eth_client_pipe_info *pipe;
+	struct ipa_ep_cfg_holb holb;
 
 	/* validate user input */
 	if (!client) {
@@ -702,6 +703,21 @@ static int ipa_eth_client_disconn_pipes_internal(struct ipa_eth_client *client)
 		client->client_type, client->inst_id,
 		client->traffic_type);
 	mutex_lock(&ipa_eth_ctx->lock);
+
+	/* set holb on tx pipes first */
+	list_for_each_entry(pipe, &client->pipe_list,
+		link) {
+		if (pipe->dir == IPA_ETH_PIPE_DIR_TX)
+		{
+			IPA_ETH_DBG("Set holb on pipe = %d, pipe->dir = %d \n",
+				ipa_get_ep_mapping(ipa_eth_get_ipa_client_type_from_pipe(pipe)),
+				pipe->dir);
+			holb.en = 1;
+			holb.tmr_val = 0;
+			ipa3_cfg_ep_holb(ipa_get_ep_mapping(ipa_eth_get_ipa_client_type_from_pipe(pipe)), &holb);
+		}
+	}
+
 	list_for_each_entry(pipe, &client->pipe_list,
 		link) {
 		rc = ipa_eth_client_disconnect_pipe(pipe);

+ 2 - 2
drivers/platform/msm/ipa/ipa_v3/ipahal/ipahal_nat.c

@@ -455,7 +455,7 @@ int ipahal_nat_is_entry_zeroed(enum ipahal_nat_type nat_type, void *entry,
 		"requested NAT type %d is invalid\n", nat_type))
 		return -EINVAL;
 
-	IPAHAL_DBG("Determine whether the entry is zeroed for NAT type=%s\n",
+	IPAHAL_DBG_LOW("Determine whether the entry is zeroed for NAT type=%s\n",
 		ipahal_nat_type_str(nat_type));
 
 	nat_ptr =
@@ -463,7 +463,7 @@ int ipahal_nat_is_entry_zeroed(enum ipahal_nat_type nat_type, void *entry,
 
 	*entry_zeroed = nat_ptr->is_entry_zeroed(entry);
 
-	IPAHAL_DBG("The entry is %szeroed\n", (*entry_zeroed) ? "" : "not ");
+	IPAHAL_DBG_LOW("The entry is %szeroed\n", (*entry_zeroed) ? "" : "not ");
 
 	return 0;
 }