All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
@ 2023-02-20 21:38 ` Mario Limonciello
  0 siblings, 0 replies; 14+ messages in thread
From: Mario Limonciello @ 2023-02-20 21:38 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Mario Limonciello, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, ath11k, linux-wireless, netdev, linux-kernel

When WCN6855 firmware versions less than 0x110B196E are used with
an AMD APU and the user puts the system into s2idle spurious wakeup
events can occur. These are difficult to attribute to the WLAN F/W
so add a warning to the kernel driver to give users a hint where
to look.

This was tested on WCN6855 and a Lenovo Z13 with the following
firmware versions:
WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23

Link: http://lists.infradead.org/pipermail/ath11k/2023-February/004024.html
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2377
Link: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2006458
Link: https://lore.kernel.org/linux-gpio/20221012221028.4817-1-mario.limonciello@amd.com/
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/net/wireless/ath/ath11k/pci.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/pci.c b/drivers/net/wireless/ath/ath11k/pci.c
index 99cf3357c66e..87536327e214 100644
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
@@ -8,6 +8,7 @@
 #include <linux/msi.h>
 #include <linux/pci.h>
 #include <linux/of.h>
+#include <linux/suspend.h>
 
 #include "pci.h"
 #include "core.h"
@@ -27,6 +28,8 @@
 #define QCN9074_DEVICE_ID		0x1104
 #define WCN6855_DEVICE_ID		0x1103
 
+#define WCN6855_S2IDLE_VER		0x110b196e
+
 static const struct pci_device_id ath11k_pci_id_table[] = {
 	{ PCI_VDEVICE(QCOM, QCA6390_DEVICE_ID) },
 	{ PCI_VDEVICE(QCOM, WCN6855_DEVICE_ID) },
@@ -965,6 +968,27 @@ static void ath11k_pci_shutdown(struct pci_dev *pdev)
 	ath11k_pci_power_down(ab);
 }
 
+static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
+{
+	struct pci_dev *rdev;
+
+	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
+		return;
+
+	if (ab->id.device != WCN6855_DEVICE_ID)
+		return;
+
+	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
+		return;
+
+	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
+	if (rdev->vendor == PCI_VENDOR_ID_AMD)
+		ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups. Upgrade to 0x%x or later.",
+			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);
+
+	pci_dev_put(rdev);
+}
+
 static __maybe_unused int ath11k_pci_pm_suspend(struct device *dev)
 {
 	struct ath11k_base *ab = dev_get_drvdata(dev);
@@ -975,6 +999,8 @@ static __maybe_unused int ath11k_pci_pm_suspend(struct device *dev)
 		return 0;
 	}
 
+	ath11k_check_s2idle_bug(ab);
+
 	ret = ath11k_core_suspend(ab);
 	if (ret)
 		ath11k_warn(ab, "failed to suspend core: %d\n", ret);
-- 
2.34.1


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

* [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
@ 2023-02-20 21:38 ` Mario Limonciello
  0 siblings, 0 replies; 14+ messages in thread
From: Mario Limonciello @ 2023-02-20 21:38 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Mario Limonciello, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, ath11k, linux-wireless, netdev, linux-kernel

When WCN6855 firmware versions less than 0x110B196E are used with
an AMD APU and the user puts the system into s2idle spurious wakeup
events can occur. These are difficult to attribute to the WLAN F/W
so add a warning to the kernel driver to give users a hint where
to look.

This was tested on WCN6855 and a Lenovo Z13 with the following
firmware versions:
WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23

Link: http://lists.infradead.org/pipermail/ath11k/2023-February/004024.html
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2377
Link: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2006458
Link: https://lore.kernel.org/linux-gpio/20221012221028.4817-1-mario.limonciello@amd.com/
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/net/wireless/ath/ath11k/pci.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/pci.c b/drivers/net/wireless/ath/ath11k/pci.c
index 99cf3357c66e..87536327e214 100644
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
@@ -8,6 +8,7 @@
 #include <linux/msi.h>
 #include <linux/pci.h>
 #include <linux/of.h>
+#include <linux/suspend.h>
 
 #include "pci.h"
 #include "core.h"
@@ -27,6 +28,8 @@
 #define QCN9074_DEVICE_ID		0x1104
 #define WCN6855_DEVICE_ID		0x1103
 
+#define WCN6855_S2IDLE_VER		0x110b196e
+
 static const struct pci_device_id ath11k_pci_id_table[] = {
 	{ PCI_VDEVICE(QCOM, QCA6390_DEVICE_ID) },
 	{ PCI_VDEVICE(QCOM, WCN6855_DEVICE_ID) },
@@ -965,6 +968,27 @@ static void ath11k_pci_shutdown(struct pci_dev *pdev)
 	ath11k_pci_power_down(ab);
 }
 
