diff mbox series

[v5.18] ath11k: fix driver initialization failure with WoW unsupported hw

Message ID 20220331073110.3846-1-quic_nmaran@quicinc.com (mailing list archive)
State Accepted
Commit 633469e3bac10650ecff421ba6b9603d67da884b
Delegated to: Kalle Valo
Headers show
Series [v5.18] ath11k: fix driver initialization failure with WoW unsupported hw | expand

Commit Message

Nagarajan Maran March 31, 2022, 7:31 a.m. UTC
In the "ath11k_wow_init", error value "EINVAL" is returned
when the check for firmware support of WoW feature fails,
which in turn stops the driver initialization.

Warning message:
[   31.040144] ------------[ cut here ]------------
[   31.040185] WARNING: CPU: 1 PID: 51 at drivers/net/wireless/ath/ath11k/wow.c:813 ath11k_wow_init+0xc8/0x13a8 [ath11k]
[   31.043846] Modules linked in: ath11k_pci ath11k qmi_helpers
[   31.054341] CPU: 1 PID: 51 Comm: kworker/u8:1 Tainted: G        W	5.17.0-wt-ath-594817-ga7f6aa925cf8-dirty #17
[   31.060078] Hardware name: Qualcomm Technologies, Inc. IPQ8074/AP-HK10-C2 (DT)
[   31.070578] Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work [ath11k]
[   31.077782] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   31.085676] pc : ath11k_wow_init+0xc8/0x13a8 [ath11k]
[   31.092359] lr : ath11k_mac_register+0x548/0xb98 [ath11k]
[   31.097567] sp : ffff80000aa13c40
[   31.102944] x29: ffff80000aa13c40 x28: ffff800009184390 x27: ffff000002959f20
[   31.106251] x26: ffff000002828000 x25: ffff000002830000 x24: ffff000002830000
[   31.113369] x23: ffff000002820000 x22: ffff00000282854c x21: 0000000000000000
[   31.120487] x20: ffff00000295cf20 x19: ffff000002828540 x18: 0000000000000031
[   31.127605] x17: 0000000000000004 x16: ffff0000028285fc x15: ffff00000295b040
[   31.134723] x14: 0000000000000067 x13: ffff00000282859c x12: 000000000000000d
[   31.141840] x11: 0000000000000018 x10: 0000000000000004 x9 : 0000000000000000
[   31.148959] x8 : ffff00000289d680 x7 : 0000000000000000 x6 : 000000000000003f
[   31.156077] x5 : 0000000000000040 x4 : 0000000000000000 x3 : ffff000002820968
[   31.163196] x2 : 0000000000000080 x1 : 0080008af9981779 x0 : ffff000002959f20
[   31.170314] Call trace:
[   31.177421]  ath11k_wow_init+0xc8/0x13a8 [ath11k]
[   31.179684]  ath11k_core_qmi_firmware_ready+0x430/0x5e0 [ath11k]
[   31.184548]  ath11k_qmi_driver_event_work+0x16c/0x4f8 [ath11k]
[   31.190623]  process_one_work+0x134/0x350
[   31.196262]  worker_thread+0x12c/0x450
[   31.200340]  kthread+0xf4/0x110
[   31.203986]  ret_from_fork+0x10/0x20
[   31.207026] ---[ end trace 0000000000000000 ]---
[   31.210894] ath11k_pci 0000:01:00.0: failed to init wow: -22
[   31.215467] ath11k_pci 0000:01:00.0: failed register the radio with mac80211: -22
[   31.221117] ath11k_pci 0000:01:00.0: failed to create pdev core: -22

Fix this by returning value "0" when FW doesn't support WoW
to allow driver to proceed with initialize sequence and also
remove the unnecessary "WARN_ON".

Fixes: ba9177fcef21 ("Add basic WoW functionalities")
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1

Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>
---
 drivers/net/wireless/ath/ath11k/wow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Kalle Valo March 31, 2022, 10:44 a.m. UTC | #1
Nagarajan Maran <quic_nmaran@quicinc.com> writes:

