Re: [PATCH] ath10k: do not enforce interrupt trigger type

2022-05-22 Thread Kalle Valo
Krzysztof Kozlowski  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 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
>   $ echo 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
>   [   44.763114] irq: type mismatch, failed to map hwirq-446 for 
> interrupt-controller@17a0!
>   [   44.763130] ath10k_snoc 1880.wifi: error -ENXIO: IRQ index 0 not 
> found
>   [   44.763140] ath10k_snoc 1880.wifi: failed to initialize resource: -6
> 
> Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.0.c8-9-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 
> Tested-by: Steev Klimaszewski 
> Signed-off-by: Kalle Valo 

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.kozlow...@linaro.org/

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


___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH] ath10k: do not enforce interrupt trigger type

2022-05-18 Thread Kalle Valo
Steev Klimaszewski  writes:

> On 5/14/22 12:05 AM, Steev Klimaszewski wrote:
>>
>> On 5/13/22 10:57 AM, Kalle Valo wrote:
>>> Krzysztof Kozlowski  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 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
    $ echo 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
    [   44.763114] irq: type mismatch, failed to map hwirq-446 for
 interrupt-controller@17a0!
    [   44.763130] ath10k_snoc 1880.wifi: error -ENXIO: IRQ
 index 0 not found
    [   44.763140] ath10k_snoc 1880.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 0x0008 chip_id 0x sub :
>> 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
>>
> 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 0x4006
> 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-9-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-9-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

___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH] ath10k: do not enforce interrupt trigger type

2022-05-14 Thread Krzysztof Kozlowski
On 14/05/2022 20:09, Steev Klimaszewski wrote:

>> wcn3990 hw1.0 target 0x0008 chip_id 0x sub :
>> 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
>>
> 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 0x4006
> 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-9-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

___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH] ath10k: do not enforce interrupt trigger type

2022-05-14 Thread Krzysztof Kozlowski
On 13/05/2022 17:57, Kalle Valo wrote:
> Krzysztof Kozlowski  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 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
>>   $ echo 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
>>   [   44.763114] irq: type mismatch, failed to map hwirq-446 for 
>> interrupt-controller@17a0!
>>   [   44.763130] ath10k_snoc 1880.wifi: error -ENXIO: IRQ index 0 not 
>> found
>>   [   44.763140] ath10k_snoc 1880.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

___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH] ath10k: do not enforce interrupt trigger type

2022-05-14 Thread Steev Klimaszewski


On 5/14/22 12:05 AM, Steev Klimaszewski wrote:


On 5/13/22 10:57 AM, Kalle Valo wrote:

Krzysztof Kozlowski  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 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
   $ echo 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
   [   44.763114] irq: type mismatch, failed to map hwirq-446 for 
interrupt-controller@17a0!
   [   44.763130] ath10k_snoc 1880.wifi: error -ENXIO: IRQ index 
0 not found
   [   44.763140] ath10k_snoc 1880.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 0x0008 chip_id 0x sub :
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

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 0x4006
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-9-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



___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH] ath10k: do not enforce interrupt trigger type

2022-05-13 Thread Steev Klimaszewski


On 5/13/22 10:57 AM, Kalle Valo wrote:

Krzysztof Kozlowski  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 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
   $ echo 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
   [   44.763114] irq: type mismatch, failed to map hwirq-446 for 
interrupt-controller@17a0!
   [   44.763130] ath10k_snoc 1880.wifi: error -ENXIO: IRQ index 0 not found
   [   44.763140] ath10k_snoc 1880.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 0x0008 chip_id 0x sub :
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


___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


Re: [PATCH] ath10k: do not enforce interrupt trigger type

2022-05-13 Thread Kalle Valo
Krzysztof Kozlowski  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 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
>   $ echo 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
>   [   44.763114] irq: type mismatch, failed to map hwirq-446 for 
> interrupt-controller@17a0!
>   [   44.763130] ath10k_snoc 1880.wifi: error -ENXIO: IRQ index 0 not 
> found
>   [   44.763140] ath10k_snoc 1880.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

___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k


[PATCH] ath10k: do not enforce interrupt trigger type

2022-05-13 Thread 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 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/unbind
  $ echo 1880.wifi > /sys/bus/platform/drivers/ath10k_snoc/bind
  [   44.763114] irq: type mismatch, failed to map hwirq-446 for 
interrupt-controller@17a0!
  [   44.763130] ath10k_snoc 1880.wifi: error -ENXIO: IRQ index 0 not found
  [   44.763140] ath10k_snoc 1880.wifi: failed to initialize resource: -6

Fixes: c963a683e701 ("ath10k: add resource init and deinit for WCN3990")
Signed-off-by: Krzysztof Kozlowski 

---

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


___
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k