netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1
@ 2020-09-17  7:41 Amit Pundir
  2020-09-17 16:05 ` Bjorn Andersson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Amit Pundir @ 2020-09-17  7:41 UTC (permalink / raw)
  To: Kalle Valo, David S Miller, Jakub Kicinski, Bjorn Andersson,
	Jeffrey Hugo
  Cc: John Stultz, Sumit Semwal, Konrad Dybcio, ath10k, linux-wireless,
	netdev, lkml

Workaround to get WiFi working on Xiaomi Poco F1 (sdm845)
phone. We get a non-fatal QMI_ERR_MALFORMED_MSG_V01 error
message in ath10k_qmi_host_cap_send_sync(), but we can still
bring up WiFi services successfully on AOSP if we ignore it.

We suspect either the host cap is not implemented or there
may be firmware specific issues. Firmware version is
QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1

qcom,snoc-host-cap-8bit-quirk didn't help. If I use this
quirk, then the host capability request does get accepted,
but we run into fatal "msa info req rejected" error and
WiFi interface doesn't come up.

Attempts are being made to debug the failure reasons but no
luck so far. Hence this device specific workaround instead
of checking for QMI_ERR_MALFORMED_MSG_V01 error message.
Tried ath10k/WCN3990/hw1.0/wlanmdsp.mbn from the upstream
linux-firmware project but it didn't help and neither did
building board-2.bin file from stock bdwlan* files.

This workaround will be removed once we have a viable fix.
Thanks to postmarketOS guys for catching this.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
---
Device-tree for Xiaomi Poco F1(Beryllium) got merged in
qcom/arm64-for-5.10 last week
https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?id=77809cf74a8c

 drivers/net/wireless/ath/ath10k/qmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c
index 0dee1353d395..37c5350eb8b1 100644
--- a/drivers/net/wireless/ath/ath10k/qmi.c
+++ b/drivers/net/wireless/ath/ath10k/qmi.c
@@ -651,7 +651,8 @@ static int ath10k_qmi_host_cap_send_sync(struct ath10k_qmi *qmi)
 
 	/* older FW didn't support this request, which is not fatal */
 	if (resp.resp.result != QMI_RESULT_SUCCESS_V01 &&
-	    resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01) {
+	    resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01 &&
+	    !of_machine_is_compatible("xiaomi,beryllium")) { /* Xiaomi Poco F1 workaround */
 		ath10k_err(ar, "host capability request rejected: %d\n", resp.resp.error);
 		ret = -EINVAL;
 		goto out;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1
  2020-09-17  7:41 [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1 Amit Pundir
@ 2020-09-17 16:05 ` Bjorn Andersson
  2020-09-21 10:38   ` Amit Pundir
  2020-09-24 16:31 ` Kalle Valo
  2020-09-29  8:29 ` Kalle Valo
  2 siblings, 1 reply; 8+ messages in thread
From: Bjorn Andersson @ 2020-09-17 16:05 UTC (permalink / raw)
  To: Amit Pundir
  Cc: Kalle Valo, David S Miller, Jakub Kicinski, Jeffrey Hugo,
	John Stultz, Sumit Semwal, Konrad Dybcio, ath10k, linux-wireless,
	netdev, lkml

On Thu 17 Sep 02:41 CDT 2020, Amit Pundir wrote:

> Workaround to get WiFi working on Xiaomi Poco F1 (sdm845)
> phone. We get a non-fatal QMI_ERR_MALFORMED_MSG_V01 error
> message in ath10k_qmi_host_cap_send_sync(), but we can still
> bring up WiFi services successfully on AOSP if we ignore it.
> 
> We suspect either the host cap is not implemented or there
> may be firmware specific issues. Firmware version is
> QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1
> 
> qcom,snoc-host-cap-8bit-quirk didn't help. If I use this
> quirk, then the host capability request does get accepted,
> but we run into fatal "msa info req rejected" error and
> WiFi interface doesn't come up.
> 

What happens if you skip sending the host-cap message? I had one
firmware version for which I implemented a
"qcom,snoc-host-cap-skip-quirk".

But testing showed that the link was pretty unusable - pushing any real
amount of data would cause it to silently stop working - and I realized
that I could use the linux-firmware wlanmdsp.mbn instead, which works
great on all my devices...

> Attempts are being made to debug the failure reasons but no
> luck so far. Hence this device specific workaround instead
> of checking for QMI_ERR_MALFORMED_MSG_V01 error message.
> Tried ath10k/WCN3990/hw1.0/wlanmdsp.mbn from the upstream
> linux-firmware project but it didn't help and neither did
> building board-2.bin file from stock bdwlan* files.
> 

"Didn't work" as in the wlanmdsp.mbn from linux-firmware failed to load
or some laer problem?

Regards,
Bjorn

> This workaround will be removed once we have a viable fix.
> Thanks to postmarketOS guys for catching this.
> 
> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
> ---
> Device-tree for Xiaomi Poco F1(Beryllium) got merged in
> qcom/arm64-for-5.10 last week
> https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?id=77809cf74a8c
> 
>  drivers/net/wireless/ath/ath10k/qmi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c
> index 0dee1353d395..37c5350eb8b1 100644
> --- a/drivers/net/wireless/ath/ath10k/qmi.c
> +++ b/drivers/net/wireless/ath/ath10k/qmi.c
> @@ -651,7 +651,8 @@ static int ath10k_qmi_host_cap_send_sync(struct ath10k_qmi *qmi)
>  
>  	/* older FW didn't support this request, which is not fatal */
>  	if (resp.resp.result != QMI_RESULT_SUCCESS_V01 &&
> -	    resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01) {
> +	    resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01 &&
> +	    !of_machine_is_compatible("xiaomi,beryllium")) { /* Xiaomi Poco F1 workaround */
>  		ath10k_err(ar, "host capability request rejected: %d\n", resp.resp.error);
>  		ret = -EINVAL;
>  		goto out;
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1
  2020-09-17 16:05 ` Bjorn Andersson