+static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
+{
+	struct pci_dev *rdev;
+
+	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
+		return;
+
+	if (ab->id.device != WCN6855_DEVICE_ID)
+		return;
+
+	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
+		return;
+
+	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
+	if (rdev->vendor == PCI_VENDOR_ID_AMD)
+		ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups. Upgrade to 0x%x or later.",
+			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);
+
+	pci_dev_put(rdev);
+}
+
 static __maybe_unused int ath11k_pci_pm_suspend(struct device *dev)
 {
 	struct ath11k_base *ab = dev_get_drvdata(dev);
@@ -975,6 +999,8 @@ static __maybe_unused int ath11k_pci_pm_suspend(struct device *dev)
 		return 0;
 	}
 
+	ath11k_check_s2idle_bug(ab);
+
 	ret = ath11k_core_suspend(ab);
 	if (ret)
 		ath11k_warn(ab, "failed to suspend core: %d\n", ret);
-- 
2.34.1


-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* Re: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
  2023-02-20 21:38 ` Mario Limonciello
@ 2023-02-27 12:36   ` Kalle Valo
  -1 siblings, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2023-02-27 12:36 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

Mario Limonciello <mario.limonciello@amd.com> writes:

> When WCN6855 firmware versions less than 0x110B196E are used with
> an AMD APU and the user puts the system into s2idle spurious wakeup
> events can occur. These are difficult to attribute to the WLAN F/W
> so add a warning to the kernel driver to give users a hint where
> to look.
>
> This was tested on WCN6855 and a Lenovo Z13 with the following
> firmware versions:
> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>
> Link: http://lists.infradead.org/pipermail/ath11k/2023-February/004024.html
> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2377
> Link: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2006458
> Link: https://lore.kernel.org/linux-gpio/20221012221028.4817-1-mario.limonciello@amd.com/
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

[...]

> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
> +{
> +	struct pci_dev *rdev;
> +
> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
> +		return;
> +
> +	if (ab->id.device != WCN6855_DEVICE_ID)
> +		return;
> +
> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
> +		return;
> +
> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
> +		ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups. Upgrade to 0x%x or later.",
> +			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);

I understand the reasons for this warning but I don't really trust the
check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't know
how the firmware team populates the fw_version so I'm worried that if we
ever switch to a different firmware branch (or similar) this warning
might all of sudden start triggering for the users.

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

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

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

* Re: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
@ 2023-02-27 12:36   ` Kalle Valo
  0 siblings, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2023-02-27 12:36 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

Mario Limonciello <mario.limonciello@amd.com> writes:

> When WCN6855 firmware versions less than 0x110B196E are used with
> an AMD APU and the user puts the system into s2idle spurious wakeup
> events can occur. These are difficult to attribute to the WLAN F/W
> so add a warning to the kernel driver to give users a hint where
> to look.
>
> This was tested on WCN6855 and a Lenovo Z13 with the following
> firmware versions:
> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>
> Link: http://lists.infradead.org/pipermail/ath11k/2023-February/004024.html
> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2377
> Link: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2006458
> Link: https://lore.kernel.org/linux-gpio/20221012221028.4817-1-mario.limonciello@amd.com/
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>

[...]

> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
> +{
> +	struct pci_dev *rdev;
> +
> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
> +		return;
> +
> +	if (ab->id.device != WCN6855_DEVICE_ID)
> +		return;
> +
> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
> +		return;
> +
> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
> +		ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups. Upgrade to 0x%x or later.",
> +			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);

I understand the reasons for this warning but I don't really trust the
check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't know
how the firmware team populates the fw_version so I'm worried that if we
ever switch to a different firmware branch (or similar) this warning
might all of sudden start triggering for the users.

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

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

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* Re: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
  2023-02-27 12:36   ` Kalle Valo
