]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ath10k: fix PCIE device wake up failed
authorMiaoqing Pan <miaoqing@codeaurora.org>
Thu, 30 May 2019 01:49:20 +0000 (09:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:12:42 +0000 (09:12 +0200)
commit81124baa72858c08ffe8a5e3d9fc5790e247ad83
tree57073d50c1260bf7dd2ed015987fd3b4ce257233
parent080c204b29ba7954d56875d9999f9990a8af2a4d
ath10k: fix PCIE device wake up failed

[ Upstream commit 011d4111c8c602ea829fa4917af1818eb0500a90 ]

Observed PCIE device wake up failed after ~120 iterations of
soft-reboot test. The error message is
"ath10k_pci 0000:01:00.0: failed to wake up device : -110"

The call trace as below:
ath10k_pci_probe -> ath10k_pci_force_wake -> ath10k_pci_wake_wait ->
ath10k_pci_is_awake

Once trigger the device to wake up, we will continuously check the RTC
state until it returns RTC_STATE_V_ON or timeout.

But for QCA99x0 chips, we use wrong value for RTC_STATE_V_ON.
Occasionally, we get 0x7 on the fist read, we thought as a failure
case, but actually is the right value, also verified with the spec.
So fix the issue by changing RTC_STATE_V_ON from 0x5 to 0x7, passed
~2000 iterations.

Tested HW: QCA9984

Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath10k/hw.c