Re: [PATCH v2] power: sequencing: qcom-wcn: power off WLAN at probe

From: Bartosz Golaszewski

Date: Tue Oct 06 2026 - 04:07:20 EST


On Sun, 4 Oct 2026 18:51:24 +0200, "François Roux"
<franzelfranzel@xxxxxxxxx> said:
> The WLAN enable GPIO is requested with GPIOD_ASIS and then kept at its
> current level, so that a WLAN module left powered on by the firmware is
> not switched off. The FIXME explains why: toggling it would take the
> PCIe link down, and the controller driver could not recover from that.
>
> That reasoning held while the PCIe link was trained before the
> sequencer probed. Since commit b921aa3f8dec ("PCI/pwrctrl: Switch to
> pwrctrl create, power on/off, destroy APIs"), qcom_pcie_host_init()
> powers the endpoint through pwrctrl before it starts link training, and
> defers until the pwrctrl driver is bound. That driver cannot bind
> before this sequencer has probed. Power-on therefore always comes
> before link training, and keeping the firmware state is now harmful.
>
> On the Microsoft Surface Pro 11 (X1E80100), the WCN7850 sits on a
> PCIe port without a PERST# GPIO. While pci-pwrctrl-pwrseq is not yet
> bound, the host init is deferred about ten times, and each attempt
> powers the PHY and controller back down. The later power-on only sets
> a GPIO that is already high, so the chip is never reset and the link
> never comes up:
>
> qcom-pcie 1c08000.pcie: Device found, but not active
>
> The endpoint is not enumerated and ath12k never probes. Bluetooth on
> the same chip fails too ("QCA Failed to send TLV segment (-110)").
>
> Request the GPIO as GPIOD_OUT_LOW. The chip is then off when the
> sequencer probes, and pwrctrl powers it up cleanly right before link
> training. Drop the FIXME and the code that preserved the firmware
> state.
>
> Tested on a Surface Pro 11:
> - b921aa3f8dec plus a one-line version of this change: endpoint
> enumerated at 2.4 s, ath12k and Bluetooth working.
> - next-20260929 plus this patch: "PCIe Gen.3 x2 link up" at 3.4 s,
> ath12k and Bluetooth working, Wi-Fi connected.
> Without the change, neither kernel enumerates the endpoint.
>
> The culprit was found by bisecting v6.17..v7.1, with the DTB and
> .config held constant.
>
> Fixes: b921aa3f8dec ("PCI/pwrctrl: Switch to pwrctrl create, power on/off, destroy APIs")
> Closes: https://lore.kernel.org/all/CAPjyS8dY0Q_o3XmFjuKZZsjhzhoSNL+ZGJtw5cQt8HiV3sUtxA@xxxxxxxxxxxxxx/
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: LLM
> Signed-off-by: François Roux <franzelfranzel@xxxxxxxxx>
> ---

Mani: this looks good to me, any objections to me queuing it for v7.3?

Bart