From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Miaoqing Pan <miaoqing@codeaurora.org>,
Kalle Valo <kvalo@codeaurora.org>,
Sasha Levin <sashal@kernel.org>,
ath10k@lists.infradead.org, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.1 145/219] ath10k: fix fw crash by moving chip reset after napi disabled
Date: Mon, 15 Jul 2019 10:02:26 -0400 [thread overview]
Message-ID: <20190715140341.6443-145-sashal@kernel.org> (raw)
In-Reply-To: <20190715140341.6443-1-sashal@kernel.org>
From: Miaoqing Pan <miaoqing@codeaurora.org>
[ Upstream commit 08d80e4cd27ba19f9bee9e5f788f9a9fc440a22f ]
On SMP platform, when continuously running wifi up/down, the napi
poll can be scheduled during chip reset, which will call
ath10k_pci_has_fw_crashed() to check the fw status. But in the reset
period, the value from FW_INDICATOR_ADDRESS register will return
0xdeadbeef, which also be treated as fw crash. Fix the issue by
moving chip reset after napi disabled.
ath10k_pci 0000:01:00.0: firmware crashed! (guid 73b30611-5b1e-4bdd-90b4-64c81eb947b6)
ath10k_pci 0000:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1
ath10k_pci 0000:01:00.0: failed to get memcpy hi address for firmware address 4: -16
ath10k_pci 0000:01:00.0: failed to read firmware dump area: -16
ath10k_pci 0000:01:00.0: Copy Engine register dump:
ath10k_pci 0000:01:00.0: [00]: 0x0004a000 0 0 0 0
ath10k_pci 0000:01:00.0: [01]: 0x0004a400 0 0 0 0
ath10k_pci 0000:01:00.0: [02]: 0x0004a800 0 0 0 0
ath10k_pci 0000:01:00.0: [03]: 0x0004ac00 0 0 0 0
ath10k_pci 0000:01:00.0: [04]: 0x0004b000 0 0 0 0
ath10k_pci 0000:01:00.0: [05]: 0x0004b400 0 0 0 0
ath10k_pci 0000:01:00.0: [06]: 0x0004b800 0 0 0 0
ath10k_pci 0000:01:00.0: [07]: 0x0004bc00 1 0 1 0
ath10k_pci 0000:01:00.0: [08]: 0x0004c000 0 0 0 0
ath10k_pci 0000:01:00.0: [09]: 0x0004c400 0 0 0 0
ath10k_pci 0000:01:00.0: [10]: 0x0004c800 0 0 0 0
ath10k_pci 0000:01:00.0: [11]: 0x0004cc00 0 0 0 0
Tested HW: QCA9984,QCA9887,WCN3990
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/pci.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 2c27f407a851..6e5f7ae00253 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -2059,6 +2059,11 @@ static void ath10k_pci_hif_stop(struct ath10k *ar)
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot hif stop\n");
+ ath10k_pci_irq_disable(ar);
+ ath10k_pci_irq_sync(ar);
+ napi_synchronize(&ar->napi);
+ napi_disable(&ar->napi);
+
/* Most likely the device has HTT Rx ring configured. The only way to
* prevent the device from accessing (and possible corrupting) host
* memory is to reset the chip now.
@@ -2072,10 +2077,6 @@ static void ath10k_pci_hif_stop(struct ath10k *ar)
*/
ath10k_pci_safe_chip_reset(ar);
- ath10k_pci_irq_disable(ar);
- ath10k_pci_irq_sync(ar);
- napi_synchronize(&ar->napi);
- napi_disable(&ar->napi);
ath10k_pci_flush(ar);
spin_lock_irqsave(&ar_pci->ps_lock, flags);
--
2.20.1
next prev parent reply other threads:[~2019-07-15 14:12 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 14:00 [PATCH AUTOSEL 5.1 001/219] ath10k: Check tx_stats before use it Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 002/219] ath10k: htt: don't use txdone_fifo with SDIO Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 003/219] ath10k: fix incorrect multicast/broadcast rate setting Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 004/219] ath9k: Don't trust TX status TID number when reporting airtime Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 005/219] wil6210: fix potential out-of-bounds read Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 006/219] ath10k: Do not send probe response template for mesh Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 008/219] ath9k: Check for errors when reading SREV register Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 009/219] ath10k: Fix the wrong value of enums for wmi tlv stats id Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 010/219] wil6210: fix missed MISC mbox interrupt Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 011/219] ath6kl: add some bounds checking Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 012/219] ath10k: add peer id check in ath10k_peer_find_by_id Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 014/219] wil6210: fix spurious interrupts in 3-msi Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 015/219] ath: DFS JP domain W56 fixed pulse type 3 RADAR detection Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 016/219] ath10k: Fix encoding for protected management frames Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 018/219] batman-adv: fix for leaked TVLV handler Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 028/219] net: stmmac: dwmac1000: Clear unused address entries Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 029/219] net: stmmac: dwmac4/5: " Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 030/219] net: stmmac: Prevent missing interrupts when running NAPI Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 031/219] net: hns3: initialize CPU reverse mapping Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 032/219] qed: Set the doorbell address correctly Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 035/219] af_key: fix leaks in key_pol_get_resp and dump_sp Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 036/219] xfrm: Fix xfrm sel prefix length validation Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 042/219] Revert "e1000e: fix cyclic resets at link up with active tx" Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 043/219] e1000e: start network tx queue only when link is up Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 047/219] net: phy: Check against net_device being NULL Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 051/219] batman-adv: Fix duplicated OGMs on NETDEV_UP Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 055/219] net: hns3: add a check to pointer in error_detected and slot_reset Sasha Levin
2019-07-15 14:00 ` [PATCH AUTOSEL 5.1 056/219] net: hns3: set ops to null when unregister ad_dev Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 062/219] net: stmmac: dwmac4: fix flow control issue Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 063/219] net: stmmac: modify default value of tx-frames Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 065/219] net: fec: Do not use netdev messages too early Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 066/219] net: axienet: Fix race condition causing TX hang Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 069/219] net: sfp: add mutex to prevent concurrent state checks Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 070/219] ipset: Fix memory accounting for hash types on resize Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 083/219] bpf: silence warning messages in core Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 091/219] qed: iWARP - Fix tc for MPA ll2 connection Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 092/219] net: hns3: fix for dereferencing before null checking Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 093/219] net: hns3: fix for skb leak when doing selftest Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 094/219] net: hns3: delay ring buffer clearing during reset Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 097/219] xfrm: fix sa selector validation Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 105/219] vhost_net: disable zerocopy by default Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 106/219] iavf: allow null RX descriptors Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 109/219] bpf: fix callees pruning callers Sasha Levin
2019-07-15 14:01 ` [PATCH AUTOSEL 5.1 111/219] net: netsec: initialize tx ring on ndo_open Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 124/219] ipsec: select crypto ciphers for xfrm_algo Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 125/219] ipvs: defer hook registration to avoid leaks Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 138/219] net: stmmac: sun8i: force select external PHY when no internal one Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 139/219] rtlwifi: rtl8192cu: fix error handle when usb probe failed Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 140/219] mt7601u: do not schedule rx_tasklet when the device has been disconnected Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 142/219] mt7601u: fix possible memory leak when the device is disconnected Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 143/219] ipvs: fix tinfo memory leak in start_sync_thread Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 144/219] ath10k: add missing error handling Sasha Levin
2019-07-15 14:02 ` Sasha Levin [this message]
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 146/219] ath10k: fix PCIE device wake up failed Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 153/219] netfilter: ctnetlink: Fix regression in conntrack entry deletion Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 154/219] xsk: Properly terminate assignment in xskq_produce_flush_desc Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 156/219] bpf: fix BPF_ALU32 | BPF_ARSH on BE arches Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 159/219] net/mlx5: Get vport ACL namespace by vport index Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 160/219] ixgbe: Check DDM existence in transceiver before access Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 164/219] ath9k: correctly handle short radar pulses Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 165/219] wil6210: drop old event after wmi_call timeout Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 173/219] net: hns3: fix a -Wformat-nonliteral compile warning Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 174/219] net: hns3: add some error checking in hclge_tm module Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 175/219] ath10k: Fix memory leak in qmi Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 176/219] ath10k: destroy sdio workqueue while remove sdio module Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 177/219] net: mvpp2: prs: Don't override the sign bit in SRAM parser shift Sasha Levin
2019-07-15 14:02 ` [PATCH AUTOSEL 5.1 178/219] igb: clear out skb->tstamp after reading the txtime Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 179/219] net: hns3: add Asym Pause support to fix autoneg problem Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 180/219] ixgbe: Avoid NULL pointer dereference with VF on non-IPsec hw Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 181/219] iwlwifi: mvm: Drop large non sta frames Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 182/219] bpf: fix uapi bpf_prog_info fields alignment Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 183/219] netfilter: Fix remainder of pseudo-header protocol 0 Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 184/219] iwlwifi: dbg: fix debug monitor stop and restart delays Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 185/219] bnxt_en: Disable bus master during PCI shutdown and driver unload Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 186/219] bnxt_en: Fix statistics context reservation logic for RDMA driver Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 192/219] vxlan: do not destroy fdb if register_netdevice() is failed Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 193/219] bnx2x: Prevent ptp_task to be rescheduled indefinitely Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 194/219] net: usb: asix: init MAC address buffers Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 196/219] libbpf: fix GCC8 warning for strncpy Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 197/219] bpf, libbpf, smatch: Fix potential NULL pointer dereference Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 198/219] selftests: bpf: fix inlines in test_lwt_seg6local Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 199/219] bonding: validate ip header before check IPPROTO_IGMP Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 202/219] tools: bpftool: Fix json dump crash on powerpc Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 203/219] net: hns3: enable broadcast promisc mode when initializing VF Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 207/219] Bluetooth: 6lowpan: search for destination address in all peers Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 210/219] Bluetooth: Check state in l2cap_disconnect_rsp Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 211/219] Bluetooth: hidp: NUL terminate a string in the compat ioctl Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 212/219] gtp: add missing gtp_encap_disable_sock() in gtp_encap_enable() Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 213/219] Bluetooth: validate BLE connection interval updates Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 214/219] gtp: fix suspicious RCU usage Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 215/219] gtp: fix Illegal context switch in RCU read-side critical section Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 216/219] gtp: fix use-after-free in gtp_encap_destroy() Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 217/219] gtp: fix use-after-free in gtp_newlink() Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 218/219] xdp: fix race on generic receive path Sasha Levin
2019-07-15 14:03 ` [PATCH AUTOSEL 5.1 219/219] net: mvmdio: defer probe of orion-mdio if a clock is not ready Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190715140341.6443-145-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=ath10k@lists.infradead.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miaoqing@codeaurora.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).