@ 2023-02-27 13:07     ` Mario Limonciello
  -1 siblings, 0 replies; 14+ messages in thread
From: Mario Limonciello @ 2023-02-27 13:07 UTC (permalink / raw)
  To: Kalle Valo
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

On 2/27/23 06:36, Kalle Valo wrote:
> Mario Limonciello <mario.limonciello@amd.com> writes:
> 
>> When WCN6855 firmware versions less than 0x110B196E are used with
>> an AMD APU and the user puts the system into s2idle spurious wakeup
>> events can occur. These are difficult to attribute to the WLAN F/W
>> so add a warning to the kernel driver to give users a hint where
>> to look.
>>
>> This was tested on WCN6855 and a Lenovo Z13 with the following
>> firmware versions:
>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>>
>> Link: http://lists.infradead.org/pipermail/ath11k/2023-February/004024.html
>> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2377
>> Link: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2006458
>> Link: https://lore.kernel.org/linux-gpio/20221012221028.4817-1-mario.limonciello@amd.com/
>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> 
> [...]
> 
>> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
>> +{
>> +	struct pci_dev *rdev;
>> +
>> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
>> +		return;
>> +
>> +	if (ab->id.device != WCN6855_DEVICE_ID)
>> +		return;
>> +
>> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
>> +		return;
>> +
>> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
>> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
>> +		ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups. Upgrade to 0x%x or later.",
>> +			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);
> 
> I understand the reasons for this warning but I don't really trust the
> check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't know
> how the firmware team populates the fw_version so I'm worried that if we
> ever switch to a different firmware branch (or similar) this warning
> might all of sudden start triggering for the users.
> 

In that case, maybe would it be better to just have a list of the public 
firmware with issue and ensure it doesn't match one of those?

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

* Re: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
@ 2023-02-27 13:07     ` Mario Limonciello
  0 siblings, 0 replies; 14+ messages in thread
From: Mario Limonciello @ 2023-02-27 13:07 UTC (permalink / raw)
  To: Kalle Valo
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

On 2/27/23 06:36, Kalle Valo wrote:
> Mario Limonciello <mario.limonciello@amd.com> writes:
> 
>> When WCN6855 firmware versions less than 0x110B196E are used with
>> an AMD APU and the user puts the system into s2idle spurious wakeup
>> events can occur. These are difficult to attribute to the WLAN F/W
>> so add a warning to the kernel driver to give users a hint where
>> to look.
>>
>> This was tested on WCN6855 and a Lenovo Z13 with the following
>> firmware versions:
>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>>
>> Link: http://lists.infradead.org/pipermail/ath11k/2023-February/004024.html
>> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2377
>> Link: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2006458
>> Link: https://lore.kernel.org/linux-gpio/20221012221028.4817-1-mario.limonciello@amd.com/
>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> 
> [...]
> 
>> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
>> +{
>> +	struct pci_dev *rdev;
>> +
>> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
>> +		return;
>> +
>> +	if (ab->id.device != WCN6855_DEVICE_ID)
>> +		return;
>> +
>> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
>> +		return;
>> +
>> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
>> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
>> +		ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups. Upgrade to 0x%x or later.",
>> +			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);
> 
> I understand the reasons for this warning but I don't really trust the
> check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't know
> how the firmware team populates the fw_version so I'm worried that if we
> ever switch to a different firmware branch (or similar) this warning
> might all of sudden start triggering for the users.
> 

In that case, maybe would it be better to just have a list of the public 
firmware with issue and ensure it doesn't match one of those?

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* Re: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
  2023-02-27 13:07     ` Mario Limonciello
@ 2023-02-27 13:14       ` Kalle Valo
  -1 siblings, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2023-02-27 13:14 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

Mario Limonciello <mario.limonciello@amd.com> writes:

> On 2/27/23 06:36, Kalle Valo wrote:
>
>> Mario Limonciello <mario.limonciello@amd.com> writes:
>>
>>> When WCN6855 firmware versions less than 0x110B196E are used with
>>> an AMD APU and the user puts the system into s2idle spurious wakeup
>>> events can occur. These are difficult to attribute to the WLAN F/W
>>> so add a warning to the kernel driver to give users a hint where
>>> to look.
>>>
>>> This was tested on WCN6855 and a Lenovo Z13 with the following
>>> firmware versions:
>>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
>>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>>>
>>> Link: http://lists.infradead.org/pipermail/ath11k/2023-February/004024.html
>>> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2377
>>> Link: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2006458
>>> Link:
>>> https://lore.kernel.org/linux-gpio/20221012221028.4817-1-mario.limonciello@amd.com/
>>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>>
>> [...]
>>
>>> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
>>> +{
>>> +	struct pci_dev *rdev;
>>> +
>>> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
>>> +		return;
>>> +
>>> +	if (ab->id.device != WCN6855_DEVICE_ID)
>>> +		return;
>>> +
>>> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
>>> +		return;
>>> +
>>> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
>>> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
>>> + ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups.
>>> Upgrade to 0x%x or later.",
>>> +			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);
>>
>> I understand the reasons for this warning but I don't really trust the
>> check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't know
>> how the firmware team populates the fw_version so I'm worried that if we
>> ever switch to a different firmware branch (or similar) this warning
>> might all of sudden start triggering for the users.
>>
>
> In that case, maybe would it be better to just have a list of the
> public firmware with issue and ensure it doesn't match one of those?

