rtw88: pci: disable aspm for platform inter-op with module parameter
authorYan-Hsuan Chuang <yhchuang@realtek.com>
Fri, 5 Jun 2020 07:47:03 +0000 (15:47 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:34 +0000 (13:07 +0200)
commit6616b75394ac63630cd2b61051685202868c417f
treef75f2e4200b7f2cb71fe8cf75479e5e6a7f40c59
parent691f4dbe891c8762885de41b1e69fa68cc94031f
rtw88: pci: disable aspm for platform inter-op with module parameter

[ Upstream commit 68aa716b7dd36f55e080da9e27bc594346334c41 ]

Some platforms cannot read the DBI register successfully for the
ASPM settings. After the read failed, the bus could be unstable,
and the device just became unavailable [1]. For those platforms,
the ASPM should be disabled. But as the ASPM can help the driver
to save the power consumption in power save mode, the ASPM is still
needed. So, add a module parameter for them to disable it, then
the device can still work, while others can benefit from the less
power consumption that brings by ASPM enabled.

[1] https://bugzilla.kernel.org/show_bug.cgi?id=206411
[2] Note that my lenovo T430 is the same.

Fixes: 3dff7c6e3749 ("rtw88: allows to enable/disable HCI link PS mechanism")
Signed-off-by: Yan-Hsuan Chuang <yhchuang@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200605074703.32726-1-yhchuang@realtek.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/realtek/rtw88/pci.c