]> www.infradead.org Git - users/dwmw2/linux.git/commit
ath10k: pci: Only dump ATH10K_MEM_REGION_TYPE_IOREG when safe
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Thu, 19 Dec 2019 13:15:38 +0000 (13:15 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:52:57 +0000 (16:52 -0500)
commit74b4660d1435ca201e60f26ad32f7077249317f5
treefd4c776cb4998812ea72e1ed784e8703f7804287
parent19f6541a6067fc7a1e90215d121daa65b03fd1c3
ath10k: pci: Only dump ATH10K_MEM_REGION_TYPE_IOREG when safe

commit d239380196c4e27a26fa4bea73d2bf994c14ec2d upstream.

ath10k_pci_dump_memory_reg() will try to access memory of type
ATH10K_MEM_REGION_TYPE_IOREG however, if a hardware restart is in progress
this can crash a system.

Individual ioread32() time has been observed to jump from 15-20 ticks to >
80k ticks followed by a secure-watchdog bite and a system reset.

Work around this corner case by only issuing the read transaction when the
driver state is ATH10K_STATE_ON.

Tested-on: QCA9988 PCI 10.4-3.9.0.2-00044

Fixes: 219cc084c6706 ("ath10k: add memory dump support QCA9984")
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/ath/ath10k/pci.c