Skip to contentSkip to conversation

Work around missing MSA_READY indicator for msm8998 devices

PATCH Applied Marc Gonzalez 8 participants 26 messages Apr 29, 2024 – May 29, 2024

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

v3 cover Work around missing MSA_READY indicator for msm8998 devices

Work around missing MSA_READY indicator in ath10k driver (apply work-around for all msm8998 devices)

CHANGELOG v3
- Add a paragraph in binding commit to explain why we use a DT property instead of a firmware feature bit.
- Warn if the "no_msa_ready_indicator" property is true, but we actually receive the indicator.

Marc Gonzalez (3):
dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop
wifi: ath10k: do not always wait for MSA_READY indicator
arm64: dts: qcom: msm8998: set qcom,no-msa-ready-indicator for wifi

 Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml |  5 +++++
 arch/arm64/boot/dts/qcom/msm8998.dtsi                           |  1 +
 drivers/net/wireless/ath/ath10k/qmi.c                           | 11 +++++++++++
 drivers/net/wireless/ath/ath10k/qmi.h                           |  1 +
 4 files changed, 18 insertions(+)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 1/3 dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

---
 Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml +5 -0
index 9b3ef4bc37325..9070a41f7fc07 100644
@@ -122,6 +122,11 @@ properties:
       Whether to skip executing an SCM call that reassigns the memory
       region ownership.
 
+  qcom,no-msa-ready-indicator:
+    type: boolean
+    description:
+      Don't wait for MSA_READY indicator to complete init.
+
   qcom,smem-states:
     $ref: /schemas/types.yaml#/definitions/phandle-array
     description: State bits used by the AP to signal the WLAN Q6.
Signature · 1 line
2.34.1
Reviewed-by on v3 1/3
#2 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

Quoted 19 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Quoted 6 lines

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

This says "Pierre-Hugues certifies the origin of the patch" then "Marc certifies the origin of the patch". This would have to imply that Pierre-Hugues authored the patch, but you're listed as the author...

Perhaps a suitable answer to this question would be to add "Co-developed-by: Pierre-Hugues ..." above his s-o-b, which implies that the two of you jointly came up with this and both certify the origin.

Other than that, I think this looks good, so please upon addressing this problem feel free to add my:

Regards,
Bjorn

Quoted 23 lines
---
 Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml +5 -0
index 9b3ef4bc37325..9070a41f7fc07 100644
@@ -122,6 +122,11 @@ properties:
       Whether to skip executing an SCM call that reassigns the memory
       region ownership.
 
+  qcom,no-msa-ready-indicator:
+    type: boolean
+    description:
+      Don't wait for MSA_READY indicator to complete init.
+
   qcom,smem-states:
     $ref: /schemas/types.yaml#/definitions/phandle-array
     description: State bits used by the AP to signal the WLAN Q6.
Signature · 1 line
2.34.1
#3 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

Quoted 28 lines · Bjorn Andersson
Quoted 19 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Quoted 6 lines

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

Quoted 7 lines

This says "Pierre-Hugues certifies the origin of the patch" then "Marc certifies the origin of the patch". This would have to imply that Pierre-Hugues authored the patch, but you're listed as the author...

Perhaps a suitable answer to this question would be to add "Co-developed-by: Pierre-Hugues ..." above his s-o-b, which implies that the two of you jointly came up with this and both certify the origin.

BTW I can add that in the pending branch, no need to resend because of this. Just need guidance from Marc.

Quoted 4 lines

Other than that, I think this looks good, so please upon addressing this problem feel free to add my:

Thanks, I'll then add this as well.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#4 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

Quoted 34 lines · Kalle Valo
Quoted 32 lines · Bjorn Andersson
Quoted 19 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Quoted 6 lines

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

This says "Pierre-Hugues certifies the origin of the patch" then "Marc certifies the origin of the patch". This would have to imply that Pierre-Hugues authored the patch, but you're listed as the author...

Quoted 6 lines
Quoted 3 lines

