From nobody Wed Feb 11 05:41:56 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 1BCDA2BF00A; Fri, 30 Jan 2026 00:38:20 +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=1769733502; cv=none; b=bkTENhVkktoQ3Vj9lMT2vfosvmSdw4h81BDZKtqcN05FDVXXr5n83G8UQPdz5o4Cyp/i5gDo5uIjHYebCCC78bCrjBKqQO0d0otgpwGM0SU205ozjOzSJYdMRGC28LaZzXt6juKlLcoBvnIQK2x7H2wKFJ0BlwC1tgtaLIpF3I4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769733502; c=relaxed/simple; bh=n2GHfJab3xH77Etnww8wufA84iG78cjy7tCPYfCVyB0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EAIYO13dYbc2bV+O7G7E5kX9wWfxGUtt43xr4qZ+0J1SKHXeB64lw3p31A6+13Vu20BuJE8g9z1lPcLUJS7lc8jZhYudgjX1HLoysi7QgA/RLyp1LJjW3npkjNVFKZGxuTIBhPzQopm8X3GGoYqmc5JwOD2gz0W4J1tgvqACO9U= 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 1vlcWf-000000007kl-018D; Fri, 30 Jan 2026 00:38:17 +0000 Date: Fri, 30 Jan 2026 00:38:13 +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 v10 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 --- v10: no changes 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