[PATCH wireless-next v2 0/2] wifi: wfx: fix possible device hang during init

From: Jérôme Pouiller

Date: Tue Sep 01 2026 - 04:43:00 EST


The WFxxx devices provide an SDIO interface. Besides the usual in-band
SDIO IRQ, they also support an out-of-band (OOB) IRQ line declared in the
Device Tree.

The OOB IRQ line is not usable until the device has been configured by
the PDS file. Therefore, since commit f00dc1d789e1c ("staging: wfx: poll
IRQ during init"), the driver polls the control register during the first
exchanges with the device instead of relying on an IRQ. To keep the code
simpler, this polling was applied unconditionally, including when an IRQ
was readily available (in-band SDIO IRQ and SPI).

Unfortunately, this polling is unsafe. Commit 57aa557f110d9 ("staging:
wfx: introduce a way to poll IRQ") already mentioned that an IRQ could be
lost if it fires while the host reads the control register. A recent
analysis shows the consequences are worse than documented: the device
itself gets stuck and stops answering subsequent commands. Only pulling
the reset pin and rebinding the device recovers it.

Since the polling only happens during the two first exchanges, the issue
is rare. It was caught by user while binding/rebinding the device in a loop
for a few hours.

Patch 1 restricts the polling to the case where it is actually required
(SDIO with OOB IRQ). The bus driver now tells wfx_probe() whether polling
is necessary; in every other case the IRQ is subscribed before the first
exchange and the racy path is never taken. This makes the vast majority
of the integrations safe.

The SDIO + OOB IRQ combination remains affected. There is no way to fix
it in software: polling is the only way to bootstrap that setup. Note that
nobody reported using it in the last 6 years.

Patch 2 documents this hardware limitation in the binding, so that new
designs do not pick this configuration.

v2:
- Subscribe IRQ before wfx_init_device(). So it avoids possible race
between IRQ enable and IRQ subscription (reported by sashiko-bot)

[Copilot generated the introduction letter and reviewed the code]


Jérôme Pouiller (2):
wifi: wfx: fix possible device hang during init
dt-bindings: net: wireless: wfx: discourage OOB IRQ with SDIO

.../bindings/net/wireless/silabs,wfx.yaml | 3 ++
drivers/net/wireless/silabs/wfx/bh.c | 6 ++--
drivers/net/wireless/silabs/wfx/bus_sdio.c | 1 +
drivers/net/wireless/silabs/wfx/main.c | 34 ++++++++++++-------
4 files changed, 29 insertions(+), 15 deletions(-)

--
2.47.3