All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erik Stromdahl <erik.stromdahl@gmail.com>
To: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org,
	ath10k@lists.infradead.org
Cc: Erik Stromdahl <erik.stromdahl@gmail.com>
Subject: [RFC 03/12] ath10k: htc: Changed order of wait target and ep connect
Date: Mon, 14 Nov 2016 17:33:33 +0100	[thread overview]
Message-ID: <1479141222-8493-4-git-send-email-erik.stromdahl@gmail.com> (raw)
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>

This patch changes the order in which the driver waits for the
target to become ready and the service connect of the HTC
control service.

The HTC control service is connected before the driver starts
waiting for the HTC ready control message.

The reason for this is that the HTC ready control message is
transmitted on EP 0 and that sdio/mbox based systems will ignore
messages received on unconnected endpoints.

Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
 drivers/net/wireless/ath/ath10k/htc.c |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index e3f7bf4..7257366 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -606,6 +606,22 @@ int ath10k_htc_wait_target(struct ath10k_htc *htc)
 	u16 credit_count;
 	u16 credit_size;
 
+	/* setup our pseudo HTC control endpoint connection */
+	memset(&conn_req, 0, sizeof(conn_req));
+	memset(&conn_resp, 0, sizeof(conn_resp));
+	conn_req.ep_ops.ep_tx_complete = ath10k_htc_control_tx_complete;
+	conn_req.ep_ops.ep_rx_complete = ath10k_htc_control_rx_complete;
+	conn_req.max_send_queue_depth = ATH10K_NUM_CONTROL_TX_BUFFERS;
+	conn_req.service_id = ATH10K_HTC_SVC_ID_RSVD_CTRL;
+
+	/* connect fake service */
+	status = ath10k_htc_connect_service(htc, &conn_req, &conn_resp);
+	if (status) {
+		ath10k_err(ar, "could not connect to htc service (%d)\n",
+			   status);
+		return status;
+	}
+
 	time_left = wait_for_completion_timeout(&htc->ctl_resp,
 						ATH10K_HTC_WAIT_TIMEOUT_HZ);
 	if (!time_left) {
@@ -665,22 +681,6 @@ int ath10k_htc_wait_target(struct ath10k_htc *htc)
 
 	ath10k_htc_setup_target_buffer_assignments(htc);
 
-	/* setup our pseudo HTC control endpoint connection */
-	memset(&conn_req, 0, sizeof(conn_req));
-	memset(&conn_resp, 0, sizeof(conn_resp));
-	conn_req.ep_ops.ep_tx_complete = ath10k_htc_control_tx_complete;
-	conn_req.ep_ops.ep_rx_complete = ath10k_htc_control_rx_complete;
-	conn_req.max_send_queue_depth = ATH10K_NUM_CONTROL_TX_BUFFERS;
-	conn_req.service_id = ATH10K_HTC_SVC_ID_RSVD_CTRL;
-
-	/* connect fake service */
-	status = ath10k_htc_connect_service(htc, &conn_req, &conn_resp);
-	if (status) {
-		ath10k_err(ar, "could not connect to htc service (%d)\n",
-			   status);
-		return status;
-	}
-
 	return 0;
 }
 
-- 
1.7.9.5

WARNING: multiple messages have this Message-ID (diff)
From: Erik Stromdahl <erik.stromdahl@gmail.com>
To: kvalo@qca.qualcomm.com, linux-wireless@vger.kernel.org,
	ath10k@lists.infradead.org
Cc: Erik Stromdahl <erik.stromdahl@gmail.com>
Subject: [RFC 03/12] ath10k: htc: Changed order of wait target and ep connect
Date: Mon, 14 Nov 2016 17:33:33 +0100	[thread overview]
Message-ID: <1479141222-8493-4-git-send-email-erik.stromdahl@gmail.com> (raw)
In-Reply-To: <1479141222-8493-1-git-send-email-erik.stromdahl@gmail.com>

This patch changes the order in which the driver waits for the
target to become ready and the service connect of the HTC
control service.

The HTC control service is connected before the driver starts
waiting for the HTC ready control message.

The reason for this is that the HTC ready control message is
transmitted on EP 0 and that sdio/mbox based systems will ignore
messages received on unconnected endpoints.

Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
 drivers/net/wireless/ath/ath10k/htc.c |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index e3f7bf4..7257366 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -606,6 +606,22 @@ int ath10k_htc_wait_target(struct ath10k_htc *htc)
 	u16 credit_count;
 	u16 credit_size;
 
+	/* setup our pseudo HTC control endpoint connection */
+	memset(&conn_req, 0, sizeof(conn_req));
+	memset(&conn_resp, 0, sizeof(conn_resp));
+	conn_req.ep_ops.ep_tx_complete = ath10k_htc_control_tx_complete;
+	conn_req.ep_ops.ep_rx_complete = ath10k_htc_control_rx_complete;
+	conn_req.max_send_queue_depth = ATH10K_NUM_CONTROL_TX_BUFFERS;
+	conn_req.service_id = ATH10K_HTC_SVC_ID_RSVD_CTRL;
+
+	/* connect fake service */
+	status = ath10k_htc_connect_service(htc, &conn_req, &conn_resp);
+	if (status) {
+		ath10k_err(ar, "could not connect to htc service (%d)\n",
+			   status);
+		return status;
+	}
+
 	time_left = wait_for_completion_timeout(&htc->ctl_resp,
 						ATH10K_HTC_WAIT_TIMEOUT_HZ);
 	if (!time_left) {
@@ -665,22 +681,6 @@ int ath10k_htc_wait_target(struct ath10k_htc *htc)
 
 	ath10k_htc_setup_target_buffer_assignments(htc);
 
-	/* setup our pseudo HTC control endpoint connection */
-	memset(&conn_req, 0, sizeof(conn_req));
-	memset(&conn_resp, 0, sizeof(conn_resp));
-	conn_req.ep_ops.ep_tx_complete = ath10k_htc_control_tx_complete;
-	conn_req.ep_ops.ep_rx_complete = ath10k_htc_control_rx_complete;
-	conn_req.max_send_queue_depth = ATH10K_NUM_CONTROL_TX_BUFFERS;
-	conn_req.service_id = ATH10K_HTC_SVC_ID_RSVD_CTRL;
-
-	/* connect fake service */
-	status = ath10k_htc_connect_service(htc, &conn_req, &conn_resp);
-	if (status) {
-		ath10k_err(ar, "could not connect to htc service (%d)\n",
-			   status);
-		return status;
-	}
-
 	return 0;
 }
 