> In the "ath11k_wow_init", error value "EINVAL" is returned
> when the check for firmware support of WoW feature fails,
> which in turn stops the driver initialization.
>
> Warning message:
> [   31.040144] ------------[ cut here ]------------
> [   31.040185] WARNING: CPU: 1 PID: 51 at drivers/net/wireless/ath/ath11k/wow.c:813 ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.043846] Modules linked in: ath11k_pci ath11k qmi_helpers
> [   31.054341] CPU: 1 PID: 51 Comm: kworker/u8:1 Tainted: G        W	5.17.0-wt-ath-594817-ga7f6aa925cf8-dirty #17
> [   31.060078] Hardware name: Qualcomm Technologies, Inc. IPQ8074/AP-HK10-C2 (DT)
> [   31.070578] Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work [ath11k]
> [   31.077782] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> [   31.085676] pc : ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.092359] lr : ath11k_mac_register+0x548/0xb98 [ath11k]
> [   31.097567] sp : ffff80000aa13c40
> [   31.102944] x29: ffff80000aa13c40 x28: ffff800009184390 x27: ffff000002959f20
> [   31.106251] x26: ffff000002828000 x25: ffff000002830000 x24: ffff000002830000
> [   31.113369] x23: ffff000002820000 x22: ffff00000282854c x21: 0000000000000000
> [   31.120487] x20: ffff00000295cf20 x19: ffff000002828540 x18: 0000000000000031
> [   31.127605] x17: 0000000000000004 x16: ffff0000028285fc x15: ffff00000295b040
> [   31.134723] x14: 0000000000000067 x13: ffff00000282859c x12: 000000000000000d
> [   31.141840] x11: 0000000000000018 x10: 0000000000000004 x9 : 0000000000000000
> [   31.148959] x8 : ffff00000289d680 x7 : 0000000000000000 x6 : 000000000000003f
> [   31.156077] x5 : 0000000000000040 x4 : 0000000000000000 x3 : ffff000002820968
> [   31.163196] x2 : 0000000000000080 x1 : 0080008af9981779 x0 : ffff000002959f20
> [   31.170314] Call trace:
> [   31.177421]  ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.179684]  ath11k_core_qmi_firmware_ready+0x430/0x5e0 [ath11k]
> [   31.184548]  ath11k_qmi_driver_event_work+0x16c/0x4f8 [ath11k]
> [   31.190623]  process_one_work+0x134/0x350
> [   31.196262]  worker_thread+0x12c/0x450
> [   31.200340]  kthread+0xf4/0x110
> [   31.203986]  ret_from_fork+0x10/0x20
> [   31.207026] ---[ end trace 0000000000000000 ]---
> [   31.210894] ath11k_pci 0000:01:00.0: failed to init wow: -22
> [   31.215467] ath11k_pci 0000:01:00.0: failed register the radio with mac80211: -22
> [   31.221117] ath11k_pci 0000:01:00.0: failed to create pdev core: -22
>
> Fix this by returning value "0" when FW doesn't support WoW
> to allow driver to proceed with initialize sequence and also
> remove the unnecessary "WARN_ON".
>
> Fixes: ba9177fcef21 ("Add basic WoW functionalities")
> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>

Fixes tag is wrong, it should be:

Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")

I fixed it in the pending branch.
Nagarajan Maran March 31, 2022, 10:56 a.m. UTC | #2
-----Original Message-----
From: Kalle Valo <kvalo@kernel.org> 
Sent: Thursday, March 31, 2022 4:15 PM
To: Nagarajan Maran (QUIC) <quic_nmaran@quicinc.com>
Cc: ath11k@lists.infradead.org; linux-wireless@vger.kernel.org
Subject: Re: [PATCH v5.18] ath11k: fix driver initialization failure with WoW unsupported hw

Nagarajan Maran <quic_nmaran@quicinc.com> writes:

> In the "ath11k_wow_init", error value "EINVAL" is returned when the 
> check for firmware support of WoW feature fails, which in turn stops 
> the driver initialization.
>
> Warning message:
> [   31.040144] ------------[ cut here ]------------
> [   31.040185] WARNING: CPU: 1 PID: 51 at drivers/net/wireless/ath/ath11k/wow.c:813 ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.043846] Modules linked in: ath11k_pci ath11k qmi_helpers
> [   31.054341] CPU: 1 PID: 51 Comm: kworker/u8:1 Tainted: G        W	5.17.0-wt-ath-594817-ga7f6aa925cf8-dirty #17
> [   31.060078] Hardware name: Qualcomm Technologies, Inc. IPQ8074/AP-HK10-C2 (DT)
> [   31.070578] Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work [ath11k]
> [   31.077782] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> [   31.085676] pc : ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.092359] lr : ath11k_mac_register+0x548/0xb98 [ath11k]
> [   31.097567] sp : ffff80000aa13c40
> [   31.102944] x29: ffff80000aa13c40 x28: ffff800009184390 x27: ffff000002959f20
> [   31.106251] x26: ffff000002828000 x25: ffff000002830000 x24: ffff000002830000
> [   31.113369] x23: ffff000002820000 x22: ffff00000282854c x21: 0000000000000000
> [   31.120487] x20: ffff00000295cf20 x19: ffff000002828540 x18: 0000000000000031
> [   31.127605] x17: 0000000000000004 x16: ffff0000028285fc x15: ffff00000295b040
> [   31.134723] x14: 0000000000000067 x13: ffff00000282859c x12: 000000000000000d
> [   31.141840] x11: 0000000000000018 x10: 0000000000000004 x9 : 0000000000000000
> [   31.148959] x8 : ffff00000289d680 x7 : 0000000000000000 x6 : 000000000000003f
> [   31.156077] x5 : 0000000000000040 x4 : 0000000000000000 x3 : ffff000002820968
> [   31.163196] x2 : 0000000000000080 x1 : 0080008af9981779 x0 : ffff000002959f20
> [   31.170314] Call trace:
> [   31.177421]  ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.179684]  ath11k_core_qmi_firmware_ready+0x430/0x5e0 [ath11k]
> [   31.184548]  ath11k_qmi_driver_event_work+0x16c/0x4f8 [ath11k]
> [   31.190623]  process_one_work+0x134/0x350
> [   31.196262]  worker_thread+0x12c/0x450
> [   31.200340]  kthread+0xf4/0x110
> [   31.203986]  ret_from_fork+0x10/0x20
> [   31.207026] ---[ end trace 0000000000000000 ]---
> [   31.210894] ath11k_pci 0000:01:00.0: failed to init wow: -22
> [   31.215467] ath11k_pci 0000:01:00.0: failed register the radio with mac80211: -22
> [   31.221117] ath11k_pci 0000:01:00.0: failed to create pdev core: -22
>
> Fix this by returning value "0" when FW doesn't support WoW to allow 
> driver to proceed with initialize sequence and also remove the 
> unnecessary "WARN_ON".
>
> Fixes: ba9177fcef21 ("Add basic WoW functionalities")
> Tested-on: QCN9074 hw1.0 PCI 
> WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
>
> Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>

>Fixes tag is wrong, it should be:

>Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")

>I fixed it in the pending branch.

Thanks, Kalle. Will note this for the my next reviews.

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

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Johannes Berg March 31, 2022, 11:59 a.m. UTC | #3
On Thu, 2022-03-31 at 13:44 +0300, Kalle Valo wrote:
> > 
> > Fixes: ba9177fcef21 ("Add basic WoW functionalities")
> 
> Fixes tag is wrong, it should be:
> 
> Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")
> 

$ git config --global --add alias.fixes 'show -q --format=fixes'
$ git config --global --add pretty.fixes 'Fixes: %h ("%s")'
$ git config --global --add core.abbrev 12
$ git fixes ba9177fcef21
Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")

:)

johannes
Nagarajan Maran March 31, 2022, 4:37 p.m. UTC | #4
-----Original Message-----
From: Johannes Berg <johannes@sipsolutions.net> 
Sent: Thursday, March 31, 2022 5:29 PM
To: Kalle Valo <kvalo@kernel.org>; Nagarajan Maran (QUIC) <quic_nmaran@quicinc.com>
Cc: ath11k@lists.infradead.org; linux-wireless@vger.kernel.org
Subject: Re: [PATCH v5.18] ath11k: fix driver initialization failure with WoW unsupported hw

On Thu, 2022-03-31 at 13:44 +0300, Kalle Valo wrote:
> > 
> > Fixes: ba9177fcef21 ("Add basic WoW functionalities")
> 
> Fixes tag is wrong, it should be:
> 
> Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")
> 

