Bug 213055

Summary: Kernel 5.12.3 breaks ath11k via mhi
Product: Drivers Reporter: Ryan Petris (ryan)
Component: network-wirelessAssignee: drivers_network-wireless (drivers_network-wireless)
Status: RESOLVED CODE_FIX    
Severity: normal CC: a.mark.payne, bbhatt, bmax, htenberge, kvalo, mr.fuxi, nyonis, stelian, voronkovaa
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.12.3 Subsystem:
Regression: No Bisected commit-id:

Description Ryan Petris 2021-05-14 02:01:25 UTC
Kernel Version: 5.12.3
Previously Known Working Version: 5.12.2
Hardware: Dell XPS 13 9310, Qualcomm Atheros QCA6390 (Killer AX500) Wi-Fi
Bios Version: 2.2.0 (latest as of today)
Bios Settings: Virtualization and VT-d are enabled

I know that the ath11k driver is relatively new, however Wi-Fi has worked reliably in this configuration since the release of 5.11.0, and did so through kernel 5.12.2. Upon release of kernel 5.12.3, the Wi-Fi portion of the card no longer works (bluetooth works fine).

I ran git bisect and narrowed down the issue to commit 29b9829718c5e9bd68fc1c652f5e0ba9b9a64fed, "bus: mhi: core: Process execution environment changes serially". Compiling 5.12.3 with this commit reverted makes the Wi-Fi card work again.

When the ath11k driver is working properly, the following is shown in the kernel log (grep'ed for ath11k and mhi):

May 13 18:38:01 chef kernel: ath11k_pci 0000:72:00.0: enabling device (0000 -> 0002)
May 13 18:38:01 chef kernel: mhi mhi0: Requested to power ON
May 13 18:38:01 chef kernel: mhi mhi0: Power on setup success
May 13 18:38:01 chef kernel: ath11k_pci 0000:72:00.0: chip_id 0x0 chip_family 0xb board_id 0xff soc_id 0xffffffff
May 13 18:38:01 chef kernel: ath11k_pci 0000:72:00.0: fw_version 0x101c06cc fw_build_timestamp 2020-06-24 19:50 fw_build_id
May 13 18:38:02 chef kernel: ath11k_pci 0000:72:00.0 wlp114s0: renamed from wlan0

...and when ath11k is not working properly, the following is in the log:

May 13 17:53:13 chef kernel: ath11k_pci 0000:72:00.0: BAR 0: assigned [mem 0xa2500000-0xa25fffff 64bit]
May 13 17:53:13 chef kernel: ath11k_pci 0000:72:00.0: enabling device (0000 -> 0002)
May 13 17:53:13 chef kernel: mhi mhi0: Requested to power ON
May 13 17:53:13 chef kernel: mhi mhi0: Power on setup success
May 13 17:54:44 chef kernel: mhi mhi0: MHI did not enter SBL

Note specifically the last line, "MHI did not enter SBL".
Comment 1 Ryan Petris 2021-05-14 02:54:49 UTC
Tested 5.13-rc1 and Wi-Fi works properly in that version; I guess whatever changes were backported to 5.12 for 5.12.3 either weren't complete or just aren't working as intended.
Comment 2 Andrey Voronkov 2021-05-14 15:22:32 UTC
I confirm I have the same issue on my XPS 9500
Linux xxx 5.12.3-arch1-1 #1 SMP PREEMPT Wed, 12 May 2021 17:54:18 +0000 x86_64 GNU/Linux
Comment 3 Mark 2021-05-15 20:25:08 UTC
I can confirm that I also have the same issue with the 5.12.3-arch-1 kernel on my XPS 9700, which has the same QCA6390 card. Downgrading to the 5.12.1-arch-1 kernel worked, though based on the discussion above I am sure that the 5.12.2-arch-1 kernel would have worked as well.
Comment 4 nyonis 2021-05-16 11:43:03 UTC
I can confirm the same issue happens on my Dell XPS 13 9310 with 5.12.3.
Wifi on 5.12.2 works fine.
Comment 5 Stelian Pop 2021-05-19 16:18:56 UTC
Same here on 5.12.4
Comment 6 bmax 2021-05-20 01:19:36 UTC
Same laptop as nyonis@gmx.de (Dell XPS 9310). Tried BIOS update first, but had to downgrade kernel to 5.12.2 to get working again.
Comment 7 Kalle Valo 2021-05-20 09:57:41 UTC
Here's a bug report which says that commit 29b9829718c5e9bd68fc1c652f5e0ba9b9a64fed ("bus: mhi: core: Process execution environment changes serially") broke ath11k:

https://bugs.archlinux.org/task/70849?project=1&string=linux

I asked for revert here:

https://lore.kernel.org/ath11k/87v97dhh2u.fsf@codeaurora.org/T/#u
Comment 8 nyonis 2021-05-20 10:05:40 UTC
It works again on 5.12.5-zen1-1-zen
Comment 9 htenberge 2021-05-20 10:17:49 UTC
I can confirm the issue still exists with 5.12.5 on a Dell XPS 17 9700.
Comment 10 Andrey Voronkov 2021-05-20 10:19:10 UTC
I can confirm the issue still exists with 5.12.5 on Dell XPS 15 9500 (Arch Linux)
Comment 11 htenberge 2021-05-20 10:32:19 UTC
(In reply to htenberge from comment #9)
> I can confirm the issue still exists with 5.12.5 on a Dell XPS 17 9700.

And also for 5.11.21.
Comment 12 Ryan Petris 2021-05-20 12:26:19 UTC
For anyone running Arch, they reverted the problem commit for their kernel since 5.12.4.arch2-1. The problem still exists in the mainline kernel.
Comment 13 bbhatt 2021-05-20 17:32:09 UTC
Hi, I am the author of: bus: mhi: core: Process execution environment changes serially [ Upstream commit ef2126c4e2ea2b92f543fae00a2a0332e4573c48

We do not see progress as https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/bus/mhi/core?h=v5.13-rc2&id=4884362f6977fc05cbec736625665241c0e0732f is missing in the older kernels.

It's meant to be a dependency but was not picked.
Comment 14 Stelian Pop 2021-05-22 14:29:30 UTC
Seems to be fixed in 5.12.6.
Comment 15 bmax 2021-05-23 22:22:53 UTC
Just installed 5.12.6-arch-1-1 and wireless working fine again. Thanks to whoever fixed this!
Comment 16 Ryan Petris 2021-05-24 01:54:03 UTC
5.12.6 does fix the issue. Thank you!
Comment 17 Kalle Valo 2021-10-10 14:41:44 UTC
Fixed in 5.12.6 so closing the report.