-- 
1.7.9.5


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

  parent reply	other threads:[~2016-11-14 16:35 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14 16:33 [RFC 00/12] ath10k sdio support Erik Stromdahl
2016-11-14 16:33 ` Erik Stromdahl
2016-11-14 16:33 ` [RFC 01/12] ath10k: htc: made static function public Erik Stromdahl
2016-11-14 16:33   ` Erik Stromdahl
2016-11-14 16:33 ` [RFC 02/12] ath10k: htc: rx trailer lookahead support Erik Stromdahl
2016-11-14 16:33   ` Erik Stromdahl
2016-11-15  9:57   ` Michal Kazior
2016-11-15  9:57     ` Michal Kazior
2016-11-15 17:31     ` Erik Stromdahl
2016-11-15 17:31       ` Erik Stromdahl
2016-11-16 13:53       ` Valo, Kalle
2016-11-16 13:53         ` Valo, Kalle
2016-11-14 16:33 ` Erik Stromdahl [this message]
2016-11-14 16:33   ` [RFC 03/12] ath10k: htc: Changed order of wait target and ep connect Erik Stromdahl
2016-11-15 10:13   ` Michal Kazior
2016-11-15 10:13     ` Michal Kazior
2016-11-15 17:07     ` Erik Stromdahl
2016-11-15 17:07       ` Erik Stromdahl
2016-11-16 14:29       ` Michal Kazior
2016-11-16 14:29         ` Michal Kazior
2016-11-14 16:33 ` [RFC 04/12] ath10k: htc: refactorization Erik Stromdahl
2016-11-14 16:33   ` Erik Stromdahl
2016-11-15 10:19   ` Michal Kazior
2016-11-15 10:19     ` Michal Kazior
2016-11-17 16:32     ` Erik Stromdahl
2016-11-17 16:32       ` Erik Stromdahl
2016-11-18 14:49       ` Michal Kazior
2016-11-18 14:49         ` Michal Kazior
2016-11-14 16:33 ` [RFC 05/12] ath10k: htc: Added ATH10K_HTC_FLAG_BUNDLE_LSB Erik Stromdahl
2016-11-14 16:33   ` Erik Stromdahl
2016-11-15 10:25   ` Michal Kazior
2016-11-15 10:25     ` Michal Kazior
2016-11-15 10:46     ` Valo, Kalle
2016-11-15 10:46       ` Valo, Kalle
2016-11-14 16:33 ` [RFC 06/12] ath10k: bmi: Added SOC reg read/write functions Erik Stromdahl
2016-11-14 16:33   ` Erik Stromdahl
2016-11-15 10:28   ` Michal Kazior
2016-11-15 10:28     ` Michal Kazior
2016-11-15 17:11     ` Erik Stromdahl
2016-11-15 17:11       ` Erik Stromdahl
2016-11-14 16:33 ` [RFC 07/12] ath10k: Added SDIO dbg masks Erik Stromdahl
2016-11-14 16:33   ` Erik Stromdahl
2016-11-14 16:33 ` [RFC 08/12] ath10k: Added ATH10K_BUS_SDIO enum Erik Stromdahl
2016-11-14 16:33   ` Erik Stromdahl
2016-11-14 16:33 ` [RFC 09/12] ath10k: Mailbox address definitions Erik Stromdahl
2016-11-14 16:33   ` Erik Stromdahl
2016-11-15 10:31   ` Michal Kazior
2016-11-15 10:31     ` Michal Kazior
2016-11-15 10:48     ` Valo, Kalle
2016-11-15 10:48       ` Valo, Kalle
2016-11-14 16:33 ` [RFC 10/12] ath10k: Added QCA65XX hw definition Erik Stromdahl
2016-11-14 16:33   ` Erik Stromdahl
2016-11-15 10:34   ` Michal Kazior
2016-11-15 10:34     ` Michal Kazior
2016-11-15 10:54     ` Valo, Kalle
2016-11-15 10:54       ` Valo, Kalle
2016-11-15 18:34       ` Erik Stromdahl
2016-11-15 18:34         ` Erik Stromdahl
2016-11-14 16:33 ` [RFC 11/12] ath10k: Added more host_interest members Erik Stromdahl
2016-11-14 16:33   ` Erik Stromdahl
2016-11-14 16:33 ` [RFC 12/12] ath10k: Added sdio support Erik Stromdahl
2016-11-14 16:33   ` Erik Stromdahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1479141222-8493-4-git-send-email-erik.stromdahl@gmail.com \
    --to=erik.stromdahl@gmail.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.