$ git config --global --add alias.fixes 'show -q --format=fixes'
$ git config --global --add pretty.fixes 'Fixes: %h ("%s")'
$ git config --global --add core.abbrev 12 $ git fixes ba9177fcef21
Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")

:)

Johannes

Thank you for the commands.

-Nagarajan
Kalle Valo April 1, 2022, 5:46 a.m. UTC | #5
"Nagarajan Maran (QUIC)" <quic_nmaran@quicinc.com> writes:

> -----Original Message-----
> From: Johannes Berg <johannes@sipsolutions.net> 
> Sent: Thursday, March 31, 2022 5:29 PM
> To: Kalle Valo <kvalo@kernel.org>; Nagarajan Maran (QUIC) <quic_nmaran@quicinc.com>
> Cc: ath11k@lists.infradead.org; linux-wireless@vger.kernel.org
> Subject: Re: [PATCH v5.18] ath11k: fix driver initialization failure
> with WoW unsupported hw
>
> On Thu, 2022-03-31 at 13:44 +0300, Kalle Valo wrote:
>> > 
>> > Fixes: ba9177fcef21 ("Add basic WoW functionalities")
>> 
>> Fixes tag is wrong, it should be:
>> 
>> Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")
>> 
>
> $ git config --global --add alias.fixes 'show -q --format=fixes'
> $ git config --global --add pretty.fixes 'Fixes: %h ("%s")'
> $ git config --global --add core.abbrev 12 $ git fixes ba9177fcef21
> Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")
>
> :)
>
> Johannes
>
> Thank you for the commands.

Please use '> ' in your quotation, otherwise your replies are hard to
read. See item 5 here:

http://www.infradead.org/~dwmw2/email.html
Kalle Valo April 1, 2022, 11:28 a.m. UTC | #6
Johannes Berg <johannes@sipsolutions.net> writes:

> On Thu, 2022-03-31 at 13:44 +0300, Kalle Valo wrote:
>> > 
>> > Fixes: ba9177fcef21 ("Add basic WoW functionalities")
>> 
>> Fixes tag is wrong, it should be:
>> 
>> Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")
>> 
>
> $ git config --global --add alias.fixes 'show -q --format=fixes'
> $ git config --global --add pretty.fixes 'Fixes: %h ("%s")'
> $ git config --global --add core.abbrev 12
> $ git fixes ba9177fcef21
> Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")
>
> :)

Hehe, really nice! I added this to the wiki:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#fixes_line_is_incorrect
Kalle Valo April 1, 2022, 11:51 a.m. UTC | #7
Nagarajan Maran <quic_nmaran@quicinc.com> wrote:

> In the "ath11k_wow_init", error value "EINVAL" is returned
> when the check for firmware support of WoW feature fails,
> which in turn stops the driver initialization.
> 
> Warning message:
> [   31.040144] ------------[ cut here ]------------
> [   31.040185] WARNING: CPU: 1 PID: 51 at drivers/net/wireless/ath/ath11k/wow.c:813 ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.043846] Modules linked in: ath11k_pci ath11k qmi_helpers
> [   31.054341] CPU: 1 PID: 51 Comm: kworker/u8:1 Tainted: G        W    5.17.0-wt-ath-594817-ga7f6aa925cf8-dirty #17
> [   31.060078] Hardware name: Qualcomm Technologies, Inc. IPQ8074/AP-HK10-C2 (DT)
> [   31.070578] Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work [ath11k]
> [   31.077782] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> [   31.085676] pc : ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.092359] lr : ath11k_mac_register+0x548/0xb98 [ath11k]
> [   31.097567] sp : ffff80000aa13c40
> [   31.102944] x29: ffff80000aa13c40 x28: ffff800009184390 x27: ffff000002959f20
> [   31.106251] x26: ffff000002828000 x25: ffff000002830000 x24: ffff000002830000
> [   31.113369] x23: ffff000002820000 x22: ffff00000282854c x21: 0000000000000000
> [   31.120487] x20: ffff00000295cf20 x19: ffff000002828540 x18: 0000000000000031
> [   31.127605] x17: 0000000000000004 x16: ffff0000028285fc x15: ffff00000295b040
> [   31.134723] x14: 0000000000000067 x13: ffff00000282859c x12: 000000000000000d
> [   31.141840] x11: 0000000000000018 x10: 0000000000000004 x9 : 0000000000000000
> [   31.148959] x8 : ffff00000289d680 x7 : 0000000000000000 x6 : 000000000000003f
> [   31.156077] x5 : 0000000000000040 x4 : 0000000000000000 x3 : ffff000002820968
> [   31.163196] x2 : 0000000000000080 x1 : 0080008af9981779 x0 : ffff000002959f20
> [   31.170314] Call trace:
> [   31.177421]  ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.179684]  ath11k_core_qmi_firmware_ready+0x430/0x5e0 [ath11k]
> [   31.184548]  ath11k_qmi_driver_event_work+0x16c/0x4f8 [ath11k]
> [   31.190623]  process_one_work+0x134/0x350
> [   31.196262]  worker_thread+0x12c/0x450
> [   31.200340]  kthread+0xf4/0x110
> [   31.203986]  ret_from_fork+0x10/0x20
> [   31.207026] ---[ end trace 0000000000000000 ]---
> [   31.210894] ath11k_pci 0000:01:00.0: failed to init wow: -22
> [   31.215467] ath11k_pci 0000:01:00.0: failed register the radio with mac80211: -22
> [   31.221117] ath11k_pci 0000:01:00.0: failed to create pdev core: -22
> 
> Fix this by returning value "0" when FW doesn't support WoW
> to allow driver to proceed with initialize sequence and also
> remove the unnecessary "WARN_ON".
> 
> 
> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
> 
> Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")
> Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Even though I asked you to mark this for v5.18, I now realised that commit
ba9177fcef21 is only in ath-next. So I'll apply this to ath-next as well.
Nagarajan Maran April 1, 2022, 2:03 p.m. UTC | #8
-----Original Message-----
From: Kalle Valo <kvalo@kernel.org> 
Sent: Friday, April 1, 2022 11:17 AM
To: Nagarajan Maran (QUIC) <quic_nmaran@quicinc.com>
Cc: Johannes Berg <johannes@sipsolutions.net>; ath11k@lists.infradead.org; linux-wireless@vger.kernel.org
Subject: Re: [PATCH v5.18] ath11k: fix driver initialization failure with WoW unsupported hw

"Nagarajan Maran (QUIC)" <quic_nmaran@quicinc.com> writes:

> -----Original Message-----
> From: Johannes Berg <johannes@sipsolutions.net>
> Sent: Thursday, March 31, 2022 5:29 PM
> To: Kalle Valo <kvalo@kernel.org>; Nagarajan Maran (QUIC) 
> <quic_nmaran@quicinc.com>
> Cc: ath11k@lists.infradead.org; linux-wireless@vger.kernel.org
> Subject: Re: [PATCH v5.18] ath11k: fix driver initialization failure 
> with WoW unsupported hw
>
> On Thu, 2022-03-31 at 13:44 +0300, Kalle Valo wrote:
>> > 
>> > Fixes: ba9177fcef21 ("Add basic WoW functionalities")
>> 
>> Fixes tag is wrong, it should be:
>> 
>> Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")
>> 
>
> $ git config --global --add alias.fixes 'show -q --format=fixes'
> $ git config --global --add pretty.fixes 'Fixes: %h ("%s")'
> $ git config --global --add core.abbrev 12 $ git fixes ba9177fcef21
> Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")
>
> :)
>
> Johannes
>
> Thank you for the commands.

> Please use '> ' in your quotation, otherwise your replies are hard to read. See item 5 here:

> http://www.infradead.org/~dwmw2/email.html

Sure Kalle, thanks for sharing.
-Nagarajan.M

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

> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Nagarajan Maran April 1, 2022, 2:05 p.m. UTC | #9
-----Original Message-----
From: Kalle Valo <kvalo@kernel.org> 
Sent: Friday, April 1, 2022 5:22 PM
To: Nagarajan Maran (QUIC) <quic_nmaran@quicinc.com>
Cc: ath11k@lists.infradead.org; linux-wireless@vger.kernel.org; Nagarajan Maran (QUIC) <quic_nmaran@quicinc.com>
Subject: Re: [PATCH v5.18] ath11k: fix driver initialization failure with WoW unsupported hw