You mean ath11k checking for known broken versions and reporting that?
We have so many different firmwares to support in ath11k, I'm not really
keen on adding tests for a specific version.

We have a list of known important bugs in the wiki:

https://wireless.wiki.kernel.org/en/users/drivers/ath11k#known_bugslimitations

What about adding the issue there, would that get more exposure to the
bug and hopefully the users would upgrade the firmware?

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

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

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

* Re: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
@ 2023-02-27 13:14       ` Kalle Valo
  0 siblings, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2023-02-27 13:14 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

Mario Limonciello <mario.limonciello@amd.com> writes:

> On 2/27/23 06:36, Kalle Valo wrote:
>
>> Mario Limonciello <mario.limonciello@amd.com> writes:
>>
>>> When WCN6855 firmware versions less than 0x110B196E are used with
>>> an AMD APU and the user puts the system into s2idle spurious wakeup
>>> events can occur. These are difficult to attribute to the WLAN F/W
>>> so add a warning to the kernel driver to give users a hint where
>>> to look.
>>>
>>> This was tested on WCN6855 and a Lenovo Z13 with the following
>>> firmware versions:
>>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
>>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>>>
>>> Link: http://lists.infradead.org/pipermail/ath11k/2023-February/004024.html
>>> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2377
>>> Link: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2006458
>>> Link:
>>> https://lore.kernel.org/linux-gpio/20221012221028.4817-1-mario.limonciello@amd.com/
>>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>>
>> [...]
>>
>>> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
>>> +{
>>> +	struct pci_dev *rdev;
>>> +
>>> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
>>> +		return;
>>> +
>>> +	if (ab->id.device != WCN6855_DEVICE_ID)
>>> +		return;
>>> +
>>> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
>>> +		return;
>>> +
>>> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
>>> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
>>> + ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups.
>>> Upgrade to 0x%x or later.",
>>> +			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);
>>
>> I understand the reasons for this warning but I don't really trust the
>> check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't know
>> how the firmware team populates the fw_version so I'm worried that if we
>> ever switch to a different firmware branch (or similar) this warning
>> might all of sudden start triggering for the users.
>>
>
> In that case, maybe would it be better to just have a list of the
> public firmware with issue and ensure it doesn't match one of those?

You mean ath11k checking for known broken versions and reporting that?
We have so many different firmwares to support in ath11k, I'm not really
keen on adding tests for a specific version.

We have a list of known important bugs in the wiki:

https://wireless.wiki.kernel.org/en/users/drivers/ath11k#known_bugslimitations

What about adding the issue there, would that get more exposure to the
bug and hopefully the users would upgrade the firmware?

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

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

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* Re: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
  2023-02-27 13:14       ` Kalle Valo
