Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bert Karwatzki <spasswolf@web.de>
To: Emery Hsin <emery.hsin@mediatek.com>
Cc: Bert Karwatzki <spasswolf@web.de>, Felix Fietkau <nbd@nbd.name>,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
	linux-next@vger.kernel.org, jb.tsai@mediatek.com,
	Deren.Wu@mediatek.com, Leon.Yen@mediatek.com,
	Quan.Zhou@mediatek.com, Ryder.Lee@mediatek.com,
	Sean.Wang@mediatek.com, linux-mediatek@lists.infradead.org,
	litien.chang@mediatek.com, lorenzo@kernel.org
Subject: [PATCH] wifi: mt76: mt7925: remove wm2_complete_mask from mt7925_irq_map
Date: Thu, 13 Aug 2026 16:57:40 +0200	[thread overview]
Message-ID: <20260813145741.8047-1-spasswolf@web.de> (raw)
In-Reply-To: <20260612075042.2577193-3-jb.tsai@mediatek.com>

Commit
c4edf9e3e0e5 ("wifi: mt76: mt7925: replace shared rx irq masks with per-chip definitions")
introduces a non-NULL wm2_complete_mask element to mt7925_irq_map. This
gives a NULL pointer dereference error when resuming from hibernate:

[ T2001] BUG: kernel NULL pointer dereference, address: 0000000000000a98
[ T2001] #PF: supervisor write access in kernel mode
[ T2001] #PF: error_code(0x0002) - not-present page
[ T2001] PGD 0 P4D 0
[ T2001] Oops: Oops: 0002 [#1] SMP NOPTI
[ T2001] CPU: 5 UID: 0 PID: 2001 Comm: kworker/u128:4 Tainted: G        W           7.2.0-rc4-bisect-00876-gc4edf9e3e0e5-dirty #746 PREEMPT_RT
[ T2001] Tainted: [W]=WARN
[ T2001] Hardware name: ASUS System Product Name/ROG STRIX B850-F GAMING WIFI, BIOS 1627 02/05/2026
[ T2001] Workqueue: mt76 mt7925_mac_reset_work [mt7925_common]
[ T2001] RIP: 0010:mutex_lock+0xe/0x30
[ T2001] Code: 75 07 31 c0 c3 cc cc cc cc be 01 00 00 00 e9 79 fe ff ff 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 65 48 8b 15 94 13 83 00 31 c0 <f0> 48 0f b1 57 18 75 05 c3 cc cc cc cc be 02 00 00 00 e9 4b fe ff
[ T2001] RSP: 0018:ffffa53dc250fdc8 EFLAGS: 00010246
[ T2001] RAX: 0000000000000000 RBX: ffff951e8d0e3420 RCX: 0000000000000000
[ T2001] RDX: ffff951f64f145c0 RSI: 0000000000000002 RDI: 0000000000000a80
[ T2001] RBP: 0000000000000000 R08: 0000000000000004 R09: 0000000000000001
[ T2001] R10: 0000000000000000 R11: 0000000000000004 R12: ffff951e8d0e3020
[ T2001] R13: ffff951e8d0e2680 R14: ffff951e8d0e0aa0 R15: 0000000000000000
[ T2001] FS:  0000000000000000(0000) GS:ffff952ccc8b3000(0000) knlGS:0000000000000000
[ T2001] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ T2001] CR2: 0000000000000a98 CR3: 000000050641e000 CR4: 0000000000f50ef0
[ T2001] PKRU: 55555554
[ T2001] Call Trace:
[ T2001]  <TASK>
[ T2001]  ? napi_disable+0x18/0x40
[ T2001]  ? mt7925e_mac_reset+0x2f8/0x390 [mt7925e]
[ T2001]  ? mt7925_mac_reset_work+0x98/0x1c0 [mt7925_common]
[ T2001]  ? drm_sched_run_job_work+0x1c/0x2d0 [gpu_sched]
[ T2001]  ? pwq_dec_nr_in_flight+0x29a/0x3a0
[ T2001]  ? process_one_work+0x199/0x2a0
[ T2001]  ? worker_thread+0x1a0/0x2f0
[ T2001]  ? rescuer_thread+0x550/0x550
[ T2001]  ? kthread+0xd1/0x110
[ T2001]  ? kthread_affine_node+0x100/0x100
[ T2001]  ? ret_from_fork+0x1f9/0x2b0
[ T2001]  ? kthread_affine_node+0x100/0x100
[ T2001]  ? kthread_affine_node+0x100/0x100
[ T2001]  ? ret_from_fork_asm+0x11/0x20
[ T2001]  </TASK>

Remove wm2_complete_mask from mt7925_irq_map to fix the issue.

Fixes: c4edf9e3e0e5 ("wifi: mt76: mt7925: replace shared rx irq masks with per-chip definitions")
Signed-off-by: Bert Karwatzki <spasswolf@web.de>
---
 drivers/net/wireless/mediatek/mt76/mt7925/pci.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
index 02ef09dd797d..d2c0a78ae9f2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/pci.c
@@ -493,7 +493,6 @@ static const struct mt792x_irq_map mt7925_irq_map = {
 		.all_complete_mask = MT7925_INT_RX_DONE_ALL,
 		.data_complete_mask = MT7925_INT_RX_DONE_DATA,
 		.wm_complete_mask = MT7925_INT_RX_DONE_WM,
-		.wm2_complete_mask = MT_INT_RX_DONE_WM2,
 	},
 };
 
-- 
2.55.0

I noticed that my debian sid system running linux next-20260812 would
resume from hibernation either displaying a frozen GUI or show the
mentioned backtrace in dmesg and freezing seconds after that. I bisected
the issue to commit 
c4edf9e3e0e5 ("wifi: mt76: mt7925: replace shared rx irq masks with per-chip definitions")
which introduces a non-NULL wm2_complete_mask to mt7925_irq_map.
Removing wm2_complete_mask from mt7925_irq_map fixes the issue in
next-20260812.

Bert Karwatzki


  reply	other threads:[~2026-08-13 14:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12  7:50 [PATCH 01/20] wifi: mt76: mt792x: consolidate rx interrupt masks into all_complete_mask JB Tsai
2026-06-12  7:50 ` [PATCH 02/20] wifi: mt76: connac2: apply new rx all_complete_mask JB Tsai
2026-06-12  7:50 ` [PATCH 03/20] wifi: mt76: mt7925: replace shared rx irq masks with per-chip definitions JB Tsai
2026-08-13 14:57   ` Bert Karwatzki [this message]
2026-08-13 15:11     ` [PATCH] wifi: mt76: mt7925: remove wm2_complete_mask from mt7925_irq_map Emery Hsin (辛承宣)
2026-06-12  7:50 ` [PATCH 04/20] wifi: mt76: mt7925: add MT7927 per-chip rx irq definitions JB Tsai
2026-06-12  7:50 ` [PATCH 05/20] wifi: mt76: mt792x: replace shared PCIe MAC macros with per-chip struct JB Tsai

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=20260813145741.8047-1-spasswolf@web.de \
    --to=spasswolf@web.de \
    --cc=Deren.Wu@mediatek.com \
    --cc=Leon.Yen@mediatek.com \
    --cc=Quan.Zhou@mediatek.com \
    --cc=Ryder.Lee@mediatek.com \
    --cc=Sean.Wang@mediatek.com \
    --cc=emery.hsin@mediatek.com \
    --cc=jb.tsai@mediatek.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=litien.chang@mediatek.com \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    /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