Nagarajan Maran <quic_nmaran@quicinc.com> wrote:

> In the "ath11k_wow_init", error value "EINVAL" is returned when the 
> check for firmware support of WoW feature fails, which in turn stops 
> the driver initialization.
> 
> Warning message:
> [   31.040144] ------------[ cut here ]------------
> [   31.040185] WARNING: CPU: 1 PID: 51 at drivers/net/wireless/ath/ath11k/wow.c:813 ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.043846] Modules linked in: ath11k_pci ath11k qmi_helpers
> [   31.054341] CPU: 1 PID: 51 Comm: kworker/u8:1 Tainted: G        W    5.17.0-wt-ath-594817-ga7f6aa925cf8-dirty #17
> [   31.060078] Hardware name: Qualcomm Technologies, Inc. IPQ8074/AP-HK10-C2 (DT)
> [   31.070578] Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work [ath11k]
> [   31.077782] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> [   31.085676] pc : ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.092359] lr : ath11k_mac_register+0x548/0xb98 [ath11k]
> [   31.097567] sp : ffff80000aa13c40
> [   31.102944] x29: ffff80000aa13c40 x28: ffff800009184390 x27: ffff000002959f20
> [   31.106251] x26: ffff000002828000 x25: ffff000002830000 x24: ffff000002830000
> [   31.113369] x23: ffff000002820000 x22: ffff00000282854c x21: 0000000000000000
> [   31.120487] x20: ffff00000295cf20 x19: ffff000002828540 x18: 0000000000000031
> [   31.127605] x17: 0000000000000004 x16: ffff0000028285fc x15: ffff00000295b040
> [   31.134723] x14: 0000000000000067 x13: ffff00000282859c x12: 000000000000000d
> [   31.141840] x11: 0000000000000018 x10: 0000000000000004 x9 : 0000000000000000
> [   31.148959] x8 : ffff00000289d680 x7 : 0000000000000000 x6 : 000000000000003f
> [   31.156077] x5 : 0000000000000040 x4 : 0000000000000000 x3 : ffff000002820968
> [   31.163196] x2 : 0000000000000080 x1 : 0080008af9981779 x0 : ffff000002959f20
> [   31.170314] Call trace:
> [   31.177421]  ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.179684]  ath11k_core_qmi_firmware_ready+0x430/0x5e0 [ath11k]
> [   31.184548]  ath11k_qmi_driver_event_work+0x16c/0x4f8 [ath11k]
> [   31.190623]  process_one_work+0x134/0x350
> [   31.196262]  worker_thread+0x12c/0x450
> [   31.200340]  kthread+0xf4/0x110
> [   31.203986]  ret_from_fork+0x10/0x20
> [   31.207026] ---[ end trace 0000000000000000 ]---
> [   31.210894] ath11k_pci 0000:01:00.0: failed to init wow: -22
> [   31.215467] ath11k_pci 0000:01:00.0: failed register the radio with mac80211: -22
> [   31.221117] ath11k_pci 0000:01:00.0: failed to create pdev core: -22
> 
> Fix this by returning value "0" when FW doesn't support WoW to allow 
> driver to proceed with initialize sequence and also remove the 
> unnecessary "WARN_ON".
> 
> 
> Tested-on: QCN9074 hw1.0 PCI 
> WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
> 
> Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")
> Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

> Even though I asked you to mark this for v5.18, I now realised that commit
> ba9177fcef21 is only in ath-next. So I'll apply this to ath-next as well.

Sure Kalle, thanks for sharing.
- Nagarajan.M
> --
> https://patchwork.kernel.org/project/linux-wireless/patch/20220331073110.3846-1-quic_nmaran@quicinc.com/

> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Kalle Valo April 5, 2022, 8:12 a.m. UTC | #10
Nagarajan Maran <quic_nmaran@quicinc.com> wrote:

