WSL2-Linux-Kernel/drivers
Douglas Anderson a43cf6acf0 wifi: ath10k: Don't touch the CE interrupt registers after power up
[ Upstream commit 170c75d43a77dc937c58f07ecf847ba1b42ab74e ]

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>
2023-11-28 16:56:16 +00:00
..
accessibility
acpi ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias() 2023-11-20 11:08:16 +01:00
amba amba: bus: fix refcount leak 2023-09-19 12:22:47 +02:00
android binder: fix memory leak in binder_init() 2023-08-16 18:21:59 +02:00
ata ata: libata-eh: Fix compilation warning in ata_eh_link_report() 2023-10-25 11:59:00 +02:00
atm
auxdisplay
base regmap: prevent noinc writes from clobbering cache 2023-11-20 11:08:27 +01:00
bcma
block rbd: take header_rwsem in rbd_dev_refresh() only when updating 2023-10-10 21:59:05 +02:00
bluetooth Bluetooth: btusb: add shutdown function for QCA6174 2023-10-25 11:59:00 +02:00
bus bus: ti-sysc: Fix SYSC_QUIRK_SWSUP_SIDLE_ACT handling for uart wake-up 2023-10-06 13:18:13 +02:00
cdrom
char hwrng: geode - fix accessing registers 2023-11-20 11:08:22 +01:00
clk clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped 2023-11-20 11:08:21 +01:00
clocksource clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware 2023-11-28 16:56:15 +00:00
comedi
connector
counter counter: microchip-tcb-capture: Fix the use of internal GCLK logic 2023-10-19 23:05:37 +02:00
cpufreq cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug 2023-09-19 12:22:52 +02:00
cpuidle powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT 2023-09-19 12:22:42 +02:00
crypto crypto: qat - fix deadlock in backlog processing 2023-11-20 11:08:24 +01:00
cxl cxl/mem: Fix shutdown order 2023-11-20 11:08:27 +01:00
dax dax/kmem: Pass valid argument to memory_group_register_static 2023-07-23 13:47:17 +02:00
dca
devfreq PM / devfreq: rockchip-dfi: Make pmu regmap mandatory 2023-11-20 11:08:15 +01:00
dio
dma dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc() 2023-11-20 11:08:26 +01:00
dma-buf dma-buf/sw_sync: Avoid recursive lock during fence signal 2023-08-30 16:18:21 +02:00
edac EDAC/igen6: Fix the issue of no error events 2023-09-19 12:22:40 +02:00
eisa
extcon extcon: usbc-tusb320: Convert to i2c's .probe_new() 2023-07-23 13:47:31 +02:00
firewire firewire: net: fix use after free in fwnet_finish_incoming_packet() 2023-08-26 14:23:24 +02:00
firmware firmware: arm_ffa: Assign the missing IDR allocation ID to the FFA device 2023-11-20 11:08:21 +01:00
fpga
fsi fsi: aspeed: Reset master errors after CFAM reset 2023-09-19 12:22:46 +02:00
gnss
gpio gpio: vf610: set value before the direction to avoid a glitch 2023-10-25 11:59:03 +02:00
gpu drm/syncobj: fix DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE 2023-11-20 11:08:30 +01:00
greybus
hid HID: logitech-hidpp: Move get_wireless_feature_index() check to hidpp_connect_event() 2023-11-20 11:08:24 +01:00
hsi
hv Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs 2023-06-28 10:29:42 +02:00
hwmon hwmon: (coretemp) Fix potentially truncated sysfs attribute name 2023-11-20 11:08:18 +01:00
hwspinlock
hwtracing coresight: tmc: Explicit type conversions to prevent integer overflow 2023-09-19 12:22:45 +02:00
i2c i2c: iproc: handle invalid slave state 2023-11-20 11:08:29 +01:00
i3c i3c: Fix potential refcount leak in i3c_master_register_new_i3c_devs 2023-11-20 11:08:27 +01:00
idle
iio iio: afe: rescale: Accept only offset channels 2023-11-08 17:26:42 +01:00
infiniband RDMA/hfi1: Workaround truncation compilation error 2023-11-20 11:08:23 +01:00
input Input: synaptics-rmi4 - fix use after free in rmi_unregister_function() 2023-11-20 11:08:28 +01:00
interconnect Fix up backport of 1361917030 ("interconnect: Teach lockdep about icc_bw_lock order") 2023-10-06 13:18:09 +02:00
iommu iommu/vt-d: Avoid memory allocation in iommu_suspend() 2023-10-19 23:05:32 +02:00
ipack
irqchip irqchip/stm32-exti: add missing DT IRQ flag translation 2023-11-08 17:26:45 +01:00
isdn mISDN: Update parameter type of dsp_cmx_send() 2023-08-16 18:22:01 +02:00
leds leds: trigger: ledtrig-cpu:: Fix 'output may be truncated' issue for 'cpu' 2023-11-20 11:08:25 +01:00
macintosh
mailbox mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0 2023-07-23 13:47:28 +02:00
mcb mcb-lpc: Reallocate memory region to avoid memory overlapping 2023-11-08 17:26:35 +01:00
md dm zoned: free dmz->ddev array in dmz_put_zoned_devices 2023-10-10 21:59:08 +02:00
media media: dvb-usb-v2: af9035: fix missing unlock 2023-11-20 11:08:27 +01:00
memory memory: brcmstb_dpfe: fix testing array offset after use 2023-07-23 13:47:03 +02:00
memstick memstick r592: make memstick_debug_get_tpc_name() static 2023-07-23 13:46:52 +02:00
message
mfd mfd: arizona-spi: Set pdata.hpdet_channel for ACPI enumerated devs 2023-11-20 11:08:24 +01:00
misc misc: st_core: Do not call kfree_skb() under spin_lock_irqsave() 2023-11-20 11:08:25 +01:00
mmc Revert "mmc: core: Capture correct oemid-bits for eMMC cards" 2023-11-20 11:08:30 +01:00
most
mtd mtd: physmap-core: Restore map_rom fallback 2023-10-25 11:59:02 +02:00
mux
net wifi: ath10k: Don't touch the CE interrupt registers after power up 2023-11-28 16:56:16 +00:00
nfc nfcsim.c: Fix error checking for debugfs_create_dir 2023-06-28 10:29:51 +02:00
ntb ntb: Fix calculation ntb_transport_tx_free_entry() 2023-09-19 12:22:51 +02:00
nubus nubus: Partially revert proc_create_single_data() conversion 2023-07-05 18:25:05 +01:00
nvdimm nd_btt: Make BTT lanes preemptible 2023-11-20 11:08:22 +01:00
nvme nvme-rdma: do not try to stop unallocated queues 2023-10-25 11:59:02 +02:00
nvmem nvmem: imx: correct nregs for i.MX6UL 2023-11-08 17:26:41 +01:00
of of: overlay: Reorder struct fragment fields kerneldoc 2023-10-19 23:05:32 +02:00
opp OPP: Fix passing 0 to PTR_ERR in _opp_attach_genpd() 2023-09-19 12:22:31 +02:00
parisc parisc: iosapic.c: Fix sparse warnings 2023-10-06 13:18:15 +02:00
parport
pci PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device 2023-11-08 17:26:49 +01:00
pcmcia pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() 2023-11-20 11:08:27 +01:00
perf perf: hisi: Fix use-after-free when register pmu fails 2023-11-20 11:08:21 +01:00
phy phy: mapphone-mdm6600: Fix pinctrl_pm handling for sleep pins 2023-10-25 11:59:03 +02:00
pinctrl pinctrl: qcom: lpass-lpi: fix concurrent register updates 2023-11-08 17:26:35 +01:00
platform platform/x86: wmi: Fix opening of char device 2023-11-20 11:08:18 +01:00
pnp
power power: supply: ucs1002: fix error code in ucs1002_get_property() 2023-10-06 13:18:13 +02:00
powercap powercap: RAPL: Fix CONFIG_IOSF_MBI dependency 2023-07-23 13:46:46 +02:00
pps
ps3
ptp ptp: ocp: Fix error handling in ptp_ocp_device_init 2023-10-10 21:59:07 +02:00
pwm pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume 2023-11-20 11:08:28 +01:00
rapidio
ras
regulator regulator/core: Revert "fix kobject release warning and memory leak in regulator_register()" 2023-10-25 11:59:00 +02:00
remoteproc
reset
rpmsg rpmsg: Fix possible refcount leak in rpmsg_register_device_override() 2023-11-08 17:26:44 +01:00
rtc rtc: pcf85363: fix wrong mask/val parameters in regmap_update_bits call 2023-11-20 11:08:27 +01:00
s390 s390/cio: fix a memleak in css_alloc_subchannel 2023-10-25 11:59:03 +02:00
sbus
scsi scsi: ufs: core: Leave space for '\0' in utf8 desc string 2023-11-20 11:08:23 +01:00
sh
siox
slimbus
soc soc: qcom: llcc: Handle a second device without data corruption 2023-11-20 11:08:21 +01:00
soundwire soundwire: fix enumeration completion 2023-08-11 15:14:00 +02:00
spi spi: spi-zynq-qspi: add spi-mem to driver kconfig dependencies 2023-11-20 11:08:30 +01:00
spmi
ssb
staging media: cedrus: Fix clock/reset sequence 2023-11-20 11:08:27 +01:00
target scsi: target: core: Fix deadlock due to recursive locking 2023-10-10 21:59:07 +02:00
tc
tee tee: amdtee: fix use-after-free vulnerability in amdtee_close_session 2023-10-19 23:05:37 +02:00
thermal thermal: core: prevent potential string overflow 2023-11-20 11:08:15 +01:00
thunderbolt thunderbolt: Check that lane 1 is in CL0 before enabling lane bonding 2023-10-19 23:05:36 +02:00
tty tty: tty_jobctrl: fix pid memleak in disassociate_ctty() 2023-11-20 11:08:25 +01:00
uio
usb usb: host: xhci-plat: fix possible kernel oops while resuming 2023-11-20 11:08:26 +01:00
vdpa vduse: Use proper spinlock for IRQ injection 2023-08-26 14:23:30 +02:00
vfio vfio/type1: fix cap_migration information leak 2023-09-19 12:22:41 +02:00
vhost vhost: Allow null msg.size on VHOST_IOTLB_INVALIDATE 2023-11-08 17:26:36 +01:00
video fbdev: fsl-diu-fb: mark wr_reg_wa() static 2023-11-20 11:08:30 +01:00
virt
virtio virtio-mmio: fix memory leak of vm_dev 2023-11-08 17:26:36 +01:00
visorbus
vlynq
vme
w1 w1: fix loop in w1_fini() 2023-07-23 13:47:20 +02:00
watchdog watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running 2023-10-06 13:18:20 +02:00
xen xen-pciback: Consider INTx disabled when MSI/MSI-X is enabled 2023-11-20 11:08:20 +01:00
zorro
Kconfig
Makefile