* [PATCH v3 1/3] ARM: dts: qcom: msm8974: Fix WCNSS wifi interrupt trigger type
2026-11-30 6:22 [PATCH v3 0/3] msm8974/wcn36xx: recover Wi-Fi after a WCNSS crash Alexandre Rapaille via B4 Relay
@ 2026-11-30 6:22 ` Alexandre Rapaille via B4 Relay
2026-11-30 6:22 ` [PATCH v3 2/3] wifi: wcn36xx: Do not enforce " Alexandre Rapaille via B4 Relay
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Alexandre Rapaille via B4 Relay @ 2026-11-30 6:22 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Loic Poulain, Luca Weiss,
Eugene Krasnikov
Cc: linux-arm-msm, devicetree, linux-kernel, wcn36xx, linux-wireless,
Alexandre Rapaille, stable, Luca Weiss
From: Alexandre Rapaille <arapaille@atlr-engineering.com>
wcn36xx requests tx/rx as IRQF_TRIGGER_HIGH, overriding this edge type, so
the re-probe after a WCNSS restart fails ("type mismatch, failed to map
hwirq-177") and wlan0 never returns. Use level high like other WCNSS SoCs.
Fixes: c7c0edecfba8 ("ARM: dts: msm8974: Introduce the wcnss remoteproc node")
Cc: stable@vger.kernel.org
Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Signed-off-by: Alexandre Rapaille <arapaille@atlr-engineering.com>
---
arch/arm/boot/dts/qcom/qcom-msm8974.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
index f300de74c47d..b9666feb8bbb 100644
--- a/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-msm8974.dtsi
@@ -814,8 +814,8 @@ bluetooth {
wifi {
compatible = "qcom,wcnss-wlan";
- interrupts = <GIC_SPI 145 IRQ_TYPE_EDGE_RISING>,
- <GIC_SPI 146 IRQ_TYPE_EDGE_RISING>;
+ interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "tx", "rx";
qcom,smem-states = <&apps_smsm 10>, <&apps_smsm 9>;
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH v3 2/3] wifi: wcn36xx: Do not enforce interrupt trigger type
2026-11-30 6:22 [PATCH v3 0/3] msm8974/wcn36xx: recover Wi-Fi after a WCNSS crash Alexandre Rapaille via B4 Relay
2026-11-30 6:22 ` [PATCH v3 1/3] ARM: dts: qcom: msm8974: Fix WCNSS wifi interrupt trigger type Alexandre Rapaille via B4 Relay
@ 2026-11-30 6:22 ` Alexandre Rapaille via B4 Relay
2026-11-30 9:00 ` Konrad Dybcio
2026-11-30 6:22 ` [PATCH v3 3/3] wifi: wcn36xx: Stop waiting on a dead firmware during remove Alexandre Rapaille via B4 Relay
2026-11-30 9:01 ` [PATCH v3 0/3] msm8974/wcn36xx: recover Wi-Fi after a WCNSS crash Konrad Dybcio
3 siblings, 1 reply; 6+ messages in thread
From: Alexandre Rapaille via B4 Relay @ 2026-11-30 6:22 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Loic Poulain, Luca Weiss,
Eugene Krasnikov
Cc: linux-arm-msm, devicetree, linux-kernel, wcn36xx, linux-wireless,
Alexandre Rapaille
From: Alexandre Rapaille <arapaille@atlr-engineering.com>
request_irq() with IRQF_TRIGGER_HIGH stores level on the IRQ mapping,
which outlives the driver, so a DT with another type gets "type
mismatch" and -ENXIO on the next probe. Rely on the DT, as ath10k does.
Every other in-tree qcom,wcnss-wlan node is level high; msm8974's DT
fix goes through the qcom tree.
Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Signed-off-by: Alexandre Rapaille <arapaille@atlr-engineering.com>
---
drivers/net/wireless/ath/wcn36xx/dxe.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/dxe.c b/drivers/net/wireless/ath/wcn36xx/dxe.c
index 801f1218ef89..7852f7136801 100644
--- a/drivers/net/wireless/ath/wcn36xx/dxe.c
+++ b/drivers/net/wireless/ath/wcn36xx/dxe.c
@@ -552,14 +552,14 @@ static int wcn36xx_dxe_request_irqs(struct wcn36xx *wcn)
{
int ret;
- ret = request_irq(wcn->tx_irq, wcn36xx_irq_tx_complete,
- IRQF_TRIGGER_HIGH, "wcn36xx_tx", wcn);
+ ret = request_irq(wcn->tx_irq, wcn36xx_irq_tx_complete, 0,
+ "wcn36xx_tx", wcn);
if (ret) {
wcn36xx_err("failed to alloc tx irq\n");
goto out_err;
}
- ret = request_irq(wcn->rx_irq, wcn36xx_irq_rx_ready, IRQF_TRIGGER_HIGH,
+ ret = request_irq(wcn->rx_irq, wcn36xx_irq_rx_ready, 0,
"wcn36xx_rx", wcn);
if (ret) {
wcn36xx_err("failed to alloc rx irq\n");
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v3 2/3] wifi: wcn36xx: Do not enforce interrupt trigger type
2026-11-30 6:22 ` [PATCH v3 2/3] wifi: wcn36xx: Do not enforce " Alexandre Rapaille via B4 Relay
@ 2026-11-30 9:00 ` Konrad Dybcio
0 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-11-30 9:00 UTC (permalink / raw)
To: arapaille, Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Loic Poulain, Luca Weiss,
Eugene Krasnikov
Cc: linux-arm-msm, devicetree, linux-kernel, wcn36xx, linux-wireless
On 11/30/26 7:22 AM, Alexandre Rapaille via B4 Relay wrote:
> From: Alexandre Rapaille <arapaille@atlr-engineering.com>
>
> request_irq() with IRQF_TRIGGER_HIGH stores level on the IRQ mapping,
> which outlives the driver, so a DT with another type gets "type
> mismatch" and -ENXIO on the next probe. Rely on the DT, as ath10k does.
> Every other in-tree qcom,wcnss-wlan node is level high; msm8974's DT
> fix goes through the qcom tree.
The last sentence has no business being in this commit message
(which persists in git history)
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 3/3] wifi: wcn36xx: Stop waiting on a dead firmware during remove
2026-11-30 6:22 [PATCH v3 0/3] msm8974/wcn36xx: recover Wi-Fi after a WCNSS crash Alexandre Rapaille via B4 Relay
2026-11-30 6:22 ` [PATCH v3 1/3] ARM: dts: qcom: msm8974: Fix WCNSS wifi interrupt trigger type Alexandre Rapaille via B4 Relay
2026-11-30 6:22 ` [PATCH v3 2/3] wifi: wcn36xx: Do not enforce " Alexandre Rapaille via B4 Relay
@ 2026-11-30 6:22 ` Alexandre Rapaille via B4 Relay
2026-11-30 9:01 ` [PATCH v3 0/3] msm8974/wcn36xx: recover Wi-Fi after a WCNSS crash Konrad Dybcio
3 siblings, 0 replies; 6+ messages in thread
From: Alexandre Rapaille via B4 Relay @ 2026-11-30 6:22 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Loic Poulain, Luca Weiss,
Eugene Krasnikov
Cc: linux-arm-msm, devicetree, linux-kernel, wcn36xx, linux-wireless,
Alexandre Rapaille
From: Alexandre Rapaille <arapaille@atlr-engineering.com>
After a WCNSS crash, remove sends ~16 HAL commands nobody can answer,
each waiting HAL_MSG_TIMEOUT: recovery took 160 s on msm8974. Once one
times out during remove, fail the rest at once; recovery now takes
~20 s. Testing removing alone would also skip the teardown on a normal
unbind with live firmware.
Signed-off-by: Alexandre Rapaille <arapaille@atlr-engineering.com>
---
drivers/net/wireless/ath/wcn36xx/main.c | 1 +
drivers/net/wireless/ath/wcn36xx/smd.c | 8 ++++++++
drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 4 ++++
3 files changed, 13 insertions(+)
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index ad8a4bd910d2..77a102910855 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -1651,6 +1651,7 @@ static void wcn36xx_remove(struct platform_device *pdev)
release_firmware(wcn->nv);
+ WRITE_ONCE(wcn->removing, true);
ieee80211_unregister_hw(hw);
qcom_smem_state_put(wcn->tx_enable_state);
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index c0b477345832..d07ea967ac48 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -427,6 +427,12 @@ static int wcn36xx_smd_send_and_wait(struct wcn36xx *wcn, size_t len)
(struct wcn36xx_hal_msg_header *)wcn->hal_buf;
u16 req_type = hdr->msg_type;
+ /* After a WCNSS crash every teardown command would wait the full
+ * timeout; one is enough to know nobody will answer.
+ */
+ if (wcn->fw_dead)
+ return -ETIME;
+
wcn36xx_dbg_dump(WCN36XX_DBG_SMD_DUMP, "HAL >>> ", wcn->hal_buf, len);
init_completion(&wcn->hal_rsp_compl);
@@ -440,6 +446,8 @@ static int wcn36xx_smd_send_and_wait(struct wcn36xx *wcn, size_t len)
msecs_to_jiffies(HAL_MSG_TIMEOUT)) <= 0) {
wcn36xx_err("Timeout! No SMD response to req %d in %dms\n",
req_type, HAL_MSG_TIMEOUT);
+ if (READ_ONCE(wcn->removing))
+ wcn->fw_dead = true;
ret = -ETIME;
goto out;
}
diff --git a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
index 8c43f67bd780..9e5f3918ca2e 100644
--- a/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
+++ b/drivers/net/wireless/ath/wcn36xx/wcn36xx.h
@@ -276,6 +276,10 @@ struct wcn36xx {
spinlock_t dxe_lock;
bool queues_stopped;
+ /* Set in remove; a HAL timeout then means the firmware is gone. */
+ bool removing;
+ bool fw_dead;
+
/* Memory pools */
struct wcn36xx_dxe_mem_pool mgmt_mem_pool;
struct wcn36xx_dxe_mem_pool data_mem_pool;
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v3 0/3] msm8974/wcn36xx: recover Wi-Fi after a WCNSS crash
2026-11-30 6:22 [PATCH v3 0/3] msm8974/wcn36xx: recover Wi-Fi after a WCNSS crash Alexandre Rapaille via B4 Relay
` (2 preceding siblings ...)
2026-11-30 6:22 ` [PATCH v3 3/3] wifi: wcn36xx: Stop waiting on a dead firmware during remove Alexandre Rapaille via B4 Relay
@ 2026-11-30 9:01 ` Konrad Dybcio
3 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-11-30 9:01 UTC (permalink / raw)
To: arapaille, Bjorn Andersson, Konrad Dybcio, Abel Vesa, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Loic Poulain, Luca Weiss,
Eugene Krasnikov
Cc: linux-arm-msm, devicetree, linux-kernel, wcn36xx, linux-wireless,
stable, Luca Weiss
On 11/30/26 7:22 AM, Alexandre Rapaille via B4 Relay wrote:
> On msm8974 the wcn36xx re-probe after a WCNSS crash fails on an IRQ type
> mismatch (DT edge, driver level), so wlan0 stays gone until reboot; seen
> on deployed Fairphone 2 gateways.
>
> Tested on a Fairphone 2 (6.12.113 plus this series): 10/10 forced WCNSS
6.12 is 2 years old by now, the driver might not have changed
much, but the kernel around it has. Please test against
linux-next/master
Konrad
^ permalink raw reply [flat|nested] 6+ messages in thread