linux-stable/drivers
Kalle Valo b4f4c56459 ath11k: pci: fix crash on suspend if board file is not found
Mario reported that the kernel was crashing on suspend if ath11k was not able
to find a board file:

[  473.693286] PM: Suspending system (s2idle)
[  473.693291] printk: Suspending console(s) (use no_console_suspend to debug)
[  474.407787] BUG: unable to handle page fault for address: 0000000000002070
[  474.407791] #PF: supervisor read access in kernel mode
[  474.407794] #PF: error_code(0x0000) - not-present page
[  474.407798] PGD 0 P4D 0
[  474.407801] Oops: 0000 [#1] PREEMPT SMP NOPTI
[  474.407805] CPU: 2 PID: 2350 Comm: kworker/u32:14 Tainted: G        W         5.16.0 #248
[...]
[  474.407868] Call Trace:
[  474.407870]  <TASK>
[  474.407874]  ? _raw_spin_lock_irqsave+0x2a/0x60
[  474.407882]  ? lock_timer_base+0x72/0xa0
[  474.407889]  ? _raw_spin_unlock_irqrestore+0x29/0x3d
[  474.407892]  ? try_to_del_timer_sync+0x54/0x80
[  474.407896]  ath11k_dp_rx_pktlog_stop+0x49/0xc0 [ath11k]
[  474.407912]  ath11k_core_suspend+0x34/0x130 [ath11k]
[  474.407923]  ath11k_pci_pm_suspend+0x1b/0x50 [ath11k_pci]
[  474.407928]  pci_pm_suspend+0x7e/0x170
[  474.407935]  ? pci_pm_freeze+0xc0/0xc0
[  474.407939]  dpm_run_callback+0x4e/0x150
[  474.407947]  __device_suspend+0x148/0x4c0
[  474.407951]  async_suspend+0x20/0x90
dmesg-efi-164255130401001:
Oops#1 Part1
[  474.407955]  async_run_entry_fn+0x33/0x120
[  474.407959]  process_one_work+0x220/0x3f0
[  474.407966]  worker_thread+0x4a/0x3d0
[  474.407971]  kthread+0x17a/0x1a0
[  474.407975]  ? process_one_work+0x3f0/0x3f0
[  474.407979]  ? set_kthread_struct+0x40/0x40
[  474.407983]  ret_from_fork+0x22/0x30
[  474.407991]  </TASK>

The issue here is that board file loading happens after ath11k_pci_probe()
succesfully returns (ath11k initialisation happends asynchronously) and the
suspend handler is still enabled, of course failing as ath11k is not properly
initialised. Fix this by checking ATH11K_FLAG_QMI_FAIL during both suspend and
resume.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03003-QCAHSPSWPL_V1_V2_SILICONZ_LITE-2

Reported-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215504
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220127090117.2024-1-kvalo@kernel.org
2022-01-31 16:11:47 +02:00
..
accessibility Char/Misc and other driver changes for 5.17-rc1 2022-01-14 16:02:28 +01:00
acpi Merge branch 'akpm' (patches from Andrew) 2022-01-22 11:28:23 +02:00
amba
android Merge 5.16-rc8 into char-misc-next 2022-01-03 13:44:38 +01:00
ata ata: pata_octeon_cf: fix call to trace_ata_bmdma_stop() 2022-01-21 18:39:16 +09:00
atm atm: iphase: remove redundant pointer skb 2022-01-13 12:50:48 +00:00
auxdisplay
base firmware_loader: move firmware sysctl to its own files 2022-01-22 08:33:35 +02:00
bcma
block bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
bluetooth virtio,vdpa,qemu_fw_cfg: features, cleanups, fixes 2022-01-18 10:05:48 +02:00
bus pci-v5.17-changes 2022-01-16 08:08:11 +02:00
cdrom cdrom: simplify subdirectory registration with register_sysctl() 2022-01-22 08:33:35 +02:00
char random: move the random sysctl declarations to its own file 2022-01-22 08:33:35 +02:00
clk Some hot fixes for clk driver patches merged last week 2022-01-21 09:16:11 +02:00
clocksource - Refactor resource allocation on the Exynos_mct driver without 2022-01-10 13:53:16 +01:00
comedi
connector connector/cn_proc: Use task_is_in_init_pid_ns() 2022-01-26 18:57:09 -08:00
counter counter: 104-quad-8: Fix use-after-free by quad8_irq_handler 2022-01-06 15:51:13 +01:00
cpufreq cpufreq: amd-pstate: Fix Kconfig dependencies for AMD P-State 2022-01-06 18:31:33 +01:00
cpuidle cpuidle: use default_groups in kobj_type 2022-01-05 18:31:17 +01:00
crypto virtio,vdpa,qemu_fw_cfg: features, cleanups, fixes 2022-01-18 10:05:48 +02:00
cxl cxl/core: Remove cxld_const_init in cxl_decoder_alloc() 2022-01-04 17:29:31 -08:00
dax Merge branch 'akpm' (patches from Andrew) 2022-01-15 20:37:06 +02:00
dca
devfreq
dio
dma dmaengine updates for v5.17-rc1 2022-01-18 14:03:34 +02:00
dma-buf drm fixes for 5.17-rc1: 2022-01-16 06:52:38 +02:00
edac - Add support for version 3 of the Synopsys DDR controller to synopsys_edac 2022-01-10 11:45:23 -08:00
eisa
extcon
firewire
firmware RISC-V: Introduce sv48 support without relocatable kernel 2022-01-19 19:37:44 -08:00
fpga
fsi
gnss
gpio gpio fixes for v5.17-rc1 2022-01-20 17:38:23 +02:00
gpu drm/vmwgfx: Fix stale file descriptors on failed usercopy 2022-01-27 17:55:20 +02:00
greybus
hid HID: wacom: Avoid using stale array indicies to read contact count 2022-01-21 15:10:02 +01:00
hsi
hv hyperv-next for 5.17 2022-01-16 15:53:00 +02:00
hwmon bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
hwspinlock
hwtracing
i2c virtio,vdpa,qemu_fw_cfg: features, cleanups, fixes 2022-01-18 10:05:48 +02:00
i3c i3c: master: dw: check return of dw_i3c_master_get_free_pos() 2022-01-13 02:05:50 +01:00
idle
iio bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
infiniband bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2022-01-17 08:27:55 +02:00
interconnect
iommu virtio,vdpa,qemu_fw_cfg: features, cleanups, fixes 2022-01-18 10:05:48 +02:00
ipack
irqchip Rework of the MSI interrupt infrastructure: 2022-01-13 09:05:29 -08:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-12-30 12:12:12 -08:00
leds LED updates for 5.17. Nothing major is happening here. 2022-01-12 16:59:22 -08:00
macintosh macintosh/mac_hid.c: simplify subdirectory registration with register_sysctl() 2022-01-22 08:33:35 +02:00
mailbox - qcom: misc updates to qcom-ipcc driver 2022-01-13 11:19:07 -08:00
mcb
md dax + libnvdimm for v5.17 2022-01-12 15:46:11 -08:00
media bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
memory MTD core changes: 2022-01-11 11:35:28 -08:00
memstick
message scsi: message: fusion: mptctl: Use dma_alloc_coherent() 2022-01-10 10:33:52 -05:00
mfd driver core changes for 5.17-rc1 2022-01-12 11:11:34 -08:00
misc pci-v5.17-changes 2022-01-16 08:08:11 +02:00
mmc bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
most
mtd - added support for more BCM47XX based devices 2022-01-14 15:08:36 +01:00
mux
net ath11k: pci: fix crash on suspend if board file is not found 2022-01-31 16:11:47 +02:00
nfc nfc: use *_set_vendor_cmds() helpers 2022-01-27 13:53:26 +00:00
ntb New AMD PCI ID for NTB, and a number of bug fixes for ntb_hw_switchtec 2022-01-17 08:14:18 +02:00
nubus proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
nvdimm virtio,vdpa,qemu_fw_cfg: features, cleanups, fixes 2022-01-18 10:05:48 +02:00
nvme for-5.17/drivers-2022-01-11 2022-01-12 10:35:23 -08:00
nvmem
of Devicetree fixes for v5.17, take 1: 2022-01-22 09:52:17 +02:00
opp
parisc Merge branch 'akpm' (patches from Andrew) 2022-01-22 11:28:23 +02:00
parport
pci - A single use-after-free fix in the PCI MSI irq domain allocation path 2022-01-23 17:45:00 +02:00
pcmcia pci-v5.17-changes 2022-01-16 08:08:11 +02:00
perf Rework of the MSI interrupt infrastructure: 2022-01-13 09:05:29 -08:00
phy Char/Misc and other driver changes for 5.17-rc1 2022-01-14 16:02:28 +01:00
pinctrl Pin control bulk changes for the v5.17 kernel cycle 2022-01-12 10:56:08 -08:00
platform proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
pnp proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
power platform-drivers-x86 for v5.17-1 2022-01-11 11:26:57 -08:00
powercap Merge back earlier power capping changes for v5.17 2021-12-27 16:51:12 +01:00
pps
ps3
ptp ptp: replace snprintf with sysfs_emit 2022-01-27 14:05:35 +00:00
pwm pwm: Changes for v5.17-rc1 2022-01-20 13:25:01 +02:00
rapidio
ras
regulator regulator: Add MAX20086-MAX20089 driver 2022-01-07 13:36:35 +00:00
remoteproc remoteproc: qcom: q6v5: fix service routines build errors 2022-01-17 16:44:26 -06:00
reset SoC: Add support for StarFive JH7100 RISC-V SoC 2022-01-10 08:32:37 -08:00
rpmsg rpmsg fixes for v5.17-rc1 2022-01-27 11:23:26 +02:00
rtc rtc: sunplus: fix return value in sp_rtc_probe() 2022-01-16 23:50:34 +01:00
s390 dax + libnvdimm for v5.17 2022-01-12 15:46:11 -08:00
sbus
scsi bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
sh
siox
slimbus
soc bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
soundwire Char/Misc and other driver changes for 5.17-rc1 2022-01-14 16:02:28 +01:00
spi sound updates for 5.17-rc1 2022-01-14 14:55:38 +01:00
spmi
ssb
staging Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
target
tc
tee ARM: SoC driver updates for v5.17 2022-01-10 08:13:52 -08:00
thermal thermal: int340x: Add Raptor Lake PCI device id 2022-01-17 19:48:07 +01:00
thunderbolt thunderbolt: Add module parameter for CLx disabling 2021-12-28 10:43:56 +03:00
tty bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
uio UIO: use default_groups in kobj_type 2021-12-29 10:54:50 +01:00
usb proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
vdpa virtio,vdpa,qemu_fw_cfg: features, cleanups, fixes 2022-01-18 10:05:48 +02:00
vfio VFIO updates for v5.17-rc1 2022-01-20 13:31:46 +02:00
vhost vdpa: Protect vdpa reset with cf_mutex 2022-01-14 18:50:54 -05:00
video drm fixes for 5.17-rc1: 2022-01-16 06:52:38 +02:00
virt bitmap patches for 5.17-rc1 2022-01-23 06:20:44 +02:00
virtio vdpa: Allow to configure max data virtqueues 2022-01-14 18:50:53 -05:00
visorbus
vlynq
vme
w1
watchdog linux-watchdog 5.17-rc1 tag 2022-01-17 08:07:57 +02:00
xen arm/xen: Read extended regions from DT and init Xen resource 2022-01-06 09:53:41 +01:00
zorro proc: remove PDE_DATA() completely 2022-01-22 08:33:37 +02:00
Kconfig
Makefile