Perhaps a suitable answer to this question would be to add "Co-developed-by: Pierre-Hugues ..." above his s-o-b, which implies that the two of you jointly came up with this and both certify the origin.

BTW I can add that in the pending branch, no need to resend because of this. Just need guidance from Marc.

I typed this patch all by myself with my grubby little paws. You can drop PH's S-o-b.

Quoted 6 lines
Quoted 4 lines

Other than that, I think this looks good, so please upon addressing this problem feel free to add my:

Thanks, I'll then add this as well.

Cool. Almost there :)

#5 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

Quoted 46 lines · Marc Gonzalez
Quoted 34 lines · Kalle Valo
Quoted 32 lines · Bjorn Andersson
Quoted 19 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Quoted 6 lines

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

This says "Pierre-Hugues certifies the origin of the patch" then "Marc certifies the origin of the patch". This would have to imply that Pierre-Hugues authored the patch, but you're listed as the author...

Quoted 6 lines
Quoted 3 lines

Perhaps a suitable answer to this question would be to add "Co-developed-by: Pierre-Hugues ..." above his s-o-b, which implies that the two of you jointly came up with this and both certify the origin.

BTW I can add that in the pending branch, no need to resend because of this. Just need guidance from Marc.

I typed this patch all by myself with my grubby little paws. You can drop PH's S-o-b.

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Other than that, I think this looks good, so please upon addressing this problem feel free to add my:

Thanks, I'll then add this as well.

Cool. Almost there :)

All I need is an ack from DT maintainers for this patch.

DT maintainers: I think this is the best option and I can't think of any other solution so I would prefer to take this approach to our ath.git tree if it's ok for you.

IIRC someone suggested testing for firmware version string but I suspect that has the same problem as the firmware-N.bin approach: ath10k gets the firmware version too late. And besides it's difficult to maintain such a list in ath10k, it would always need kernel updates when there's a new firmware etc.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#6 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

In reply to Marc Gonzalez
Quoted 40 lines · Marc Gonzalez
Quoted 38 lines · Kalle Valo
Quoted 35 lines · Bjorn Andersson
Quoted 19 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Quoted 6 lines

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

This says "Pierre-Hugues certifies the origin of the patch" then "Marc certifies the origin of the patch". This would have to imply that Pierre-Hugues authored the patch, but you're listed as the author...

Perhaps a suitable answer to this question would be to add "Co-developed-by: Pierre-Hugues ..." above his s-o-b, which implies that the two of you jointly came up with this and both certify the origin.

Quoted 5 lines
Quoted 2 lines

BTW I can add that in the pending branch, no need to resend because of this. Just need guidance from Marc.

I typed this patch all by myself with my grubby little paws. You can drop PH's S-o-b.

Thanks. Please check that my modifications in the pending branch are correct:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=3aec20a8e797b28d32e75291cc070d5913bf6dab

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=df5b4bec31b0736a453d507762c5b3d098d5c733

I can freely edit commits in the pending branch, it's just a temporary branch for testing.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#7 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

Quoted 9 lines · Kalle Valo

Thanks. Please check that my modifications in the pending branch are correct:

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=3aec20a8e797b28d32e75291cc070d5913bf6dab

https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=df5b4bec31b0736a453d507762c5b3d098d5c733

I can freely edit commits in the pending branch, it's just a temporary branch for testing.

Looks good to me.

Bjorn, can you take patch 3 in your fix branch for msm?

Regards

Acked-by on v3 1/3
#8 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

In reply to Marc Gonzalez
Quoted 35 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

---
 Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml +0 -0
index 9b3ef4bc37325..9070a41f7fc07 100644
@@ -122,6 +122,11 @@ properties:
       Whether to skip executing an SCM call that reassigns the memory

Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml properties: · line 132

Quoted 10 lines
Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml +5 -0
       region ownership.
 