@ 2020-09-21 10:38   ` Amit Pundir
  2020-09-25 15:22     ` Bjorn Andersson
  0 siblings, 1 reply; 8+ messages in thread
From: Amit Pundir @ 2020-09-21 10:38 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Kalle Valo, David S Miller, Jakub Kicinski, Jeffrey Hugo,
	John Stultz, Sumit Semwal, Konrad Dybcio, ath10k, linux-wireless,
	netdev, lkml

On Thu, 17 Sep 2020 at 21:35, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> On Thu 17 Sep 02:41 CDT 2020, Amit Pundir wrote:
>
> > Workaround to get WiFi working on Xiaomi Poco F1 (sdm845)
> > phone. We get a non-fatal QMI_ERR_MALFORMED_MSG_V01 error
> > message in ath10k_qmi_host_cap_send_sync(), but we can still
> > bring up WiFi services successfully on AOSP if we ignore it.
> >
> > We suspect either the host cap is not implemented or there
> > may be firmware specific issues. Firmware version is
> > QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1
> >
> > qcom,snoc-host-cap-8bit-quirk didn't help. If I use this
> > quirk, then the host capability request does get accepted,
> > but we run into fatal "msa info req rejected" error and
> > WiFi interface doesn't come up.
> >
>
> What happens if you skip sending the host-cap message? I had one
> firmware version for which I implemented a
> "qcom,snoc-host-cap-skip-quirk".
>
> But testing showed that the link was pretty unusable - pushing any real
> amount of data would cause it to silently stop working - and I realized
> that I could use the linux-firmware wlanmdsp.mbn instead, which works
> great on all my devices...

I skipped the ath10k_qmi_host_cap_send_sync block altogether
(if that is what you meant by qcom,snoc-host-cap-skip-quirk) and
so far did not run into any issues with youtube auto-playback loop
(3+ hours and counting). Does that count as a valid use case?
Otherwise let me know how could I reproduce a reasonable test
setup?

>
> > Attempts are being made to debug the failure reasons but no
> > luck so far. Hence this device specific workaround instead
> > of checking for QMI_ERR_MALFORMED_MSG_V01 error message.
> > Tried ath10k/WCN3990/hw1.0/wlanmdsp.mbn from the upstream
> > linux-firmware project but it didn't help and neither did
> > building board-2.bin file from stock bdwlan* files.
> >
>
> "Didn't work" as in the wlanmdsp.mbn from linux-firmware failed to load
> or some laer problem?

While using the wlanmdsp.mbn from linux-firmware, I run into
the following crash 4 times before tqftpserv service gets killed
eventually:

