From nobody Sun Feb 8 13:13:14 2026 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 A0F872C0268; Tue, 27 Jan 2026 21:38:13 +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=1769549894; cv=none; b=U/TV3pEspJkgzEck7p4kqMq5eVMEAgpU2mjJLTzREY/W2Fhdm/6bHr0vQHJ2OG1cUkGYh1f1SFuaIeXoRYHc8BouZm/mYDlf3dzY3Q3tsSJjlG6DrrqjA4t2dNwgIW5ISc5x3QA4ygEET9XWzTbuICjgSaFPsCCwCWPC0HYcU1s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769549894; c=relaxed/simple; bh=qgLjxlGPE8LtstuKhRWvQBtnGI0E+AQpGe//Thhg+ts=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ZjhY+xvOR7KIDS5UTB2K7rk3RNiugPcrhke74Ds9Am+lSXwnxHvfZXqAplW+iaGuRslkuRdg70kWnlbG9wcxQ3jwjEr8iaXul15GJEXMFSEgAMZUjzVuc8Q68Z8gkv7zLcqNsB/dy7FLgC3AQAQ0J7Nmee3yY0iA3ZVq00FzmVk= 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 1vkqlF-000000002w2-2zSz; Tue, 27 Jan 2026 21:38:09 +0000 Date: Tue, 27 Jan 2026 21:38:06 +0000 From: Daniel Golle To: Daniel Golle , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiner Kallweit , Russell King , Simon Horman , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Frank Wunderlich , Chad Monroe , Cezary Wilmanski , Avinash Jayaraman , Bing tao Xu , Liang Xu , Juraj Povazanec , "Fanni (Fang-Yi) Chan" , "Benny (Ying-Tsan) Weng" , "Livia M. Rosu" , John Crispin Subject: [PATCH net-next v9 3/4] net: mdio: add unlocked mdiodev C45 bus accessors Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add helper inline functions __mdiodev_c45_read() and __mdiodev_c45_write(), which are the C45 equivalents of the existing __mdiodev_read() and __mdiodev_write() added by commit e6a45700e7e1 ("net: mdio: add unlocked mdiobus and mdiodev bus accessors") Signed-off-by: Daniel Golle --- v9: no changes v8: no changes v7: no changes v6: no changes v5: fix indentation RFC v4: no changes RFC v3: no changes RFC v2: add this patch, initial submission --- include/linux/mdio.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/linux/mdio.h b/include/linux/mdio.h index 42d6d47e445b..52d94b8ae371 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h @@ -648,6 +648,19 @@ static inline int mdiodev_modify_changed(struct mdio_d= evice *mdiodev, mask, set); } =20 +static inline int __mdiodev_c45_read(struct mdio_device *mdiodev, int deva= d, + u16 regnum) +{ + return __mdiobus_c45_read(mdiodev->bus, mdiodev->addr, devad, regnum); +} + +static inline int __mdiodev_c45_write(struct mdio_device *mdiodev, u32 dev= ad, + u16 regnum, u16 val) +{ + return __mdiobus_c45_write(mdiodev->bus, mdiodev->addr, devad, regnum, + val); +} + static inline int mdiodev_c45_modify(struct mdio_device *mdiodev, int deva= d, u32 regnum, u16 mask, u16 set) { --=20 2.52.0