+  qcom,no-msa-ready-indicator:
+    type: boolean
+    description:
+      Don't wait for MSA_READY indicator to complete init.
+
   qcom,smem-states:
     $ref: /schemas/types.yaml#/definitions/phandle-array
     description: State bits used by the AP to signal the WLAN Q6.

with SOB cleaned up:

maintainer Acked-by on v3 1/3
#9 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

In reply to Marc Gonzalez
Quoted 23 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

Quoted 6 lines
---
 Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml | 5 +++++
 1 file changed, 5 insertions(+)
#10 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

In reply to Marc Gonzalez
Quoted 23 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

Quoted 5 lines

2 patches applied to ath-next branch of ath.git, thanks.

71b6e321e302 dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop 6d67d18014a8 wifi: ath10k: do not always wait for MSA_READY indicator

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#11 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

Quoted 31 lines · Kalle Valo
Quoted 23 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

Quoted 5 lines
Quoted 4 lines

2 patches applied to ath-next branch of ath.git, thanks.

71b6e321e302 dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop 6d67d18014a8 wifi: ath10k: do not always wait for MSA_READY indicator

Hello Kalle,
What version of Linux will these be included in? (I don't see them in v6.10-rc1. Are they considered a new feature, rather than a fix, and thus 6.11?)

Hello Bjorn,
Will you pick up patch 3 ?

Regards

#12 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

Quoted 35 lines · Marc Gonzalez
Quoted 33 lines · Kalle Valo
Quoted 23 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

Quoted 5 lines

2 patches applied to ath-next branch of ath.git, thanks.

Quoted 8 lines
Quoted 3 lines

71b6e321e302 dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop
6d67d18014a8 wifi: ath10k: do not always wait for MSA_READY indicator

Hello Kalle,
What version of Linux will these be included in? (I don't see them in v6.10-rc1. Are they considered a new feature, rather than a fix, and thus 6.11?)

Yeah, these commits will go to v6.11. Because of the multiple trees involved (ath-next -> wireless-next -> net-next -> linus) we need to have ath.git pull request ready well before the merge window opens and these commits missed the last pull request.

Yes, we are slow :)

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#13 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

Quoted 46 lines · Kalle Valo
Quoted 35 lines · Marc Gonzalez
Quoted 33 lines · Kalle Valo
Quoted 23 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

Quoted 5 lines

2 patches applied to ath-next branch of ath.git, thanks.

Quoted 8 lines
Quoted 3 lines

71b6e321e302 dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop
6d67d18014a8 wifi: ath10k: do not always wait for MSA_READY indicator

Hello Kalle,
What version of Linux will these be included in? (I don't see them in v6.10-rc1. Are they considered a new feature, rather than a fix, and thus 6.11?)

Quoted 6 lines

Yeah, these commits will go to v6.11. Because of the multiple trees involved (ath-next -> wireless-next -> net-next -> linus) we need to have ath.git pull request ready well before the merge window opens and these commits missed the last pull request.

Yes, we are slow :)

My understanding of the merging process was that

- new features are queued for the next cycle,
so vN+1-rc1, or vN+2-rc1 if the submission came too late (after ~rc6) in cycle N

- fixes are queued for the fixes batch in the same cycle

This patch series is handled like a feature rather than a fix? (To me, it fixed broken behavior in the FW, but I understand if the nature of the changes require a more prudent approach. Though they are disabled for everyone by default.)

Regards

#14 lore raw

Re: [PATCH v3 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop

Quoted 60 lines · Marc Gonzalez
Quoted 46 lines · Kalle Valo
Quoted 35 lines · Marc Gonzalez
Quoted 33 lines · Kalle Valo
Quoted 23 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Kalle Valo first suggested setting a bit in firmware-5.bin to trigger work-around in the driver. However, firmware-5.bin is parsed too late. So we are stuck with a DT property.

Quoted 5 lines

2 patches applied to ath-next branch of ath.git, thanks.

Quoted 8 lines
Quoted 3 lines

71b6e321e302 dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop
6d67d18014a8 wifi: ath10k: do not always wait for MSA_READY indicator

Hello Kalle,
What version of Linux will these be included in? (I don't see them in v6.10-rc1. Are they considered a new feature, rather than a fix, and thus 6.11?)

Quoted 6 lines

Yeah, these commits will go to v6.11. Because of the multiple trees involved (ath-next -> wireless-next -> net-next -> linus) we need to have ath.git pull request ready well before the merge window opens and these commits missed the last pull request.

Yes, we are slow :)

My understanding of the merging process was that

- new features are queued for the next cycle,
so vN+1-rc1, or vN+2-rc1 if the submission came too late (after ~rc6) in cycle N

Quoted 6 lines

- fixes are queued for the fixes batch in the same cycle

This patch series is handled like a feature rather than a fix? (To me, it fixed broken behavior in the FW, but I understand if the nature of the changes require a more prudent approach. Though they are disabled for everyone by default.)

So the path for ath10k/ath11k/ath12k fixes to current -rc release is:

ath-current -> wireless -> net -> linus

For new features going to the next release:

ath-next -> wireless-next -> net-next -> (in merge window) linus

To reduce conflicts between trees most of the patches I apply go to -next, I usually take only important regression fixes to -current. In this case I didn't even consider taking the patches to -current as there were changes in DT and I just assumed this is for -next. If you considered otherwise I didn't realise it, sorry about that.

In future, if you think a patch should go to -current please mention it somewhere, preferably something like tagging it with "[PATCH wireless]" or "[PATCH ath-current]" etc. to document which tree it is for. Or just as a simple reply.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
#15 lore raw

PATCH v3 2/3 wifi: ath10k: do not always wait for MSA_READY indicator

In reply to Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

fw_version 0x100204b2
fw_build_timestamp 2019-09-04 03:01
fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.1.0-01202-QCAHLSWMTPLZ-1.221523.2

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

---
 drivers/net/wireless/ath/ath10k/qmi.c | 11 +++++++++++
 drivers/net/wireless/ath/ath10k/qmi.h |  1 +
 2 files changed, 12 insertions(+)
drivers/net/wireless/ath/ath10k/qmi.c +11 -0
index 38e939f572a9e..f1f33af0170a0 100644
@@ -1040,6 +1040,10 @@ static void ath10k_qmi_driver_event_work(struct work_struct *work)
 		switch (event->type) {
 		case ATH10K_QMI_EVENT_SERVER_ARRIVE:
 			ath10k_qmi_event_server_arrive(qmi);
+			if (qmi->no_msa_ready_indicator) {
+				ath10k_info(ar, "qmi not waiting for msa_ready indicator");
+				ath10k_qmi_event_msa_ready(qmi);
+			}
 			break;
 		case ATH10K_QMI_EVENT_SERVER_EXIT:
 			ath10k_qmi_event_server_exit(qmi);
@@ -1048,6 +1052,10 @@ static void ath10k_qmi_driver_event_work(struct work_struct *work)
 			ath10k_qmi_event_fw_ready_ind(qmi);
 			break;
 		case ATH10K_QMI_EVENT_MSA_READY_IND:
+			if (qmi->no_msa_ready_indicator) {
+				ath10k_warn(ar, "qmi unexpected msa_ready indicator");
+				break;
+			}
 			ath10k_qmi_event_msa_ready(qmi);
 			break;
 		default:
@@ -1077,6 +1085,9 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size)
 	if (of_property_read_bool(dev->of_node, "qcom,msa-fixed-perm"))
 		qmi->msa_fixed_perm = true;
 
+	if (of_property_read_bool(dev->of_node, "qcom,no-msa-ready-indicator"))
+		qmi->no_msa_ready_indicator = true;
+
 	ret = qmi_handle_init(&qmi->qmi_hdl,
 			      WLFW_BDF_DOWNLOAD_REQ_MSG_V01_MAX_MSG_LEN,
 			      &ath10k_qmi_ops, qmi_msg_handler);
drivers/net/wireless/ath/ath10k/qmi.h +1 -0
index 89464239fe96a..0816eb4e4a18a 100644
@@ -107,6 +107,7 @@ struct ath10k_qmi {
 	char fw_build_timestamp[MAX_TIMESTAMP_LEN + 1];
 	struct ath10k_qmi_cal_data cal_data[MAX_NUM_CAL_V01];
 	bool msa_fixed_perm;
+	bool no_msa_ready_indicator;
 	enum ath10k_qmi_state state;
 };
 
Signature · 1 line
2.34.1
Reviewed-by on v3 2/3
#16 lore raw

Re: [PATCH v3 2/3] wifi: ath10k: do not always wait for MSA_READY indicator

Quoted 18 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

fw_version 0x100204b2
fw_build_timestamp 2019-09-04 03:01
fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.1.0-01202-QCAHLSWMTPLZ-1.221523.2

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

Quoted 5 lines

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

As with patch 1, please address the s-o-b and accept my:

Regards,
Bjorn

Quoted 57 lines
---
 drivers/net/wireless/ath/ath10k/qmi.c | 11 +++++++++++
 drivers/net/wireless/ath/ath10k/qmi.h |  1 +
 2 files changed, 12 insertions(+)
drivers/net/wireless/ath/ath10k/qmi.c +11 -0
index 38e939f572a9e..f1f33af0170a0 100644
@@ -1040,6 +1040,10 @@ static void ath10k_qmi_driver_event_work(struct work_struct *work)
 		switch (event->type) {
 		case ATH10K_QMI_EVENT_SERVER_ARRIVE:
 			ath10k_qmi_event_server_arrive(qmi);
+			if (qmi->no_msa_ready_indicator) {
+				ath10k_info(ar, "qmi not waiting for msa_ready indicator");
+				ath10k_qmi_event_msa_ready(qmi);
+			}
 			break;
 		case ATH10K_QMI_EVENT_SERVER_EXIT:
 			ath10k_qmi_event_server_exit(qmi);
@@ -1048,6 +1052,10 @@ static void ath10k_qmi_driver_event_work(struct work_struct *work)
 			ath10k_qmi_event_fw_ready_ind(qmi);
 			break;
 		case ATH10K_QMI_EVENT_MSA_READY_IND:
+			if (qmi->no_msa_ready_indicator) {
+				ath10k_warn(ar, "qmi unexpected msa_ready indicator");
+				break;
+			}
 			ath10k_qmi_event_msa_ready(qmi);
 			break;
 		default:
@@ -1077,6 +1085,9 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size)
 	if (of_property_read_bool(dev->of_node, "qcom,msa-fixed-perm"))
 		qmi->msa_fixed_perm = true;
 
+	if (of_property_read_bool(dev->of_node, "qcom,no-msa-ready-indicator"))
+		qmi->no_msa_ready_indicator = true;
+
 	ret = qmi_handle_init(&qmi->qmi_hdl,
 			      WLFW_BDF_DOWNLOAD_REQ_MSG_V01_MAX_MSG_LEN,
 			      &ath10k_qmi_ops, qmi_msg_handler);
drivers/net/wireless/ath/ath10k/qmi.h +1 -0
index 89464239fe96a..0816eb4e4a18a 100644
@@ -107,6 +107,7 @@ struct ath10k_qmi {
 	char fw_build_timestamp[MAX_TIMESTAMP_LEN + 1];
 	struct ath10k_qmi_cal_data cal_data[MAX_NUM_CAL_V01];
 	bool msa_fixed_perm;
+	bool no_msa_ready_indicator;
 	enum ath10k_qmi_state state;
 };
 
Signature · 1 line
2.34.1
#17 lore raw

Re: [PATCH v3 2/3] wifi: ath10k: do not always wait for MSA_READY indicator

Quoted 23 lines · Bjorn Andersson
Quoted 21 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

fw_version 0x100204b2
fw_build_timestamp 2019-09-04 03:01
fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.1.0-01202-QCAHLSWMTPLZ-1.221523.2

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

Quoted 6 lines
Quoted 2 lines

As with patch 1, please address the s-o-b and accept my:

As with patch 1,
I typed this patch all by myself with my grubby little paws. You can drop PH's S-o-b.

Regards

Acked-by on v3 2/3
#18 lore raw

Re: [PATCH v3 2/3] wifi: ath10k: do not always wait for MSA_READY indicator

In reply to Marc Gonzalez
Quoted 18 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

fw_version 0x100204b2
fw_build_timestamp 2019-09-04 03:01
fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.1.0-01202-QCAHLSWMTPLZ-1.221523.2

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

Quoted 6 lines

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

---

with SOB cleaned up:

#19 lore raw

PATCH v3 3/3 arm64: dts: qcom: msm8998: set qcom,no-msa-ready-indicator for wifi

In reply to Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

cf. also
https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_835_(MSM8998)#WLAN

---
 arch/arm64/boot/dts/qcom/msm8998.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/msm8998.dtsi +1 -0
index 67b8374ddf02f..4e6245095adfc 100644
@@ -3234,6 +3234,7 @@ wifi: wifi@18800000 {
 			iommus = <&anoc2_smmu 0x1900>,
 				 <&anoc2_smmu 0x1901>;
 			qcom,snoc-host-cap-8bit-quirk;
+			qcom,no-msa-ready-indicator;
 		};
 	};
 };
