From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 3CEAE267AF2; Mon, 15 Jun 2026 05:21:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781500873; cv=none; b=g/gD5Ybp9SO2tDTUaqu8pWZXZIvSY10V3OCNa3g1bvMMBZQxDE8YkvtZRo/lQM0R3uUSz3rU3uYhf3qU+Yk2gWAcRYeRBOeSXm5UJIbiJyIfwOERAOI/A9Nf3QybarBXu8/cvh7cqA0dA5heBw73pcU7NalNej/0H3qbbcU+g2A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781500873; c=relaxed/simple; bh=acyX5blWL3Rpac8wUnp2hiruH1ByWcO0M4eWEe5W5jk=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=pQX8G9WlKknBY04AiJo+zTpWR2OMBYOVW4tkT5n6wirvWnAbhjB6M0ku/mq/sqjKnKc2RSdCpk3JLXAF1VpBlW291+Dpe9J222cnqHPlpwnzIhY4eWrkZ/ATUWKPBsQ2KrBpO7+Zqj7B8iEH2aEsErVdvywo7OMRDpxsH2q2KEM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.99) (envelope-from ) id 1wYzko-000000000vI-1viC; Mon, 15 Jun 2026 05:20:58 +0000 Date: Mon, 15 Jun 2026 06:20:55 +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 v3 0/8] net: dsa: mt7530: modernise register access and add two DSA ops Message-ID: 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=us-ascii Content-Disposition: inline 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. --- v3: * 5/8: initialise register read-back variables to 0 so a failed regmap_read keeps the previous read-as-zero behaviour, and use u32 for the value in mt7530_setup_port5 * 6/8: name the age timer field AGE_TIMER_MASK and document the corrected ATC_HASH/VTCR_VID field macros * 7/8: serialise the port_fast_age ATC flush under reg_mutex and log on timeout, align a define, and correct the commit message which wrongly claimed per-port parity with b53/realtek * 8/8: populate the netlink extack on rejection and refuse a conduit that lives on a different switch v2: * fix stray 'static void' left-over in 4/8 which had a fix accidentally folded into 5/8 (byte-identical state at 8/8, but bisectability is restored) * extend port_change_conduit op commit message 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 | 823 +++++++++++++++++----------------- drivers/net/dsa/mt7530.h | 209 +++++---- 3 files changed, 541 insertions(+), 500 deletions(-) base-commit: 2319688890d97c63da423a3c57c23b4ab5952dfc -- 2.54.0