@ 2023-02-27 13:19         ` Mario Limonciello
  -1 siblings, 0 replies; 14+ messages in thread
From: Mario Limonciello @ 2023-02-27 13:19 UTC (permalink / raw)
  To: Kalle Valo
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

On 2/27/23 07:14, Kalle Valo wrote:
> Mario Limonciello <mario.limonciello@amd.com> writes:
> 
>> On 2/27/23 06:36, Kalle Valo wrote:
>>
>>> Mario Limonciello <mario.limonciello@amd.com> writes:
>>>
>>>> When WCN6855 firmware versions less than 0x110B196E are used with
>>>> an AMD APU and the user puts the system into s2idle spurious wakeup
>>>> events can occur. These are difficult to attribute to the WLAN F/W
>>>> so add a warning to the kernel driver to give users a hint where
>>>> to look.
>>>>
>>>> This was tested on WCN6855 and a Lenovo Z13 with the following
>>>> firmware versions:
>>>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
>>>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>>>>
>>>> Link: http://lists.infradead.org/pipermail/ath11k/2023-February/004024.html
>>>> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2377
>>>> Link: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2006458
>>>> Link:
>>>> https://lore.kernel.org/linux-gpio/20221012221028.4817-1-mario.limonciello@amd.com/
>>>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>>>
>>> [...]
>>>
>>>> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
>>>> +{
>>>> +	struct pci_dev *rdev;
>>>> +
>>>> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
>>>> +		return;
>>>> +
>>>> +	if (ab->id.device != WCN6855_DEVICE_ID)
>>>> +		return;
>>>> +
>>>> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
>>>> +		return;
>>>> +
>>>> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
>>>> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
>>>> + ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups.
>>>> Upgrade to 0x%x or later.",
>>>> +			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);
>>>
>>> I understand the reasons for this warning but I don't really trust the
>>> check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't know
>>> how the firmware team populates the fw_version so I'm worried that if we
>>> ever switch to a different firmware branch (or similar) this warning
>>> might all of sudden start triggering for the users.
>>>
>>
>> In that case, maybe would it be better to just have a list of the
>> public firmware with issue and ensure it doesn't match one of those?
> 
> You mean ath11k checking for known broken versions and reporting that?
> We have so many different firmwares to support in ath11k, I'm not really
> keen on adding tests for a specific version.

I checked and only found a total of 7 firmware versions published for 
WCN6855 at your ath11k-firmware repo.  I'm not sure how many went to 
linux-firmware.  But it seems like a relatively small list to have.

> 
> We have a list of known important bugs in the wiki:
> 
> https://wireless.wiki.kernel.org/en/users/drivers/ath11k#known_bugslimitations
> 
> What about adding the issue there, would that get more exposure to the
> bug and hopefully the users would upgrade the firmware?
> 

The problem is when this happens users have no way to know it's even 
caused by wireless.  So why would they go looking at the wireless wiki?

The GPIO used for WLAN is different from design to design so we can't 
put it in the GPIO driver.  There are plenty of designs that have valid 
reasons to wakeup from other GPIOs as well so it can't just be the GPIO 
driver IRQ.

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

* Re: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
@ 2023-02-27 13:19         ` Mario Limonciello
  0 siblings, 0 replies; 14+ messages in thread
From: Mario Limonciello @ 2023-02-27 13:19 UTC (permalink / raw)
  To: Kalle Valo
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

On 2/27/23 07:14, Kalle Valo wrote:
> Mario Limonciello <mario.limonciello@amd.com> writes:
> 
>> On 2/27/23 06:36, Kalle Valo wrote:
>>
>>> Mario Limonciello <mario.limonciello@amd.com> writes:
>>>
>>>> When WCN6855 firmware versions less than 0x110B196E are used with
>>>> an AMD APU and the user puts the system into s2idle spurious wakeup
>>>> events can occur. These are difficult to attribute to the WLAN F/W
>>>> so add a warning to the kernel driver to give users a hint where
>>>> to look.
>>>>
>>>> This was tested on WCN6855 and a Lenovo Z13 with the following
>>>> firmware versions:
>>>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.9
>>>> WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.23
>>>>
>>>> Link: http://lists.infradead.org/pipermail/ath11k/2023-February/004024.html
>>>> Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2377
>>>> Link: https://bugs.launchpad.net/ubuntu/+source/linux-firmware/+bug/2006458
>>>> Link:
>>>> https://lore.kernel.org/linux-gpio/20221012221028.4817-1-mario.limonciello@amd.com/
>>>> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
>>>
>>> [...]
>>>
>>>> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
>>>> +{
>>>> +	struct pci_dev *rdev;
>>>> +
>>>> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
>>>> +		return;
>>>> +
>>>> +	if (ab->id.device != WCN6855_DEVICE_ID)
>>>> +		return;
>>>> +
>>>> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
>>>> +		return;
>>>> +
>>>> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
>>>> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
>>>> + ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups.
>>>> Upgrade to 0x%x or later.",
>>>> +			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);
>>>
>>> I understand the reasons for this warning but I don't really trust the
>>> check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't know
>>> how the firmware team populates the fw_version so I'm worried that if we
>>> ever switch to a different firmware branch (or similar) this warning
>>> might all of sudden start triggering for the users.
>>>
>>
>> In that case, maybe would it be better to just have a list of the
>> public firmware with issue and ensure it doesn't match one of those?
> 
> You mean ath11k checking for known broken versions and reporting that?
> We have so many different firmwares to support in ath11k, I'm not really
> keen on adding tests for a specific version.

I checked and only found a total of 7 firmware versions published for 
WCN6855 at your ath11k-firmware repo.  I'm not sure how many went to 
linux-firmware.  But it seems like a relatively small list to have.

> 
> We have a list of known important bugs in the wiki:
> 
> https://wireless.wiki.kernel.org/en/users/drivers/ath11k#known_bugslimitations
> 
> What about adding the issue there, would that get more exposure to the
> bug and hopefully the users would upgrade the firmware?
> 

The problem is when this happens users have no way to know it's even 
caused by wireless.  So why would they go looking at the wireless wiki?

