From nobody Thu Apr 9 17:29:37 2026 Received: from flow-a2-smtp.messagingengine.com (flow-a2-smtp.messagingengine.com [103.168.172.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE9E826F46F; Sat, 7 Mar 2026 00:33:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.137 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772843635; cv=none; b=nJAPWt+YRlf0ZReaKxDGZxWVDMQaXO75SxJHsawPEPbgRWPte3SZyTyMX9y3skMTHC96MeXYwvyoYeXgvni0uJPpB6IGW2n1YPHL+rnAf6+Rp4mtZvFjHk0BvIevufFhW71+NQOOc7kaHoiK4coO67hRpx+0t78nmEdfW/jVtsk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772843635; c=relaxed/simple; bh=rDGaFfNf7jHAcpr58xKa3I82OUiQC87REEhxcKnu0lU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc: In-Reply-To:References; b=ISlqPLujtOv5ivi7CaqKCRM2wtSUGzqzR/Y492Xov3t9Lc1s4w45HMJqS+iVjArpuBFN8O7TErsx+wB6SCW8tH7A1wdCv1boS3eGOexGtGdvd3927KogRlheJ7gYZ+UmsbwFb+8o512JTf8/eQH1blZkMHhJ1e3OL1q6Ola5v68= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=jetm.me; spf=pass smtp.mailfrom=jetm.me; dkim=pass (2048-bit key) header.d=jetm.me header.i=@jetm.me header.b=EU3DA6E7; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=jZf2cWNz; arc=none smtp.client-ip=103.168.172.137 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=jetm.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=jetm.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jetm.me header.i=@jetm.me header.b="EU3DA6E7"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="jZf2cWNz" Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailflow.phl.internal (Postfix) with ESMTP id 368521380A45; Fri, 6 Mar 2026 19:33:50 -0500 (EST) Received: from phl-imap-07 ([10.202.2.97]) by phl-compute-02.internal (MEProxy); Fri, 06 Mar 2026 19:33:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jetm.me; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1772843630; x=1772850830; bh=SurwNBvAl/bBDja7s6L7R/0E+xLUsx7Ctts0NZBHMOE=; b= EU3DA6E7CFuf68QIe1jn6w2D91wclcXrsQYo+dBYcdoqd1OEhHYB7eVV3FWPoAOG Eu6nO+/IVAx6heRNdK2b+QaVw4P2LLntkR7kcRRuQM1Y0b7OnyUFfX4IMuGSaTP4 ZZ9sx5mYVV7DKezfJBiBUEGrFryJKoKB4q/BiMENraMPbozSnxBe2gfqmoxjBPrN PvBmYnxlLPilleKZrMz7s37HF5EIi7kTZNK57fcJRHdTS66AKnAd87VYKclsZ2pe xbDAsESwO8pFiv8CHQ8Zp/g1EQLDPM90Avy3yATQDb5XPeI4BARozWJL1q8SoldL DVHN+dSUjtDymfoCCnpxnw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1772843630; x= 1772850830; bh=SurwNBvAl/bBDja7s6L7R/0E+xLUsx7Ctts0NZBHMOE=; b=j Zf2cWNzmCBO7Yjt+3pi7ABQOoDuXaAUnEzWIdxY+VCao60UIQLORipLAiFLnPaAS RKUnB5SCclQLqJIeVWSJCEsfrNW6C8tWH29sM6IVBAbRXsc8qo+UrulZVhICYHBo 5Q4wMdxWFpjBnhpmNcvhv24oWBVlcz+gEHBLFbkqjw5p+B3+VViJ3YN/T1qltqVG Z37sYQ5LXMEfGqTx+x3abKU/vAcitWbnYNtc1z/CHSssWt0uwCiMqhPBLXMHRqlR N6tT5prtsipDXxplYXntbYKHg0NyH08VrXzUVyLMdRgePI+bUF3KX/mOSsdn3ZWY yhXpVmtn+Ctqo0bjgWDjQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvjedtjeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepoffhfffugggtgffkvfevofgjfhesthekredtredtjeenucfhrhhomheplfgrvhhi vghrucfvihgruceofhhlohhsshesjhgvthhmrdhmvgeqnecuggftrfgrthhtvghrnhepve ektdfhffevuddtgfetieevtddvheduhfeggfekveejlefhleefieevueefiefhnecuvehl uhhsthgvrhfuihiivgepjeenucfrrghrrghmpehmrghilhhfrhhomhepfhhlohhsshesjh gvthhmrdhmvgdpnhgspghrtghpthhtohepvdefpdhmohguvgepshhmthhpohhuthdprhgt phhtthhopegrnhhgvghlohhgihhorggttghhihhnohdruggvlhhrvghgnhhosegtohhllh grsghorhgrrdgtohhmpdhrtghpthhtohepfeduleefieefudesghhmrghilhdrtghomhdp rhgtphhtthhopehlohhonhhgrddtgidttdesghhmrghilhdrtghomhdprhgtphhtthhope grrhhivghlrdhrohhsvghnfhgvlhgurdejhedtsehgmhgrihhlrdgtohhmpdhrtghpthht oheptghhrghpuhhishgurghrihhogeesghhmrghilhdrtghomhdprhgtphhtthhopehgih hoshgrlheltdesghhmrghilhdrtghomhdprhgtphhtthhopehmrghtthhhihgrshdrsghg ghesghhmrghilhdrtghomhdprhgtphhtthhopehrrgguohhirdgthhhrihhssehgmhgrih hlrdgtohhmpdhrtghpthhtohepshgrmhhurdhtohhljhgrmhhosehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i9dde48b3:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 0B0511EA006C; Fri, 6 Mar 2026 19:33:50 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface From: Javier Tia Date: Fri, 06 Mar 2026 18:33:27 -0600 Subject: [PATCH 08/18] wifi: mt76: mt7925: guard mac_reset against MT7927 DMA destruction Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260306-mt7927-wifi-support-v1-8-c77e7445511d@jetm.me> To: linux-wireless@vger.kernel.org, Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Matthias Brugger , AngeloGioacchino Del Regno , Deren Wu , Ming Yen Hsieh Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Marcin FM , Cristian-Florin Radoi , George Salukvadze , Evgeny Kapusta <3193631@gmail.com>, Samu Toljamo , Ariel Rosenfeld , Chapuis Dario , =?utf-8?q?Thibaut_Fran=C3=A7ois?= , =?utf-8?q?=E5=BC=A0=E6=97=AD=E6=B6=B5?= , Javier Tia X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1943; i=floss@jetm.me; h=from:subject:message-id; bh=rDGaFfNf7jHAcpr58xKa3I82OUiQC87REEhxcKnu0lU=; b=owEB7QES/pANAwAKAbXuwwuoZ3cfAcsmYgBpq3JPMXsAEGYKf/FbWGwk6bwEdk8nUJ3cAxMlF 9a/tR05XCuJAbMEAAEKAB0WIQSbE7ILzw7eI0VKk8m17sMLqGd3HwUCaatyTwAKCRC17sMLqGd3 H9SGDACf5zkl3X6UnGRm+ZnMzObtrZtz5CJQp6Dn9jvZ4U7gX8dyGL6rpp1JaYLi4kdHfkjnLuN j92iQH9evrsyNDLSKv+KCWE2WC3XBumitMbFjbFQuHPNaQHAgFPUVi+i2+CxyR9HVS1KvH9+gSt P79twzIsEBxtVdxUNYYSJaZ1ZrVVGArzQSX2usCnZnXb5WZ/rT9RN7bHeTP2qr4dsYPsvw8RUSm bDn7aQA359GY6rr42rZPfJ6x/oBJ4oWGaZW2oUihtsxE6q/GAf7Uw7A8AOHRQYYOy3HHsz9SpLJ Y39ST5CbalxxnKERVpRsnlyk88biKENqxCgu9y46ZKwvru23fUc/cHSbEUZ75+XzWw9A8mo6LSK Y5J3fzeAVa0CyAF4eW9PEMnqyBEiafaLsECAo3hjKq9FQ8okR1nwcST6KlwB/GY6fcwvrdDb6RY hyOkFyTrdZrn0B44aDKw7JGi2n6xFjOYHa3eO8w151qqk9ouBZ30+9bplwCWm9T7gEJJM= X-Developer-Key: i=floss@jetm.me; a=openpgp; fpr=9B13B20BCF0EDE23454A93C9B5EEC30BA867771F In-Reply-To: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me> References: <20260306-mt7927-wifi-support-v1-0-c77e7445511d@jetm.me> On MT7927 hardware, the mac_reset path performs CLR_OWN and WPDMA logic reset, both of which destroy DMA ring configuration. CLR_OWN triggers the ROM to reinitialize WFDMA, and the logic reset pulse disrupts the WFDMA state that mt7927_dma_init() carefully configured. A full MT7927 reset requires re-running the DMA initialization sequence, which is not yet implemented in the recovery path. Return -EOPNOTSUPP with a warning so users know to reload the module. Tested-by: Marcin FM Tested-by: Cristian-Florin Radoi Tested-by: George Salukvadze Tested-by: Evgeny Kapusta <3193631@gmail.com> Tested-by: Samu Toljamo Tested-by: Ariel Rosenfeld Tested-by: Chapuis Dario Tested-by: Thibaut Fran=C3=A7ois Tested-by: =E5=BC=A0=E6=97=AD=E6=B6=B5 Signed-off-by: Javier Tia --- drivers/net/wireless/mediatek/mt76/mt7925/pci_mac.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/pci_mac.c b/drivers/= net/wireless/mediatek/mt76/mt7925/pci_mac.c index 1626a3684082..cf578a2cdc68 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/pci_mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/pci_mac.c @@ -72,6 +72,14 @@ int mt7925e_mac_reset(struct mt792x_dev *dev) const struct mt792x_irq_map *irq_map =3D dev->irq_map; int i, err; =20 + /* MT7927: CLR_OWN and WPDMA reset destroy DMA ring configuration. + * A full reset requires re-running mt7927_dma_init() which is not + * yet implemented in the recovery path. */ + if (is_mt7927(&dev->mt76)) { + dev_warn(dev->mt76.dev, "MT7927 mac_reset not supported, reload module t= o recover\n"); + return -EOPNOTSUPP; + } + mt792xe_mcu_drv_pmctrl(dev); =20 mt76_connac_free_pending_tx_skbs(&dev->pm, NULL); --=20 2.53.0