]> git.baikalelectronics.ru Git - kernel.git/commit
mwifiex: pcie: add reset_d3cold quirk for Surface gen4+ devices
authorTsuchiya Yuto <kitakar@gmail.com>
Fri, 20 Aug 2021 14:20:50 +0000 (16:20 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Sun, 29 Aug 2021 11:46:41 +0000 (14:46 +0300)
commit68071c759db115596d74a7fa941bcc76fb564a38
treee965e0caa458db100c26b055b6b34ea74f02cd56
parent1492fbdd2d01ec6ca1d6f1c6d6755b06a597d27b
mwifiex: pcie: add reset_d3cold quirk for Surface gen4+ devices

To reset mwifiex on Surface gen4+ (Pro 4 or later gen) devices, it
seems that putting the wifi device into D3cold is required according
to errata.inf file on Windows installation (Windows/INF/errata.inf).

This patch adds a function that performs power-cycle (put into D3cold
then D0) and call the function at the end of reset_prepare().

Note: Need to also reset the parent device (bridge) of wifi on SB1;
it might be because the bridge of wifi always reports it's in D3hot.
When I tried to reset only the wifi device (not touching parent), it gave
the following error and the reset failed:

    acpi device:4b: Cannot transition to power state D0 for parent in D3hot
    mwifiex_pcie 0000:03:00.0: can't change power state from D3cold to D0 (config space inaccessible)

Signed-off-by: Tsuchiya Yuto <kitakar@gmail.com>
Signed-off-by: Jonas Dreßler <verdre@v0yd.nl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210820142050.35741-3-verdre@v0yd.nl
drivers/net/wireless/marvell/mwifiex/pcie.c
drivers/net/wireless/marvell/mwifiex/pcie_quirks.c
drivers/net/wireless/marvell/mwifiex/pcie_quirks.h