The GPIO used for WLAN is different from design to design so we can't 
put it in the GPIO driver.  There are plenty of designs that have valid 
reasons to wakeup from other GPIOs as well so it can't just be the GPIO 
driver IRQ.

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* Re: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
  2023-02-27 13:19         ` Mario Limonciello
@ 2023-04-05 10:27           ` Kalle Valo
  -1 siblings, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2023-04-05 10:27 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

Mario Limonciello <mario.limonciello@amd.com> writes:

> On 2/27/23 07:14, Kalle Valo wrote:
>
>> Mario Limonciello <mario.limonciello@amd.com> writes:
>>
>>> On 2/27/23 06:36, Kalle Valo wrote:
>>>
>>>> Mario Limonciello <mario.limonciello@amd.com> writes:
>>>>
>>>>> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
>>>>> +{
>>>>> +	struct pci_dev *rdev;
>>>>> +
>>>>> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
>>>>> +		return;
>>>>> +
>>>>> +	if (ab->id.device != WCN6855_DEVICE_ID)
>>>>> +		return;
>>>>> +
>>>>> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
>>>>> +		return;
>>>>> +
>>>>> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
>>>>> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
>>>>> + ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups.
>>>>> Upgrade to 0x%x or later.",
>>>>> +			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);
>>>>
>>>> I understand the reasons for this warning but I don't really trust the
>>>> check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't know
>>>> how the firmware team populates the fw_version so I'm worried that if we
>>>> ever switch to a different firmware branch (or similar) this warning
>>>> might all of sudden start triggering for the users.
>>>>
>>>
>>> In that case, maybe would it be better to just have a list of the
>>> public firmware with issue and ensure it doesn't match one of those?
>>
>> You mean ath11k checking for known broken versions and reporting that?
>> We have so many different firmwares to support in ath11k, I'm not really
>> keen on adding tests for a specific version.
>
> I checked and only found a total of 7 firmware versions published for
> WCN6855 at your ath11k-firmware repo.  I'm not sure how many went to
> linux-firmware.  But it seems like a relatively small list to have.

ath11k supports also other hardware families than just WCN6855, so there
are a lot of different firmware versions and branches.

>> We have a list of known important bugs in the wiki:
>>
>> https://wireless.wiki.kernel.org/en/users/drivers/ath11k#known_bugslimitations
>>
>> What about adding the issue there, would that get more exposure to the
>> bug and hopefully the users would upgrade the firmware?
>>
>
> The problem is when this happens users have no way to know it's even
> caused by wireless.  So why would they go looking at the wireless
> wiki?
>
> The GPIO used for WLAN is different from design to design so we can't
> put it in the GPIO driver.  There are plenty of designs that have
> valid reasons to wakeup from other GPIOs as well so it can't just be
> the GPIO driver IRQ.

I understand your problem but my problem is that I have three Qualcomm
drivers to support and that's a major challenge itself. So I try to keep
the drivers as simple as possible and avoid any hacks.

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

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

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

* Re: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
@ 2023-04-05 10:27           ` Kalle Valo
  0 siblings, 0 replies; 14+ messages in thread
From: Kalle Valo @ 2023-04-05 10:27 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

Mario Limonciello <mario.limonciello@amd.com> writes:

> On 2/27/23 07:14, Kalle Valo wrote:
>
>> Mario Limonciello <mario.limonciello@amd.com> writes:
>>
>>> On 2/27/23 06:36, Kalle Valo wrote:
>>>
>>>> Mario Limonciello <mario.limonciello@amd.com> writes:
>>>>
>>>>> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
>>>>> +{
>>>>> +	struct pci_dev *rdev;
>>>>> +
>>>>> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
>>>>> +		return;
>>>>> +
>>>>> +	if (ab->id.device != WCN6855_DEVICE_ID)
>>>>> +		return;
>>>>> +
>>>>> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
>>>>> +		return;
>>>>> +
>>>>> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
>>>>> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
>>>>> + ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups.
>>>>> Upgrade to 0x%x or later.",
>>>>> +			    ab->qmi.target.fw_version, WCN6855_S2IDLE_VER);
>>>>
>>>> I understand the reasons for this warning but I don't really trust the
>>>> check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't know
>>>> how the firmware team populates the fw_version so I'm worried that if we
>>>> ever switch to a different firmware branch (or similar) this warning
>>>> might all of sudden start triggering for the users.
>>>>
>>>
>>> In that case, maybe would it be better to just have a list of the
>>> public firmware with issue and ensure it doesn't match one of those?
>>
>> You mean ath11k checking for known broken versions and reporting that?
>> We have so many different firmwares to support in ath11k, I'm not really
>> keen on adding tests for a specific version.
>
> I checked and only found a total of 7 firmware versions published for
> WCN6855 at your ath11k-firmware repo.  I'm not sure how many went to
> linux-firmware.  But it seems like a relatively small list to have.

ath11k supports also other hardware families than just WCN6855, so there
are a lot of different firmware versions and branches.

>> We have a list of known important bugs in the wiki:
>>
>> https://wireless.wiki.kernel.org/en/users/drivers/ath11k#known_bugslimitations
>>
>> What about adding the issue there, would that get more exposure to the
>> bug and hopefully the users would upgrade the firmware?
>>
>
> The problem is when this happens users have no way to know it's even
> caused by wireless.  So why would they go looking at the wireless
> wiki?
>
> The GPIO used for WLAN is different from design to design so we can't
> put it in the GPIO driver.  There are plenty of designs that have
> valid reasons to wakeup from other GPIOs as well so it can't just be
> the GPIO driver IRQ.

I understand your problem but my problem is that I have three Qualcomm
drivers to support and that's a major challenge itself. So I try to keep
the drivers as simple as possible and avoid any hacks.

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

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

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

* RE: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
  2023-04-05 10:27           ` Kalle Valo