[   46.504502] qcom-q6v5-mss 4080000.remoteproc: fatal error received:
dog_virtual_root.c:89:User-PD grace timer expired for wlan_process
(ASID: 1)
[   46.504527] remoteproc remoteproc0: crash detected in
4080000.remoteproc: type fatal error
[   46.504558] remoteproc remoteproc0: handling crash #1 in 4080000.remoteproc
[   46.504563] remoteproc remoteproc0: recovering 4080000.remoteproc
[   56.542400] 4080000.remoteproc:glink-edge: intent request timed out
[   56.644617] qcom-q6v5-mss 4080000.remoteproc: port failed halt
[   56.652321] remoteproc remoteproc0: stopped remote processor
4080000.remoteproc
[   59.017963] qcom-q6v5-mss 4080000.remoteproc: MBA booted without
debug policy, loading mpss
[   61.514552] remoteproc remoteproc0: remote processor
4080000.remoteproc is now up
<.... snip ....>
[  214.161946] failed to send del client cmd
[  214.161952] failed while handling packet from 1:16689
[  214.185826] failed to send del client cmd
[  214.185832] failed while handling packet from 1:16688
[  214.201951] failed to send del client cmd
<.... snip ....>
[  219.682148] failed to send del client cmd
[  219.682154] failed while handling packet from 1:16394
[  219.714707] init: Service 'tqftpserv' (pid 321) received signal 6
oneshot service took 215.852005 seconds in background
[  219.714754] init: Sending signal 9 to service 'tqftpserv' (pid 321)
process group...

Regards,
Amit Pundir

