From nobody Thu Dec 18 23:24:50 2025 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 DDCA02116F4; Mon, 15 Dec 2025 00:12:09 +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=1765757532; cv=none; b=j1LSXBw9ji7PeAbEPqyyHezkQY3Oz9Vq5o5nOTIBTYGru23oLJAmdx0ssxv9zSSkB93WUA61nVVrBhlw0mbx9gh4MV5oa1GXO5P9qPCTTzKjKBCdw6cew6Vmmui6S4uaO6zNTAEZULPJ4c5gGvrb4G2nWi1fG6mxRRlGhNHhliU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765757532; c=relaxed/simple; bh=1z7+7/ORHzgA02BlWk4B1jV2aWOw1+YuttbSVMYHGi0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WgUTCRoU3Ndqp4Q84jMUxKts2VrjxptT8NehoC2bgFrE9R4SkZRlGVLZqT81p0Z/Zy5+hiIZIqijQExP6nDNRQ+eSj3SJ3KWSVPe9uYkJO8p3JvZbOnMBH7S0DvCLvfP87B1JwtnKqBIjjnnBu0J93AiUhwnjjcEloT8zPyEnLI= 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 1vUwC5-000000002Jp-1afR; Mon, 15 Dec 2025 00:12:05 +0000 Date: Mon, 15 Dec 2025 00:12:01 +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 RFC net-next v3 3/4] net: mdio: add unlocked mdiodev C45 bus accessors Message-ID: <552e004f6919e0dac90c9edc83120b84085309df.1765757027.git.daniel@makrotopia.org> 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 --- 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 42d6d47e445b7..f39b4dba5cd4f 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