@ 2023-04-05 20:47             ` Limonciello, Mario
  -1 siblings, 0 replies; 14+ messages in thread
From: Limonciello, Mario @ 2023-04-05 20:47 UTC (permalink / raw)
  To: Kalle Valo
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

[Public]

> > On 2/27/23 07:14, Kalle Valo wrote:
> >
> >> Mario Limonciello <mario.limonciello@amd.com> writes:
> >>
> >>> On 2/27/23 06:36, Kalle Valo wrote:
> >>>
> >>>> Mario Limonciello <mario.limonciello@amd.com> writes:
> >>>>
> >>>>> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
> >>>>> +{
> >>>>> +	struct pci_dev *rdev;
> >>>>> +
> >>>>> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
> >>>>> +		return;
> >>>>> +
> >>>>> +	if (ab->id.device != WCN6855_DEVICE_ID)
> >>>>> +		return;
> >>>>> +
> >>>>> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
> >>>>> +		return;
> >>>>> +
> >>>>> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0,
> 0));
> >>>>> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
> >>>>> + ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups.
> >>>>> Upgrade to 0x%x or later.",
> >>>>> +			    ab->qmi.target.fw_version,
> WCN6855_S2IDLE_VER);
> >>>>
> >>>> I understand the reasons for this warning but I don't really trust the
> >>>> check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't
> know
> >>>> how the firmware team populates the fw_version so I'm worried that if
> we
> >>>> ever switch to a different firmware branch (or similar) this warning
> >>>> might all of sudden start triggering for the users.
> >>>>
> >>>
> >>> In that case, maybe would it be better to just have a list of the
> >>> public firmware with issue and ensure it doesn't match one of those?
> >>
> >> You mean ath11k checking for known broken versions and reporting that?
> >> We have so many different firmwares to support in ath11k, I'm not really
> >> keen on adding tests for a specific version.
> >
> > I checked and only found a total of 7 firmware versions published for
> > WCN6855 at your ath11k-firmware repo.  I'm not sure how many went to
> > linux-firmware.  But it seems like a relatively small list to have.
> 
> ath11k supports also other hardware families than just WCN6855, so there
> are a lot of different firmware versions and branches.

Right, but this change was explicitly checking the device ID matched WCN6855.

So it could be a single check for that device and any of the 5 bad firmware binaries.

> 
> >> We have a list of known important bugs in the wiki:
> >>
> >>
> https://wireless.wiki.kernel.org/en/users/drivers/ath11k#known_bugslimita
> tions
> >>
> >> What about adding the issue there, would that get more exposure to the
> >> bug and hopefully the users would upgrade the firmware?
> >>
> >
> > The problem is when this happens users have no way to know it's even
> > caused by wireless.  So why would they go looking at the wireless
> > wiki?
> >
> > The GPIO used for WLAN is different from design to design so we can't
> > put it in the GPIO driver.  There are plenty of designs that have
> > valid reasons to wakeup from other GPIOs as well so it can't just be
> > the GPIO driver IRQ.
> 
> I understand your problem but my problem is that I have three Qualcomm
> drivers to support and that's a major challenge itself. So I try to keep
> the drivers as simple as possible and avoid any hacks.

OK.

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

* RE: [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events
@ 2023-04-05 20:47             ` Limonciello, Mario
  0 siblings, 0 replies; 14+ messages in thread