>
> Regards,
> Bjorn
>
> > This workaround will be removed once we have a viable fix.
> > Thanks to postmarketOS guys for catching this.
> >
> > Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
> > ---
> > Device-tree for Xiaomi Poco F1(Beryllium) got merged in
> > qcom/arm64-for-5.10 last week
> > https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?id=77809cf74a8c
> >
> >  drivers/net/wireless/ath/ath10k/qmi.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c
> > index 0dee1353d395..37c5350eb8b1 100644
> > --- a/drivers/net/wireless/ath/ath10k/qmi.c
> > +++ b/drivers/net/wireless/ath/ath10k/qmi.c
> > @@ -651,7 +651,8 @@ static int ath10k_qmi_host_cap_send_sync(struct ath10k_qmi *qmi)
> >
> >       /* older FW didn't support this request, which is not fatal */
> >       if (resp.resp.result != QMI_RESULT_SUCCESS_V01 &&
> > -         resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01) {
> > +         resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01 &&
> > +         !of_machine_is_compatible("xiaomi,beryllium")) { /* Xiaomi Poco F1 workaround */
> >               ath10k_err(ar, "host capability request rejected: %d\n", resp.resp.error);
> >               ret = -EINVAL;
> >               goto out;
> > --
> > 2.7.4
> >

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1
  2020-09-17  7:41 [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1 Amit Pundir
  2020-09-17 16:05 ` Bjorn Andersson
@ 2020-09-24 16:31 ` Kalle Valo
  2020-09-25 15:27   ` Bjorn Andersson
  2020-09-29  8:29 ` Kalle Valo
  2 siblings, 1 reply; 8+ messages in thread
From: Kalle Valo @ 2020-09-24 16:31 UTC (permalink / raw)
  To: Amit Pundir
  Cc: David S Miller, Jakub Kicinski, Bjorn Andersson, Jeffrey Hugo,
	netdev, linux-wireless, Konrad Dybcio, ath10k, lkml, John Stultz,
	Sumit Semwal

Amit Pundir <amit.pundir@linaro.org> writes:

> Workaround to get WiFi working on Xiaomi Poco F1 (sdm845)
> phone. We get a non-fatal QMI_ERR_MALFORMED_MSG_V01 error
> message in ath10k_qmi_host_cap_send_sync(), but we can still
> bring up WiFi services successfully on AOSP if we ignore it.
>
> We suspect either the host cap is not implemented or there
> may be firmware specific issues. Firmware version is
> QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1
>
> qcom,snoc-host-cap-8bit-quirk didn't help. If I use this
> quirk, then the host capability request does get accepted,
> but we run into fatal "msa info req rejected" error and
> WiFi interface doesn't come up.
>
> Attempts are being made to debug the failure reasons but no
> luck so far. Hence this device specific workaround instead
> of checking for QMI_ERR_MALFORMED_MSG_V01 error message.
> Tried ath10k/WCN3990/hw1.0/wlanmdsp.mbn from the upstream
> linux-firmware project but it didn't help and neither did
> building board-2.bin file from stock bdwlan* files.
>
> This workaround will be removed once we have a viable fix.
> Thanks to postmarketOS guys for catching this.
>
> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>

Bjorn, is this ok to take?

> --- a/drivers/net/wireless/ath/ath10k/qmi.c
> +++ b/drivers/net/wireless/ath/ath10k/qmi.c
> @@ -651,7 +651,8 @@ static int ath10k_qmi_host_cap_send_sync(struct ath10k_qmi *qmi)
>  
>  	/* older FW didn't support this request, which is not fatal */
>  	if (resp.resp.result != QMI_RESULT_SUCCESS_V01 &&
> -	    resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01) {
> +	    resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01 &&
> +	    !of_machine_is_compatible("xiaomi,beryllium")) { /* Xiaomi Poco F1 workaround */
>  		ath10k_err(ar, "host capability request rejected: %d\n", resp.resp.error);

ath10k-check complained about a too long line, so in the pending branch
I moved the comment before the if statement.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1
  2020-09-21 10:38   ` Amit Pundir
@ 2020-09-25 15:22     ` Bjorn Andersson
  0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2020-09-25 15:22 UTC (permalink / raw)
  To: Amit Pundir
  Cc: Kalle Valo, David S Miller, Jakub Kicinski, Jeffrey Hugo,
	John Stultz, Sumit Semwal, Konrad Dybcio, ath10k, linux-wireless,
	netdev, lkml

On Mon 21 Sep 05:38 CDT 2020, Amit Pundir wrote:

> On Thu, 17 Sep 2020 at 21:35, Bjorn Andersson
> <bjorn.andersson@linaro.org> wrote:
> >
> > On Thu 17 Sep 02:41 CDT 2020, Amit Pundir wrote:
> >
> > > Workaround to get WiFi working on Xiaomi Poco F1 (sdm845)
> > > phone. We get a non-fatal QMI_ERR_MALFORMED_MSG_V01 error
> > > message in ath10k_qmi_host_cap_send_sync(), but we can still
> > > bring up WiFi services successfully on AOSP if we ignore it.
> > >
> > > We suspect either the host cap is not implemented or there
> > > may be firmware specific issues. Firmware version is
> > > QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1
> > >
> > > qcom,snoc-host-cap-8bit-quirk didn't help. If I use this
> > > quirk, then the host capability request does get accepted,
> > > but we run into fatal "msa info req rejected" error and
> > > WiFi interface doesn't come up.
> > >
> >
> > What happens if you skip sending the host-cap message? I had one
> > firmware version for which I implemented a
> > "qcom,snoc-host-cap-skip-quirk".
> >
> > But testing showed that the link was pretty unusable - pushing any real
> > amount of data would cause it to silently stop working - and I realized
> > that I could use the linux-firmware wlanmdsp.mbn instead, which works
> > great on all my devices...
> 
> I skipped the ath10k_qmi_host_cap_send_sync block altogether
> (if that is what you meant by qcom,snoc-host-cap-skip-quirk) and
> so far did not run into any issues with youtube auto-playback loop
> (3+ hours and counting). Does that count as a valid use case?
> Otherwise let me know how could I reproduce a reasonable test
> setup?
> 

Iirc I was able to get an IP but browsing the web would be enough
traffic to stop (without any visible faults from the driver).

So your test sounds good I would like to see a host-cap-skip quirk,
rather than a conditional on the machine compatible.

> >
> > > Attempts are being made to debug the failure reasons but no
> > > luck so far. Hence this device specific workaround instead
> > > of checking for QMI_ERR_MALFORMED_MSG_V01 error message.
> > > Tried ath10k/WCN3990/hw1.0/wlanmdsp.mbn from the upstream
> > > linux-firmware project but it didn't help and neither did
> > > building board-2.bin file from stock bdwlan* files.
> > >
> >
> > "Didn't work" as in the wlanmdsp.mbn from linux-firmware failed to load
> > or some laer problem?
> 
> While using the wlanmdsp.mbn from linux-firmware, I run into
> the following crash 4 times before tqftpserv service gets killed
> eventually:
> 
> [   46.504502] qcom-q6v5-mss 4080000.remoteproc: fatal error received:
> dog_virtual_root.c:89:User-PD grace timer expired for wlan_process
> (ASID: 1)

It loaded, but doesn't seem to come up properly. We can try to debug
this further, but I think getting the quirk in will be useful - as there
seems to be a generation of firmware that has this particular behavior.

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1
  2020-09-24 16:31 ` Kalle Valo
@ 2020-09-25 15:27   ` Bjorn Andersson
  2020-09-25 18:32     ` Amit Pundir
  0 siblings, 1 reply; 8+ messages in thread
From: Bjorn Andersson @ 2020-09-25 15:27 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Amit Pundir, David S Miller, Jakub Kicinski, Jeffrey Hugo,
	netdev, linux-wireless, Konrad Dybcio, ath10k, lkml, John Stultz,
	Sumit Semwal

On Thu 24 Sep 11:31 CDT 2020, Kalle Valo wrote:

> Amit Pundir <amit.pundir@linaro.org> writes:
> 
> > Workaround to get WiFi working on Xiaomi Poco F1 (sdm845)
> > phone. We get a non-fatal QMI_ERR_MALFORMED_MSG_V01 error
> > message in ath10k_qmi_host_cap_send_sync(), but we can still
> > bring up WiFi services successfully on AOSP if we ignore it.
> >
> > We suspect either the host cap is not implemented or there
> > may be firmware specific issues. Firmware version is
> > QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1
> >
> > qcom,snoc-host-cap-8bit-quirk didn't help. If I use this
> > quirk, then the host capability request does get accepted,
> > but we run into fatal "msa info req rejected" error and
> > WiFi interface doesn't come up.
> >
> > Attempts are being made to debug the failure reasons but no
> > luck so far. Hence this device specific workaround instead
> > of checking for QMI_ERR_MALFORMED_MSG_V01 error message.
> > Tried ath10k/WCN3990/hw1.0/wlanmdsp.mbn from the upstream
> > linux-firmware project but it didn't help and neither did
> > building board-2.bin file from stock bdwlan* files.
> >
> > This workaround will be removed once we have a viable fix.
> > Thanks to postmarketOS guys for catching this.
> >
> > Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
> 
> Bjorn, is this ok to take?
> 

As I wrote in the answer to Amit I think we should introduce a generic
quirk to skip host_cap instead.

So if you pick this up (which is an ok short term workaround) I think we
should revert it once we have a generic mechanism.

Regards,
Bjorn

> > --- a/drivers/net/wireless/ath/ath10k/qmi.c
> > +++ b/drivers/net/wireless/ath/ath10k/qmi.c
> > @@ -651,7 +651,8 @@ static int ath10k_qmi_host_cap_send_sync(struct ath10k_qmi *qmi)
> >  
> >  	/* older FW didn't support this request, which is not fatal */
> >  	if (resp.resp.result != QMI_RESULT_SUCCESS_V01 &&
> > -	    resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01) {
> > +	    resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01 &&
> > +	    !of_machine_is_compatible("xiaomi,beryllium")) { /* Xiaomi Poco F1 workaround */
> >  		ath10k_err(ar, "host capability request rejected: %d\n", resp.resp.error);
> 
> ath10k-check complained about a too long line, so in the pending branch
> I moved the comment before the if statement.
> 
> -- 
> https://patchwork.kernel.org/project/linux-wireless/list/
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1
  2020-09-25 15:27   ` Bjorn Andersson
@ 2020-09-25 18:32     ` Amit Pundir
  0 siblings, 0 replies; 8+ messages in thread
From: Amit Pundir @ 2020-09-25 18:32 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Kalle Valo, David S Miller, Jakub Kicinski, Jeffrey Hugo, netdev,
	linux-wireless, Konrad Dybcio, ath10k, lkml, John Stultz,
	Sumit Semwal

On Fri, 25 Sep 2020 at 20:57, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> On Thu 24 Sep 11:31 CDT 2020, Kalle Valo wrote:
>
> > Amit Pundir <amit.pundir@linaro.org> writes:
> >
> > > Workaround to get WiFi working on Xiaomi Poco F1 (sdm845)
> > > phone. We get a non-fatal QMI_ERR_MALFORMED_MSG_V01 error
> > > message in ath10k_qmi_host_cap_send_sync(), but we can still
> > > bring up WiFi services successfully on AOSP if we ignore it.
> > >
> > > We suspect either the host cap is not implemented or there
> > > may be firmware specific issues. Firmware version is
> > > QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1
> > >
> > > qcom,snoc-host-cap-8bit-quirk didn't help. If I use this
> > > quirk, then the host capability request does get accepted,
> > > but we run into fatal "msa info req rejected" error and
> > > WiFi interface doesn't come up.
> > >
> > > Attempts are being made to debug the failure reasons but no
> > > luck so far. Hence this device specific workaround instead
> > > of checking for QMI_ERR_MALFORMED_MSG_V01 error message.
> > > Tried ath10k/WCN3990/hw1.0/wlanmdsp.mbn from the upstream
> > > linux-firmware project but it didn't help and neither did
> > > building board-2.bin file from stock bdwlan* files.
> > >
> > > This workaround will be removed once we have a viable fix.
> > > Thanks to postmarketOS guys for catching this.
> > >
> > > Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
> >
> > Bjorn, is this ok to take?
> >
>
> As I wrote in the answer to Amit I think we should introduce a generic
> quirk to skip host_cap instead.
>
> So if you pick this up (which is an ok short term workaround) I think we
> should revert it once we have a generic mechanism.

Hi Bjorn, just sent out a generic skip quirk for review.

Regards,
Amit Pundir

>
> Regards,
> Bjorn
>
> > > --- a/drivers/net/wireless/ath/ath10k/qmi.c
> > > +++ b/drivers/net/wireless/ath/ath10k/qmi.c
> > > @@ -651,7 +651,8 @@ static int ath10k_qmi_host_cap_send_sync(struct ath10k_qmi *qmi)
> > >
> > >     /* older FW didn't support this request, which is not fatal */
> > >     if (resp.resp.result != QMI_RESULT_SUCCESS_V01 &&
> > > -       resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01) {
> > > +       resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01 &&
> > > +       !of_machine_is_compatible("xiaomi,beryllium")) { /* Xiaomi Poco F1 workaround */
> > >             ath10k_err(ar, "host capability request rejected: %d\n", resp.resp.error);
> >
> > ath10k-check complained about a too long line, so in the pending branch
> > I moved the comment before the if statement.
> >
> > --
> > https://patchwork.kernel.org/project/linux-wireless/list/
> >
> > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1
  2020-09-17  7:41 [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1 Amit Pundir
  2020-09-17 16:05 ` Bjorn Andersson
  2020-09-24 16:31 ` Kalle Valo
@ 2020-09-29  8:29 ` Kalle Valo
  2 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2020-09-29  8:29 UTC (permalink / raw)
  To: Amit Pundir
  Cc: David S Miller, Jakub Kicinski, Bjorn Andersson, Jeffrey Hugo,
	John Stultz, Sumit Semwal, Konrad Dybcio, ath10k, linux-wireless,
	netdev, lkml

Amit Pundir <amit.pundir@linaro.org> wrote:

> Workaround to get WiFi working on Xiaomi Poco F1 (sdm845)
> phone. We get a non-fatal QMI_ERR_MALFORMED_MSG_V01 error
> message in ath10k_qmi_host_cap_send_sync(), but we can still
> bring up WiFi services successfully on AOSP if we ignore it.
> 
> We suspect either the host cap is not implemented or there
> may be firmware specific issues. Firmware version is
> QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1
> 
> qcom,snoc-host-cap-8bit-quirk didn't help. If I use this
> quirk, then the host capability request does get accepted,
> but we run into fatal "msa info req rejected" error and
> WiFi interface doesn't come up.
> 
> Attempts are being made to debug the failure reasons but no
> luck so far. Hence this device specific workaround instead
> of checking for QMI_ERR_MALFORMED_MSG_V01 error message.
> Tried ath10k/WCN3990/hw1.0/wlanmdsp.mbn from the upstream
> linux-firmware project but it didn't help and neither did
> building board-2.bin file from stock bdwlan* files.
> 
> This workaround will be removed once we have a viable fix.
> Thanks to postmarketOS guys for catching this.
> 
> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Dropped per discussion.

Patch set to Changes Requested.

-- 
https://patchwork.kernel.org/patch/11781801/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-09-29  8:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17  7:41 [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1 Amit Pundir
2020-09-17 16:05 ` Bjorn Andersson
2020-09-21 10:38   ` Amit Pundir
2020-09-25 15:22     ` Bjorn Andersson
2020-09-24 16:31 ` Kalle Valo
2020-09-25 15:27   ` Bjorn Andersson
2020-09-25 18:32     ` Amit Pundir
2020-09-29  8:29 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).