Signature · 1 line
2.34.1
Acked-by on v3 3/3
#20 lore raw

Re: [PATCH v3 3/3] arm64: dts: qcom: msm8998: set qcom,no-msa-ready-indicator for wifi

Quoted 16 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

Quoted 7 lines

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

cf. also
https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_835_(MSM8998)#WLAN

#21 lore raw

Re: [PATCH v3 3/3] arm64: dts: qcom: msm8998: set qcom,no-msa-ready-indicator for wifi

In reply to Marc Gonzalez
Quoted 32 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

cf. also
https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_835_(MSM8998)#WLAN

---
 arch/arm64/boot/dts/qcom/msm8998.dtsi | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/msm8998.dtsi +0 -0
index 67b8374ddf02f..4e6245095adfc 100644

arch/arm64/boot/dts/qcom/msm8998.dtsi wifi: wifi@18800000 { · line 3240

Quoted 7 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +1 -0
@@ -3234,6 +3234,7 @@ wifi: wifi@18800000 {
 			iommus = <&anoc2_smmu 0x1900>,
 				 <&anoc2_smmu 0x1901>;
 			qcom,snoc-host-cap-8bit-quirk;
+			qcom,no-msa-ready-indicator;
 		};
 	};
 };

Bjorn,

This patch is supposed to go through your tree, right?