From: Limonciello, Mario @ 2023-04-05 20:47 UTC (permalink / raw)
  To: Kalle Valo
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	ath11k, linux-wireless, netdev, linux-kernel

[Public]

> > On 2/27/23 07:14, Kalle Valo wrote:
> >
> >> Mario Limonciello <mario.limonciello@amd.com> writes:
> >>
> >>> On 2/27/23 06:36, Kalle Valo wrote:
> >>>
> >>>> Mario Limonciello <mario.limonciello@amd.com> writes:
> >>>>
> >>>>> +static void ath11k_check_s2idle_bug(struct ath11k_base *ab)
> >>>>> +{
> >>>>> +	struct pci_dev *rdev;
> >>>>> +
> >>>>> +	if (pm_suspend_target_state != PM_SUSPEND_TO_IDLE)
> >>>>> +		return;
> >>>>> +
> >>>>> +	if (ab->id.device != WCN6855_DEVICE_ID)
> >>>>> +		return;
> >>>>> +
> >>>>> +	if (ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER)
> >>>>> +		return;
> >>>>> +
> >>>>> +	rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0,
> 0));
> >>>>> +	if (rdev->vendor == PCI_VENDOR_ID_AMD)
> >>>>> + ath11k_warn(ab, "fw_version 0x%x may cause spurious wakeups.
> >>>>> Upgrade to 0x%x or later.",
> >>>>> +			    ab->qmi.target.fw_version,
> WCN6855_S2IDLE_VER);
> >>>>
> >>>> I understand the reasons for this warning but I don't really trust the
> >>>> check 'ab->qmi.target.fw_version >= WCN6855_S2IDLE_VER'. I don't
> know
> >>>> how the firmware team populates the fw_version so I'm worried that if
> we
> >>>> ever switch to a different firmware branch (or similar) this warning
> >>>> might all of sudden start triggering for the users.
> >>>>
> >>>
> >>> In that case, maybe would it be better to just have a list of the
> >>> public firmware with issue and ensure it doesn't match one of those?
> >>
> >> You mean ath11k checking for known broken versions and reporting that?
> >> We have so many different firmwares to support in ath11k, I'm not really
> >> keen on adding tests for a specific version.
> >
> > I checked and only found a total of 7 firmware versions published for
> > WCN6855 at your ath11k-firmware repo.  I'm not sure how many went to
> > linux-firmware.  But it seems like a relatively small list to have.
> 
> ath11k supports also other hardware families than just WCN6855, so there
> are a lot of different firmware versions and branches.

Right, but this change was explicitly checking the device ID matched WCN6855.

So it could be a single check for that device and any of the 5 bad firmware binaries.

> 
> >> We have a list of known important bugs in the wiki:
> >>
> >>
> https://wireless.wiki.kernel.org/en/users/drivers/ath11k#known_bugslimita
> tions
> >>
> >> What about adding the issue there, would that get more exposure to the
> >> bug and hopefully the users would upgrade the firmware?
> >>
> >
> > The problem is when this happens users have no way to know it's even
> > caused by wireless.  So why would they go looking at the wireless
> > wiki?
> >
> > The GPIO used for WLAN is different from design to design so we can't
> > put it in the GPIO driver.  There are plenty of designs that have
> > valid reasons to wakeup from other GPIOs as well so it can't just be
> > the GPIO driver IRQ.
> 
> I understand your problem but my problem is that I have three Qualcomm
> drivers to support and that's a major challenge itself. So I try to keep
> the drivers as simple as possible and avoid any hacks.

OK.

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

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

end of thread, other threads:[~2023-04-05 20:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 21:38 [PATCH] wifi: ath11k: Add a warning for wcn6855 spurious wakeup events Mario Limonciello
2023-02-20 21:38 ` Mario Limonciello
2023-02-27 12:36 ` Kalle Valo
2023-02-27 12:36   ` Kalle Valo
2023-02-27 13:07   ` Mario Limonciello
2023-02-27 13:07     ` Mario Limonciello
2023-02-27 13:14     ` Kalle Valo
2023-02-27 13:14       ` Kalle Valo
2023-02-27 13:19       ` Mario Limonciello
2023-02-27 13:19         ` Mario Limonciello
2023-04-05 10:27         ` Kalle Valo
2023-04-05 10:27           ` Kalle Valo
2023-04-05 20:47           ` Limonciello, Mario
2023-04-05 20:47             ` Limonciello, Mario

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.