From: Andrew Lunn <andrew@lunn.ch>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
sander@svanheule.net, markus.stockhausen@gmx.de,
daniel@makrotopia.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v11] net: mdio: Add RTL9300 MDIO driver
Date: Fri, 14 Mar 2025 16:26:13 +0100 [thread overview]
Message-ID: <bd1d1cb9-a72b-484b-8cfd-7e91179391d2@lunn.ch> (raw)
In-Reply-To: <20250313233811.3280255-1-chris.packham@alliedtelesis.co.nz>
> +static int rtl9300_mdiobus_probe_one(struct device *dev, struct rtl9300_mdio_priv *priv,
> + struct fwnode_handle *node)
> +{
> + struct rtl9300_mdio_chan *chan;
> + struct fwnode_handle *child;
> + struct mii_bus *bus;
> + u32 mdio_bus;
> + int err;
> +
> + err = fwnode_property_read_u32(node, "reg", &mdio_bus);
> + if (err)
> + return err;
> +
> + /* The MDIO interfaces are either in GPHY (i.e. clause 22) or 10GPHY
> + * mode (i.e. clause 45).
I still need more clarification about this. Is this solely about the
polling? Or does an interface in C22 mode go horribly wrong when asked
to do a C45 bus transaction?
> + bus->name = "Realtek Switch MDIO Bus";
> + bus->read = rtl9300_mdio_read_c22;
> + bus->write = rtl9300_mdio_write_c22;
> + bus->read_c45 = rtl9300_mdio_read_c45;
> + bus->write_c45 = rtl9300_mdio_write_c45;
You are providing C45 bus methods, independent of the interface
mode. So when accessing EEE registers in C45 address space, C45 bus
transactions are going to be used, even on an MDIO interface using C22
mode. Does this work? Can you actually do both C22 and C45 bus
transactions independent of the interface mode?
Andrew
next prev parent reply other threads:[~2025-03-14 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 23:38 Chris Packham
2025-03-14 15:26 ` Andrew Lunn [this message]
2025-03-16 20:11 ` Chris Packham
2025-03-17 21:27 ` Andrew Lunn
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=bd1d1cb9-a72b-484b-8cfd-7e91179391d2@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®