From: Andrew Lunn <andrew@lunn.ch>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Cc: Daniel Golle <daniel@makrotopia.org>,
"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"sander@svanheule.net" <sander@svanheule.net>,
"markus.stockhausen@gmx.de" <markus.stockhausen@gmx.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v9] net: mdio: Add RTL9300 MDIO driver
Date: Mon, 10 Mar 2025 17:32:41 +0100 [thread overview]
Message-ID: <f6c7581d-7e4b-4114-bb57-8b009d66c5d2@lunn.ch> (raw)
In-Reply-To: <b506b6e9-d5c3-4927-ab2d-e3a241513082@alliedtelesis.co.nz>
> So far upstream Linux doesn't have generic paged PHY register functions.
Yes it does:
phy_write_paged() and phy_read_paged().
These do all the locking to make sure they are atomic with respect to
other phy read/writes while the page is selected. The driver just
needs to provide two methods to read the current page and the set the
current page,
https://elixir.bootlin.com/linux/v6.13.6/source/include/linux/phy.h#L1060
/** @read_page: Return the current PHY register page number */
int (*read_page)(struct phy_device *dev);
/** @write_page: Set the current PHY register page number */
int (*write_page)(struct phy_device *dev, int page);
Andrew
next prev parent reply other threads:[~2025-03-10 16:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-09 23:25 Chris Packham
2025-03-10 1:31 ` Daniel Golle
2025-03-10 2:07 ` Chris Packham
2025-03-10 15:28 ` Daniel Golle
2025-03-13 1:04 ` Chris Packham
2025-03-13 13:05 ` Andrew Lunn
2025-03-10 16:32 ` Andrew Lunn [this message]
2025-03-10 16:34 ` Russell King (Oracle)
2025-03-10 16:27 ` Andrew Lunn
2025-03-10 18:06 ` Christophe JAILLET
2025-03-10 18:15 ` Russell King (Oracle)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f6c7581d-7e4b-4114-bb57-8b009d66c5d2@lunn.ch \
--to=andrew@lunn.ch \
--cc=Chris.Packham@alliedtelesis.co.nz \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=markus.stockhausen@gmx.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sander@svanheule.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®