Преглед изворни кода

msm: ipa3: Remove suspend bit for ep consumer

During usb client disconnect, ep suspend bit was
set on usb consumer pipe which was not removing
during usb client reconnect and causing stall
on the pipe. Now Removing ep suspend during
client disconnect.

Change-Id: I5fbb646ab9eed8cc7d7def7f318a8eab144ad2ac
Signed-off-by: Piyush Dhyani <[email protected]>
Piyush Dhyani пре 4 година
родитељ
комит
35fd44b9e8
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7 0
      drivers/platform/msm/ipa/ipa_v3/ipa_client.c

+ 7 - 0
drivers/platform/msm/ipa/ipa_v3/ipa_client.c

@@ -1469,6 +1469,7 @@ EXPORT_SYMBOL(ipa3_xdci_ep_delay_rm);
 int ipa3_xdci_disconnect(u32 clnt_hdl, bool should_force_clear, u32 qmi_req_id)
 int ipa3_xdci_disconnect(u32 clnt_hdl, bool should_force_clear, u32 qmi_req_id)
 {
 {
 	struct ipa3_ep_context *ep;
 	struct ipa3_ep_context *ep;
+	struct ipa_ep_cfg_ctrl ep_cfg_ctrl;
 	int result;
 	int result;
 	u32 source_pipe_bitmask = 0;
 	u32 source_pipe_bitmask = 0;
 	u32 source_pipe_reg_idx = 0;
 	u32 source_pipe_reg_idx = 0;
@@ -1509,6 +1510,12 @@ int ipa3_xdci_disconnect(u32 clnt_hdl, bool should_force_clear, u32 qmi_req_id)
 				result);
 				result);
 			goto stop_chan_fail;
 			goto stop_chan_fail;
 		}
 		}
+		if (ipa3_ctx->ipa_hw_type < IPA_HW_v4_0) {
+			/* Unsuspend the pipe */
+			memset(&ep_cfg_ctrl, 0, sizeof(struct ipa_ep_cfg_ctrl));
+			ep_cfg_ctrl.ipa_ep_suspend = false;
+			ipa3_cfg_ep_ctrl(clnt_hdl, &ep_cfg_ctrl);
+		}
 	}
 	}
 	IPA_ACTIVE_CLIENTS_DEC_EP(ipa3_get_client_mapping(clnt_hdl));
 	IPA_ACTIVE_CLIENTS_DEC_EP(ipa3_get_client_mapping(clnt_hdl));