> In the "ath11k_wow_init", error value "EINVAL" is returned
> when the check for firmware support of WoW feature fails,
> which in turn stops the driver initialization.
> 
> Warning message:
> [   31.040144] ------------[ cut here ]------------
> [   31.040185] WARNING: CPU: 1 PID: 51 at drivers/net/wireless/ath/ath11k/wow.c:813 ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.043846] Modules linked in: ath11k_pci ath11k qmi_helpers
> [   31.054341] CPU: 1 PID: 51 Comm: kworker/u8:1 Tainted: G        W    5.17.0-wt-ath-594817-ga7f6aa925cf8-dirty #17
> [   31.060078] Hardware name: Qualcomm Technologies, Inc. IPQ8074/AP-HK10-C2 (DT)
> [   31.070578] Workqueue: ath11k_qmi_driver_event ath11k_qmi_driver_event_work [ath11k]
> [   31.077782] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
> [   31.085676] pc : ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.092359] lr : ath11k_mac_register+0x548/0xb98 [ath11k]
> [   31.097567] sp : ffff80000aa13c40
> [   31.102944] x29: ffff80000aa13c40 x28: ffff800009184390 x27: ffff000002959f20
> [   31.106251] x26: ffff000002828000 x25: ffff000002830000 x24: ffff000002830000
> [   31.113369] x23: ffff000002820000 x22: ffff00000282854c x21: 0000000000000000
> [   31.120487] x20: ffff00000295cf20 x19: ffff000002828540 x18: 0000000000000031
> [   31.127605] x17: 0000000000000004 x16: ffff0000028285fc x15: ffff00000295b040
> [   31.134723] x14: 0000000000000067 x13: ffff00000282859c x12: 000000000000000d
> [   31.141840] x11: 0000000000000018 x10: 0000000000000004 x9 : 0000000000000000
> [   31.148959] x8 : ffff00000289d680 x7 : 0000000000000000 x6 : 000000000000003f
> [   31.156077] x5 : 0000000000000040 x4 : 0000000000000000 x3 : ffff000002820968
> [   31.163196] x2 : 0000000000000080 x1 : 0080008af9981779 x0 : ffff000002959f20
> [   31.170314] Call trace:
> [   31.177421]  ath11k_wow_init+0xc8/0x13a8 [ath11k]
> [   31.179684]  ath11k_core_qmi_firmware_ready+0x430/0x5e0 [ath11k]
> [   31.184548]  ath11k_qmi_driver_event_work+0x16c/0x4f8 [ath11k]
> [   31.190623]  process_one_work+0x134/0x350
> [   31.196262]  worker_thread+0x12c/0x450
> [   31.200340]  kthread+0xf4/0x110
> [   31.203986]  ret_from_fork+0x10/0x20
> [   31.207026] ---[ end trace 0000000000000000 ]---
> [   31.210894] ath11k_pci 0000:01:00.0: failed to init wow: -22
> [   31.215467] ath11k_pci 0000:01:00.0: failed register the radio with mac80211: -22
> [   31.221117] ath11k_pci 0000:01:00.0: failed to create pdev core: -22
> 
> Fix this by returning value "0" when FW doesn't support WoW
> to allow driver to proceed with initialize sequence and also
> remove the unnecessary "WARN_ON".
> 
> 
> Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.5.0.1-01100-QCAHKSWPL_SILICONZ-1
> 
> Fixes: ba9177fcef21 ("ath11k: Add basic WoW functionalities")
> Signed-off-by: Nagarajan Maran <quic_nmaran@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

633469e3bac1 ath11k: fix driver initialization failure with WoW unsupported hw
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/wow.c b/drivers/net/wireless/ath/ath11k/wow.c
index 93714df834b2..6c2611f93739 100644
--- a/drivers/net/wireless/ath/ath11k/wow.c
+++ b/drivers/net/wireless/ath/ath11k/wow.c
@@ -810,8 +810,8 @@  int ath11k_wow_op_resume(struct ieee80211_hw *hw)
 
 int ath11k_wow_init(struct ath11k *ar)
 {
-	if (WARN_ON(!test_bit(WMI_TLV_SERVICE_WOW, ar->wmi->wmi_ab->svc_map)))
-		return -EINVAL;
+	if (!test_bit(WMI_TLV_SERVICE_WOW, ar->wmi->wmi_ab->svc_map))
+		return 0;
 
 	ar->wow.wowlan_support = ath11k_wowlan_support;