linux/drivers/net
Douglas Anderson a43cf6acf0 wifi: ath10k: Don't touch the CE interrupt registers after power up
[ Upstream commit 170c75d43a ]

As talked about in commit d66d24ac30 ("ath10k: Keep track of which
interrupts fired, don't poll them"), if we access the copy engine
register at a bad time then ath10k can go boom. However, it's not
necessarily easy to know when it's safe to access them.

The ChromeOS test labs saw a crash that looked like this at
shutdown/reboot time (on a chromeos-5.15 kernel, but likely the
problem could also reproduce upstream):

Internal error: synchronous external abort: 96000010 [#1] PREEMPT SMP
...
CPU: 4 PID: 6168 Comm: reboot Not tainted 5.15.111-lockdep-19350-g1d624fe6758f #1 010b9b233ab055c27c6dc88efb0be2f4e9e86f51
Hardware name: Google Kingoftown (DT)
...
pc : ath10k_snoc_read32+0x50/0x74 [ath10k_snoc]
lr : ath10k_snoc_read32+0x24/0x74 [ath10k_snoc]
...
Call trace:
ath10k_snoc_read32+0x50/0x74 [ath10k_snoc ...]
ath10k_ce_disable_interrupt+0x190/0x65c [ath10k_core ...]
ath10k_ce_disable_interrupts+0x8c/0x120 [ath10k_core ...]
ath10k_snoc_hif_stop+0x78/0x660 [ath10k_snoc ...]
ath10k_core_stop+0x13c/0x1ec [ath10k_core ...]
ath10k_halt+0x398/0x5b0 [ath10k_core ...]
ath10k_stop+0xfc/0x1a8 [ath10k_core ...]
drv_stop+0x148/0x6b4 [mac80211 ...]
ieee80211_stop_device+0x70/0x80 [mac80211 ...]
ieee80211_do_stop+0x10d8/0x15b0 [mac80211 ...]
ieee80211_stop+0x144/0x1a0 [mac80211 ...]
__dev_close_many+0x1e8/0x2c0
dev_close_many+0x198/0x33c
dev_close+0x140/0x210
cfg80211_shutdown_all_interfaces+0xc8/0x1e0 [cfg80211 ...]
ieee80211_remove_interfaces+0x118/0x5c4 [mac80211 ...]
ieee80211_unregister_hw+0x64/0x1f4 [mac80211 ...]
ath10k_mac_unregister+0x4c/0xf0 [ath10k_core ...]
ath10k_core_unregister+0x80/0xb0 [ath10k_core ...]
ath10k_snoc_free_resources+0xb8/0x1ec [ath10k_snoc ...]
ath10k_snoc_shutdown+0x98/0xd0 [ath10k_snoc ...]
platform_shutdown+0x7c/0xa0
device_shutdown+0x3e0/0x58c
kernel_restart_prepare+0x68/0xa0
kernel_restart+0x28/0x7c

Though there's no known way to reproduce the problem, it makes sense
that it would be the same issue where we're trying to access copy
engine registers when it's not allowed.

Let's fix this by changing how we "disable" the interrupts. Instead of
tweaking the copy engine registers we'll just use disable_irq() and
enable_irq(). Then we'll configure the interrupts once at power up
time.

Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.2.2.c10-00754-QCAHLSWMTPL-1

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230630151842.1.If764ede23c4e09a43a842771c2ddf99608f25f8e@changeid
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2023-11-28 16:56:16 +00:00
..
appletalk make legacy ISA probe optional 2021-08-03 13:05:26 +01:00
arcnet net: arcnet: Do not call kfree_skb() under local_irq_disable() 2023-09-19 12:22:34 +02:00
bonding bonding: Return pointer to data after pull on skb 2023-10-25 11:58:57 +02:00
caif caif_virtio: fix race between virtio_device_ready() and ndo_open() 2022-07-07 17:53:27 +02:00
can can: dev: can_put_echo_skb(): don't crash kernel if can_priv::echo_skb is accessed out of bounds 2023-11-20 11:08:15 +01:00
dsa net: dsa: bcm_sf2: Fix possible memory leak in bcm_sf2_mdio_register() 2023-10-25 11:58:57 +02:00
ethernet atl1c: Work around the DMA RX overflow issue 2023-11-28 16:56:15 +00:00
fddi net: defxx: Fix missing err handling in dfx_init() 2022-12-31 13:14:18 +01:00
fjes fjes: Check for error irq 2021-12-29 12:28:44 +01:00
hamradio hamradio: baycom_epp: Fix return type of baycom_send_packet() 2022-12-31 13:14:41 +01:00
hippi drivers: net: hippi: Fix deadlock in rr_close() 2022-05-09 09:14:40 +02:00
hyperv hv_netvsc: Check status in SEND_RNDIS_PKT completion message 2023-03-10 09:39:51 +01:00
ieee802154 net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show() 2023-11-08 17:26:38 +01:00
ipa net: ipa: compute DMA pool size properly 2023-04-05 11:24:57 +02:00
ipvlan ipvlan: properly track tx_errors 2023-11-20 11:08:16 +01:00
mctp mctp: Add initial driver infrastructure 2021-07-29 15:06:50 +01:00
mdio net: mdio: mvusb: Fix an error handling path in mvusb_mdio_probe() 2023-05-24 17:36:41 +01:00
netdevsim netdevsim: fix uninitialized data in nsim_dev_trap_fa_cookie_write() 2023-07-23 13:47:45 +02:00
pcs net: pcs: xpcs: remove double-read of link state when using AN 2023-05-11 23:00:26 +09:00
phy net: phy: mscc: macsec: reject PN update requests 2023-10-19 23:05:34 +02:00
plip net: plip: don't call kfree_skb/dev_kfree_skb() under spin_lock_irq() 2022-12-14 11:37:29 +01:00
ppp pptp: Fix fib lookup calls. 2023-07-23 13:47:30 +02:00
slip drivers: net: slip: fix NPD bug in sl_tx_timeout() 2022-04-20 09:34:17 +02:00
team team: fix null-ptr-deref when team device type is changed 2023-10-06 13:18:08 +02:00
usb r8152: Check for unplug in r8153b_ups_en() / r8153c_ups_en() 2023-11-08 17:26:48 +01:00
vmxnet3 vmxnet3: correctly report csum_level for encapsulated packet 2023-01-12 11:59:09 +01:00
vxlan vxlan: generalize vxlan_parse_gpe_hdr and remove unused args 2023-09-19 12:22:27 +02:00
wan drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close() 2023-10-10 21:59:06 +02:00
wireguard wireguard: allowedips: expand maximum node depth 2023-08-16 18:21:57 +02:00
wireless wifi: ath10k: Don't touch the CE interrupt registers after power up 2023-11-28 16:56:16 +00:00
wwan net: wwan: iosm: fix dma_alloc_coherent incompatible pointer type 2022-12-08 11:28:41 +01:00
xen-netback xen-netback: use default TX queue size for vifs 2023-10-19 23:05:34 +02:00
bareudp.c bareudp: use ipv6_mod_enabled to check if IPv6 enabled 2022-04-08 14:23:41 +02:00
dummy.c net: bonding, dummy, ifb, team: advertise NETIF_F_GSO_SOFTWARE 2020-11-03 16:53:55 -08:00
eql.c eql: use ndo_siocdevprivate 2021-07-27 20:11:43 +01:00
geneve.c geneve: fix TOS inheriting for ipv4 2022-08-25 11:40:15 +02:00
gtp.c gtp: fix fragmentation needed check with gso 2023-11-08 17:26:39 +01:00
ifb.c ifb: fix building without CONFIG_NET_CLS_ACT 2021-11-18 19:16:04 +01:00
Kconfig lib/crypto: blake2s: include as built-in 2022-05-30 09:28:59 +02:00
LICENSE.SRC Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
loopback.c net: loopback: use NET_NAME_PREDICTABLE for name_assign_type 2022-12-21 17:36:38 +01:00
macsec.c net: add DEV_STATS_READ() helper 2023-11-20 11:08:16 +01:00
macvlan.c macvlan: enforce a consistent minimal mtu 2022-11-26 09:24:50 +01:00
macvtap.c macvtap: advertise link netns via netlink 2022-04-13 20:59:07 +02:00
Makefile vxlan: move to its own directory 2023-08-03 10:22:34 +02:00
mdio.c net: mdio: Correct function name mdio45_links_ok() in comment 2021-03-29 13:42:44 -07:00
mhi_net.c net: mhi: Fix memory leak in mhi_net_dellink() 2022-11-26 09:24:40 +01:00
mii.c net: mii: make mii_ethtool_gset() return void 2021-08-19 13:06:53 +01:00
net_failover.c net/net_failover: fix txq exceeding warning 2023-04-05 11:24:55 +02:00
netconsole.c net: netconsole: Add description for 'netconsole_target's extended attribute 2020-11-03 16:40:09 -08:00
nlmon.c net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
ntb_netdev.c ntb_netdev: Use dev_kfree_skb_any() in interrupt context 2022-12-31 13:14:20 +01:00
rionet.c rionet: Fix use correct return type for ndo_start_xmit() 2020-04-30 12:15:13 -07:00
sb1000.c sb1000: use ndo_siocdevprivate 2021-07-27 20:11:44 +01:00
Space.c wan: remove sbni/granch driver 2021-08-03 13:05:26 +01:00
sungem_phy.c net: sungem_phy: Add of_node_put() for reference returned by of_get_parent() 2022-08-03 12:03:48 +02:00
tap.c net: tap_open(): set sk_uid from current_fsuid() 2023-08-11 15:13:57 +02:00
thunderbolt.c net: thunderbolt: Fix TCPv6 GSO checksum calculation 2023-10-06 13:18:23 +02:00
tun.c tun: prevent negative ifindex 2023-10-25 11:58:57 +02:00
veth.c veth: Fixing transmit return status for dropped packets 2023-09-19 12:22:58 +02:00
virtio_net.c virtio-net: set queues after driver_ok 2023-08-26 14:23:38 +02:00
vrf.c vrf: fix packet sniffing for traffic originating from ip tunnels 2022-04-13 20:59:15 +02:00
vsockmon.c net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
xen-netfront.c xen-netfront: Fix NULL sring after live migration 2022-12-14 11:37:26 +01:00