Regards

Reviewed-by
#22 lore raw

Re: [PATCH v3 3/3] arm64: dts: qcom: msm8998: set qcom,no-msa-ready-indicator for wifi

Quoted 45 lines · Marc Gonzalez
Quoted 32 lines · Marc Gonzalez

The ath10k driver waits for an "MSA_READY" indicator to complete initialization. If the indicator is not received, then the device remains unusable.

cf. ath10k_qmi_driver_event_work()

Several msm8998-based devices are affected by this issue. Oddly, it seems safe to NOT wait for the indicator, and proceed immediately when QMI_EVENT_SERVER_ARRIVE.

Jeff Johnson wrote:

The feedback I received was "it might be ok to change all ath10k qmi to skip waiting for msa_ready", and it was pointed out that ath11k (and ath12k) do not wait for it.

However with so many deployed devices, "might be ok" isn't a strong argument for changing the default behavior.

cf. also
https://wiki.postmarketos.org/wiki/Qualcomm_Snapdragon_835_(MSM8998)#WLAN

---
  arch/arm64/boot/dts/qcom/msm8998.dtsi | 1 +
  1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/msm8998.dtsi +0 -0
index 67b8374ddf02f..4e6245095adfc 100644

arch/arm64/boot/dts/qcom/msm8998.dtsi wifi: wifi@18800000 { · line 3240

Quoted 7 lines
arch/arm64/boot/dts/qcom/msm8998.dtsi +1 -0
@@ -3234,6 +3234,7 @@ wifi: wifi@18800000 {
  			iommus = <&anoc2_smmu 0x1900>,
  				 <&anoc2_smmu 0x1901>;
  			qcom,snoc-host-cap-8bit-quirk;
+			qcom,no-msa-ready-indicator;
  		};
  	};
  };

