From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EBA49CD98C7 for ; Wed, 10 Jun 2026 19:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Subject:To:From:Date:Reply-To:Cc:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=g8cApphNQMISan/Ar+JDpAnqRjnnyI5gT0fNSEDbPOs=; b=iQqWALl8LSTEW424z8aGNPWcfz wH+X6ymTE3oztVwXMzeW61Kh4GJ2vLuj4pAej+lbXxrHCuTLID/wK247AJl/+eB0tuIxfcAZkr8VK KXpR8F18fv3d+edUV1s06FYCkxsu3irM8B2shAxFHUmFmtGid4Yx5KKLDJr4KP4ZfLCsDekgrbnS2 sOwfgjubtLypj/7TsmkNff1NP58VIZgwfZWQhBzYfxTFV8oOks/NcC4WygI8gO+c4vO89xIZwujxr hJmLx0DCx/HXJTKNEdzF5ZbtF/Ki6repBrVLsL3dRMmo3Ih6H/6prdzBqsyAJ/Z5tuXvGRVBRbUX5 vOctatlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wXP1K-00000008Hq1-24nQ; Wed, 10 Jun 2026 19:55:26 +0000 Received: from pidgin.makrotopia.org ([2a07:2ec0:3002::65]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wXP1I-00000008Ho0-0UbB; Wed, 10 Jun 2026 19:55:25 +0000 Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.99) (envelope-from ) id 1wXP11-000000000Dl-0Ybp; Wed, 10 Jun 2026 19:55:07 +0000 Date: Wed, 10 Jun 2026 20:55:03 +0100 From: Daniel Golle To: "Chester A. Unal" , Daniel Golle , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net-next 0/8] net: dsa: mt7530: modernise register access and add two DSA ops Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260610_125524_155467_C267B892 X-CRM114-Status: UNSURE ( 8.51 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The mt7530 driver carries its own register accessors that predate the regmap conversion and now largely duplicate what regmap already provides, including locking. Most of this series removes that layer. It first moves the MDIO bus locking into the switch regmap via .lock/.unlock callbacks, matching the PCS regmaps, so any path reaching the regmap is serialised automatically. With the wrappers no longer adding locking, the thin mt7530_mii_* indirection is folded away and the remaining accessors are replaced mechanically with the plain regmap API, using the coccinelle semantic patches included in the commit messages. Open-coded register fields are then converted to FIELD_GET/FIELD_PREP. None of this is intended to change behaviour. The last two patches implement .port_fast_age, which flushes dynamically learned MAC entries on topology changes, and .port_change_conduit, which moves a user port's CPU-port affinity at runtime. Daniel Golle (8): net: dsa: mt7530: move MDIO bus locking into regmap net: dsa: mt7530: fold mt7530_mii_write/read into mt7530_write/read net: dsa: mt7530: replace mt7530_write with regmap_write net: dsa: mt7530: replace mt7530_rmw/set/clear with regmap API net: dsa: mt7530: replace mt7530_read with regmap_read net: dsa: mt7530: convert to use field accessor macros net: dsa: mt7530: implement port_fast_age net: dsa: mt7530: implement port_change_conduit op drivers/net/dsa/mt7530-mdio.c | 9 +- drivers/net/dsa/mt7530.c | 791 +++++++++++++++++----------------- drivers/net/dsa/mt7530.h | 209 +++++---- 3 files changed, 517 insertions(+), 492 deletions(-) -- 2.54.0