* [PATCH] ath10k: do not enforce interrupt trigger type
@ 2022-05-13 15:15 Krzysztof Kozlowski
2022-05-13 15:57 ` Kalle Valo
2022-05-22 12:22 ` Kalle Valo
0 siblings, 2 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-13 15:15 UTC (permalink / raw)
To: Kalle Valo, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Govind Singh, ath10k, linux-wireless, netdev,
linux-kernel
Cc: Bjorn Andersson, linux-arm-msm, Krzysztof Kozlowski
Interrupt line can be configured on different hardware in different way,
even inverted. Therefore driver should not enforce specific trigger
type - edge rising - but instead rely on Devicetree to configure it.
All Qualcomm DTSI with WCN3990 define the interrupt type as level high,
so the mismatch between DTSI and driver causes rebind issues:
$ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
$ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
[ 44.763114] irq: type mismatch, failed to map hwirq-446 for interrupt-controller@17a00000!
[ 44.763130] ath10k_snoc 18800000.wifi: error -ENXIO: IRQ index 0 not found
[ 44.763140] ath10k_snoc 18800000.wifi: failed to initialize resource: -6
Fixes: c963a683e701 ("ath10k: add resource init and deinit for WCN3990")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Separate question is whether DTS has a proper interrupt type (level
high) configured...
---
drivers/net/wireless/ath/ath10k/snoc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c
index 607e8164bf98..5576ad9fd116 100644
--- a/drivers/net/wireless/ath/ath10k/snoc.c
+++ b/drivers/net/wireless/ath/ath10k/snoc.c
@@ -1249,13 +1249,12 @@ static void ath10k_snoc_init_napi(struct ath10k *ar)
static int ath10k_snoc_request_irq(struct ath10k *ar)
{
struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar);
- int irqflags = IRQF_TRIGGER_RISING;
int ret, id;
for (id = 0; id < CE_COUNT_MAX; id++) {
ret = request_irq(ar_snoc->ce_irqs[id].irq_line,
- ath10k_snoc_per_engine_handler,
- irqflags, ce_name[id], ar);
+ ath10k_snoc_per_engine_handler, 0,
+ ce_name[id], ar);
if (ret) {
ath10k_err(ar,
"failed to register IRQ handler for CE %d: %d\n",
--
2.32.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] ath10k: do not enforce interrupt trigger type
2022-05-13 15:15 [PATCH] ath10k: do not enforce interrupt trigger type Krzysztof Kozlowski
@ 2022-05-13 15:57 ` Kalle Valo
2022-05-14 5:05 ` Steev Klimaszewski
2022-05-14 19:32 ` Krzysztof Kozlowski
2022-05-22 12:22 ` Kalle Valo
1 sibling, 2 replies; 8+ messages in thread
From: Kalle Valo @ 2022-05-13 15:57 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Govind Singh, ath10k, linux-wireless, netdev, linux-kernel,
Bjorn Andersson, linux-arm-msm
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> writes:
> Interrupt line can be configured on different hardware in different way,
> even inverted. Therefore driver should not enforce specific trigger
> type - edge rising - but instead rely on Devicetree to configure it.
>
> All Qualcomm DTSI with WCN3990 define the interrupt type as level high,
> so the mismatch between DTSI and driver causes rebind issues:
>
> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
> [ 44.763114] irq: type mismatch, failed to map hwirq-446 for interrupt-controller@17a00000!
> [ 44.763130] ath10k_snoc 18800000.wifi: error -ENXIO: IRQ index 0 not found
> [ 44.763140] ath10k_snoc 18800000.wifi: failed to initialize resource: -6
So you tested on WCN3990? On what firmware version? I can add the
Tested-on tag if you provide that.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ath10k: do not enforce interrupt trigger type
2022-05-13 15:57 ` Kalle Valo
@ 2022-05-14 5:05 ` Steev Klimaszewski
2022-05-14 18:09 ` Steev Klimaszewski
2022-05-14 19:32 ` Krzysztof Kozlowski
1 sibling, 1 reply; 8+ messages in thread
From: Steev Klimaszewski @ 2022-05-14 5:05 UTC (permalink / raw)
To: Kalle Valo, Krzysztof Kozlowski
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Govind Singh, ath10k, linux-wireless, netdev, linux-kernel,
Bjorn Andersson, linux-arm-msm
On 5/13/22 10:57 AM, Kalle Valo wrote:
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> writes:
>
>> Interrupt line can be configured on different hardware in different way,
>> even inverted. Therefore driver should not enforce specific trigger
>> type - edge rising - but instead rely on Devicetree to configure it.
>>
>> All Qualcomm DTSI with WCN3990 define the interrupt type as level high,
>> so the mismatch between DTSI and driver causes rebind issues:
>>
>> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
>> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
>> [ 44.763114] irq: type mismatch, failed to map hwirq-446 for interrupt-controller@17a00000!
>> [ 44.763130] ath10k_snoc 18800000.wifi: error -ENXIO: IRQ index 0 not found
>> [ 44.763140] ath10k_snoc 18800000.wifi: failed to initialize resource: -6
> So you tested on WCN3990? On what firmware version? I can add the
> Tested-on tag if you provide that.
>
Hello Krzystof, Kalle,
I have seen this issue as well on a Lenovo Flex 5G, which has a WCN3990:
wcn3990 hw1.0 target 0x00000008 chip_id 0x00000000 sub 0000:0000
kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0
firmware ver api 5 features wowlan,mgmt-tx-by-reference,non-bmi crc32
b3d4b790
htt-ver 3.86 wmi-op 4 htt-op 3 cal file max-sta 32 raw 0 hwcrypto 1
With this patch applied, I no longer see the error message in the commit
message, when I unbind/bind when wifi stops working.
Tested-by: Steev Klimaszewski <steev@kali.org>
-- Steev
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ath10k: do not enforce interrupt trigger type
2022-05-14 5:05 ` Steev Klimaszewski
@ 2022-05-14 18:09 ` Steev Klimaszewski
2022-05-14 19:32 ` Krzysztof Kozlowski
2022-05-18 7:18 ` Kalle Valo
0 siblings, 2 replies; 8+ messages in thread
From: Steev Klimaszewski @ 2022-05-14 18:09 UTC (permalink / raw)
To: Kalle Valo, Krzysztof Kozlowski
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Govind Singh, ath10k, linux-wireless, netdev, linux-kernel,
Bjorn Andersson, linux-arm-msm
On 5/14/22 12:05 AM, Steev Klimaszewski wrote:
>
> On 5/13/22 10:57 AM, Kalle Valo wrote:
>> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> writes:
>>
>>> Interrupt line can be configured on different hardware in different
>>> way,
>>> even inverted. Therefore driver should not enforce specific trigger
>>> type - edge rising - but instead rely on Devicetree to configure it.
>>>
>>> All Qualcomm DTSI with WCN3990 define the interrupt type as level high,
>>> so the mismatch between DTSI and driver causes rebind issues:
>>>
>>> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
>>> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
>>> [ 44.763114] irq: type mismatch, failed to map hwirq-446 for
>>> interrupt-controller@17a00000!
>>> [ 44.763130] ath10k_snoc 18800000.wifi: error -ENXIO: IRQ index
>>> 0 not found
>>> [ 44.763140] ath10k_snoc 18800000.wifi: failed to initialize
>>> resource: -6
>> So you tested on WCN3990? On what firmware version? I can add the
>> Tested-on tag if you provide that.
>>
> Hello Krzystof, Kalle,
>
> I have seen this issue as well on a Lenovo Flex 5G, which has a WCN3990:
>
> wcn3990 hw1.0 target 0x00000008 chip_id 0x00000000 sub 0000:0000
> kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0
> firmware ver api 5 features wowlan,mgmt-tx-by-reference,non-bmi crc32
> b3d4b790
> htt-ver 3.86 wmi-op 4 htt-op 3 cal file max-sta 32 raw 0 hwcrypto 1
>
> With this patch applied, I no longer see the error message in the
> commit message, when I unbind/bind when wifi stops working.
>
> Tested-by: Steev Klimaszewski <steev@kali.org>
>
> -- Steev
>
Apologies for the second email - I've tested this now on both the Lenovo
Flex 5G, as I have seen the issue on it as well, as well as on the
Lenovo Yoga C630, where I did not but I did have issues with attempting
to rebind the device, prior to this patch.
Firmware version for the Flex 5G is
qmi chip_id 0x30224 chip_family 0x4001 board_id 0xff soc_id 0x40060000
qmi fw_version 0x32080009 fw_build_timestamp 2020-11-16 14:44
fw_build_id
QC_IMAGE_VERSION_STRING=WLAN.HL.3.2.0.c8-00009-QCAHLSWSC8180XMTPLZ-1
Firmware version on the Yoga C630 is
qmi chip_id 0x30214 chip_family 0x4001 board_id 0xff soc_id 0x40030001
qmi fw_version 0x2009856b fw_build_timestamp 2018-07-19 12:28
fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ath10k: do not enforce interrupt trigger type
2022-05-13 15:57 ` Kalle Valo
2022-05-14 5:05 ` Steev Klimaszewski
@ 2022-05-14 19:32 ` Krzysztof Kozlowski
1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-14 19:32 UTC (permalink / raw)
To: Kalle Valo
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Govind Singh, ath10k, linux-wireless, netdev, linux-kernel,
Bjorn Andersson, linux-arm-msm
On 13/05/2022 17:57, Kalle Valo wrote:
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> writes:
>
>> Interrupt line can be configured on different hardware in different way,
>> even inverted. Therefore driver should not enforce specific trigger
>> type - edge rising - but instead rely on Devicetree to configure it.
>>
>> All Qualcomm DTSI with WCN3990 define the interrupt type as level high,
>> so the mismatch between DTSI and driver causes rebind issues:
>>
>> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
>> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
>> [ 44.763114] irq: type mismatch, failed to map hwirq-446 for interrupt-controller@17a00000!
>> [ 44.763130] ath10k_snoc 18800000.wifi: error -ENXIO: IRQ index 0 not found
>> [ 44.763140] ath10k_snoc 18800000.wifi: failed to initialize resource: -6
>
> So you tested on WCN3990? On what firmware version?
I run it on a Qualcomm RB3 board with Qualcomm SDM845 and WCN3990.
However on that kernel I did not manage to WiFi actually work -
regardless of that patch - so I would no count it yet as fully tested.
It would be great if someone would provide some tests. I saw Steev's
replies - thanks!
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ath10k: do not enforce interrupt trigger type
2022-05-14 18:09 ` Steev Klimaszewski
@ 2022-05-14 19:32 ` Krzysztof Kozlowski
2022-05-18 7:18 ` Kalle Valo
1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-14 19:32 UTC (permalink / raw)
To: Steev Klimaszewski, Kalle Valo
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
ath10k, linux-wireless, netdev, linux-kernel, Bjorn Andersson,
linux-arm-msm
On 14/05/2022 20:09, Steev Klimaszewski wrote:
>> wcn3990 hw1.0 target 0x00000008 chip_id 0x00000000 sub 0000:0000
>> kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0
>> firmware ver api 5 features wowlan,mgmt-tx-by-reference,non-bmi crc32
>> b3d4b790
>> htt-ver 3.86 wmi-op 4 htt-op 3 cal file max-sta 32 raw 0 hwcrypto 1
>>
>> With this patch applied, I no longer see the error message in the
>> commit message, when I unbind/bind when wifi stops working.
>>
>> Tested-by: Steev Klimaszewski <steev@kali.org>
>>
>> -- Steev
>>
> Apologies for the second email - I've tested this now on both the Lenovo
> Flex 5G, as I have seen the issue on it as well, as well as on the
> Lenovo Yoga C630, where I did not but I did have issues with attempting
> to rebind the device, prior to this patch.
>
> Firmware version for the Flex 5G is
>
> qmi chip_id 0x30224 chip_family 0x4001 board_id 0xff soc_id 0x40060000
> qmi fw_version 0x32080009 fw_build_timestamp 2020-11-16 14:44
> fw_build_id
> QC_IMAGE_VERSION_STRING=WLAN.HL.3.2.0.c8-00009-QCAHLSWSC8180XMTPLZ-1
>
> Firmware version on the Yoga C630 is
>
> qmi chip_id 0x30214 chip_family 0x4001 board_id 0xff soc_id 0x40030001
> qmi fw_version 0x2009856b fw_build_timestamp 2018-07-19 12:28
> fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1
>
Thanks for testing, much appreciated!
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ath10k: do not enforce interrupt trigger type
2022-05-14 18:09 ` Steev Klimaszewski
2022-05-14 19:32 ` Krzysztof Kozlowski
@ 2022-05-18 7:18 ` Kalle Valo
1 sibling, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2022-05-18 7:18 UTC (permalink / raw)
To: Steev Klimaszewski
Cc: Krzysztof Kozlowski, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Govind Singh, ath10k,
linux-wireless, netdev, linux-kernel, Bjorn Andersson,
linux-arm-msm
Steev Klimaszewski <steev@kali.org> writes:
> On 5/14/22 12:05 AM, Steev Klimaszewski wrote:
>>
>> On 5/13/22 10:57 AM, Kalle Valo wrote:
>>> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> writes:
>>>
>>>> Interrupt line can be configured on different hardware in
>>>> different way,
>>>> even inverted. Therefore driver should not enforce specific trigger
>>>> type - edge rising - but instead rely on Devicetree to configure it.
>>>>
>>>> All Qualcomm DTSI with WCN3990 define the interrupt type as level high,
>>>> so the mismatch between DTSI and driver causes rebind issues:
>>>>
>>>> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
>>>> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
>>>> [ 44.763114] irq: type mismatch, failed to map hwirq-446 for
>>>> interrupt-controller@17a00000!
>>>> [ 44.763130] ath10k_snoc 18800000.wifi: error -ENXIO: IRQ
>>>> index 0 not found
>>>> [ 44.763140] ath10k_snoc 18800000.wifi: failed to initialize
>>>> resource: -6
>>> So you tested on WCN3990? On what firmware version? I can add the
>>> Tested-on tag if you provide that.
>>>
>> Hello Krzystof, Kalle,
>>
>> I have seen this issue as well on a Lenovo Flex 5G, which has a WCN3990:
>>
>> wcn3990 hw1.0 target 0x00000008 chip_id 0x00000000 sub 0000:0000
>> kconfig debug 0 debugfs 0 tracing 0 dfs 0 testmode 0
>> firmware ver api 5 features wowlan,mgmt-tx-by-reference,non-bmi
>> crc32 b3d4b790
>> htt-ver 3.86 wmi-op 4 htt-op 3 cal file max-sta 32 raw 0 hwcrypto 1
>>
>> With this patch applied, I no longer see the error message in the
>> commit message, when I unbind/bind when wifi stops working.
>>
>> Tested-by: Steev Klimaszewski <steev@kali.org>
>>
>> -- Steev
>>
> Apologies for the second email - I've tested this now on both the
> Lenovo Flex 5G, as I have seen the issue on it as well, as well as on
> the Lenovo Yoga C630, where I did not but I did have issues with
> attempting to rebind the device, prior to this patch.
>
> Firmware version for the Flex 5G is
>
> qmi chip_id 0x30224 chip_family 0x4001 board_id 0xff soc_id 0x40060000
> qmi fw_version 0x32080009 fw_build_timestamp 2020-11-16 14:44
> fw_build_id
> QC_IMAGE_VERSION_STRING=WLAN.HL.3.2.0.c8-00009-QCAHLSWSC8180XMTPLZ-1
>
> Firmware version on the Yoga C630 is
>
> qmi chip_id 0x30214 chip_family 0x4001 board_id 0xff soc_id 0x40030001
> qmi fw_version 0x2009856b fw_build_timestamp 2018-07-19 12:28
> fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1
In the pending branch I added these to the commit log:
Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.0.c8-00009-QCAHLSWSC8180XMTPLZ-1
Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1
Thanks for testing, very much appreciated!
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ath10k: do not enforce interrupt trigger type
2022-05-13 15:15 [PATCH] ath10k: do not enforce interrupt trigger type Krzysztof Kozlowski
2022-05-13 15:57 ` Kalle Valo
@ 2022-05-22 12:22 ` Kalle Valo
1 sibling, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2022-05-22 12:22 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Govind Singh, ath10k, linux-wireless, netdev, linux-kernel,
Bjorn Andersson, linux-arm-msm, Krzysztof Kozlowski
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> Interrupt line can be configured on different hardware in different way,
> even inverted. Therefore driver should not enforce specific trigger
> type - edge rising - but instead rely on Devicetree to configure it.
>
> All Qualcomm DTSI with WCN3990 define the interrupt type as level high,
> so the mismatch between DTSI and driver causes rebind issues:
>
> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
> $ echo 18800000.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
> [ 44.763114] irq: type mismatch, failed to map hwirq-446 for interrupt-controller@17a00000!
> [ 44.763130] ath10k_snoc 18800000.wifi: error -ENXIO: IRQ index 0 not found
> [ 44.763140] ath10k_snoc 18800000.wifi: failed to initialize resource: -6
>
> Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.0.c8-00009-QCAHLSWSC8180XMTPLZ-1
> Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.2.0-01387-QCAHLSWMTPLZ-1
>
> Fixes: c963a683e701 ("ath10k: add resource init and deinit for WCN3990")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Tested-by: Steev Klimaszewski <steev@kali.org>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Patch applied to ath-next branch of ath.git, thanks.
1ee6c5abebd3 ath10k: do not enforce interrupt trigger type
--
https://patchwork.kernel.org/project/linux-wireless/patch/20220513151516.357549-1-krzysztof.kozlowski@linaro.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-05-22 12:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 15:15 [PATCH] ath10k: do not enforce interrupt trigger type Krzysztof Kozlowski
2022-05-13 15:57 ` Kalle Valo
2022-05-14 5:05 ` Steev Klimaszewski
2022-05-14 18:09 ` Steev Klimaszewski
2022-05-14 19:32 ` Krzysztof Kozlowski
2022-05-18 7:18 ` Kalle Valo
2022-05-14 19:32 ` Krzysztof Kozlowski
2022-05-22 12:22 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).