Bjorn,

Quoted 1 line

This patch is supposed to go through your tree, right?

Konrad

#23 lore raw
In reply to Marc Gonzalez
Quoted 14 lines · Marc Gonzalez

Work around missing MSA_READY indicator in ath10k driver (apply work-around for all msm8998 devices)

CHANGELOG v3
- Add a paragraph in binding commit to explain why we use a DT property instead of a firmware feature bit.
- Warn if the "no_msa_ready_indicator" property is true, but we actually receive the indicator.

Marc Gonzalez (3):
dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop
wifi: ath10k: do not always wait for MSA_READY indicator
arm64: dts: qcom: msm8998: set qcom,no-msa-ready-indicator for wifi

Quoted 6 lines
  Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml |  5 +++++
  arch/arm64/boot/dts/qcom/msm8998.dtsi                           |  1 +
  drivers/net/wireless/ath/ath10k/qmi.c                           | 11 +++++++++++
  drivers/net/wireless/ath/ath10k/qmi.h                           |  1 +
  4 files changed, 18 insertions(+)

I wonder if you could infer the workaround based on firmware version, instead of kernel passed flag ?

---
bod

#24 lore raw
Quoted 22 lines · Bryan O'Donoghue
Quoted 14 lines · Marc Gonzalez

Work around missing MSA_READY indicator in ath10k driver (apply work-around for all msm8998 devices)

CHANGELOG v3
- Add a paragraph in binding commit to explain why we use a DT property instead of a firmware feature bit.
- Warn if the "no_msa_ready_indicator" property is true, but we actually receive the indicator.

Marc Gonzalez (3):
dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop
wifi: ath10k: do not always wait for MSA_READY indicator
arm64: dts: qcom: msm8998: set qcom,no-msa-ready-indicator for wifi

Quoted 6 lines
  Documentation/devicetree/bindings/net/wireless/qcom,ath10k.yaml |  5 +++++
  arch/arm64/boot/dts/qcom/msm8998.dtsi                           |  1 +
  drivers/net/wireless/ath/ath10k/qmi.c                           | 11 +++++++++++
  drivers/net/wireless/ath/ath10k/qmi.h                           |  1 +
  4 files changed, 18 insertions(+)
Quoted 3 lines

I wonder if you could infer the workaround based on firmware version, instead of kernel passed flag ?

It's been a while, but I attempted this for the similar workaround for SDM845 RB3 et al. I vaguely remember concluding that the different devices I worked on, had firmware from different branches without any suitable version scheme to use for such comparison - which is why we have "qcom,snoc-host-cap-8bit-quirk;" in those nodes (which apparently is not documented in the yaml).

I'd also rather see us ask Marc spending time on some more fruitful exercise...

Regards,
Bjorn

maintainer Applied
#25 lore raw

Re: (subset) [PATCH v3 0/3] Work around missing MSA_READY indicator for msm8998 devices

In reply to Marc Gonzalez
Quoted 10 lines · Marc Gonzalez

Work around missing MSA_READY indicator in ath10k driver (apply work-around for all msm8998 devices)

CHANGELOG v3
- Add a paragraph in binding commit to explain why we use a DT property instead of a firmware feature bit.
- Warn if the "no_msa_ready_indicator" property is true, but we actually receive the indicator.

[...]

Applied, thanks!

[3/3] arm64: dts: qcom: msm8998: set qcom,no-msa-ready-indicator for wifi

      commit: 737abcabe97bb37e38be2504acd28ad779dbaf3d

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>