From: Andrew Lunn <andrew@lunn.ch>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 3/5] net: phy: allow Clause 45 access via mii ioctl
Date: Tue, 28 May 2019 17:31:24 +0200 [thread overview]
Message-ID: <20190528153124.GM18059@lunn.ch> (raw)
In-Reply-To: <20190528132745.m4iuh6ggib3a5kiq@shell.armlinux.org.uk>
> > Hi Russell,
> >
> > I find the SIOCGMIIREG/SIOCGMIIPHY ioctls useful for C45 just as much
> > as they are for C22, but I think the way they work is a big hack and
> > for that reason they're less than useful when you need them most.
> > These ioctls work by hijacking the MDIO bus driver of a PHY that is
> > attached to a net_device. Hence they can be used to access at most a
> > PHY that lies on the same MDIO bus as one you already have a
> > phy-handle to.
> > If you have a PHY issue that makes of_phy_connect fail and the
> > net_device to fail to probe, basically you're SOL because you lose
> > that one handle that userspace had to the MDIO bus.
> > Similarly if you're doing a bring-up and all PHY interfaces are fixed-link.
> > Maybe it would be better to rethink this and expose some sysfs nodes
> > for raw MDIO access in the bus drivers.
>
> I don't see how putting some attributes in sysfs helps
> What would be better would be for the MDIO layer to have /dev nodes
> that userspace could use to access the bus independent of the PHY,
> much the same as we have /dev/i2c-* - but I'm not sure if we really
> want to invent a whole new interface to MDIO buses.
There is work on re-implementing ethtool using a netlink socket. The
proposed code supports the current MII interface. However, it should
be possible to extend it to pass some other identifier for the PHY,
rather than going via the network interface it is attached to.
Once ethtool netlink gets merged, i will take a look at this.
Andrew
next prev parent reply other threads:[~2019-05-28 15:31 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 15:21 [PATCH net-next 0/4] phylink/sfp updates Russell King - ARM Linux admin
2019-05-20 15:22 ` [PATCH net-next 1/4] net: phylink: support for link gpio interrupt Russell King
2019-05-20 18:22 ` Florian Fainelli
2019-05-20 18:31 ` Russell King - ARM Linux admin
2019-05-20 15:22 ` [PATCH net-next 2/4] net: phy: allow Clause 45 access via mii ioctl Russell King
2019-05-20 18:23 ` Florian Fainelli
2019-05-20 15:22 ` [PATCH net-next 3/4] net: sfp: add mandatory attach/detach methods for sfp buses Russell King
2019-05-20 18:24 ` Florian Fainelli
2019-05-20 15:22 ` [PATCH net-next 4/4] net: sfp: remove sfp-bus use of netdevs Russell King
2019-05-20 18:25 ` Florian Fainelli
2019-05-20 15:40 ` [PATCH net-next 0/4] phylink/sfp updates Vladimir Oltean
2019-05-22 17:34 ` David Miller
2019-05-28 9:56 ` [PATCH net-next 0/5] " Russell King - ARM Linux admin
2019-05-28 9:57 ` [PATCH net-next 1/5] net: phylink: remove netdev from phylink mii ioctl emulation Russell King
2019-05-28 15:19 ` Andrew Lunn
2019-05-28 9:57 ` [PATCH net-next 2/5] net: phylink: support for link gpio interrupt Russell King
2019-05-28 10:02 ` Russell King - ARM Linux admin
2019-05-29 21:21 ` David Miller
2019-05-28 9:57 ` [PATCH net-next 3/5] net: phy: allow Clause 45 access via mii ioctl Russell King
2019-05-28 12:54 ` Vladimir Oltean
2019-05-28 13:27 ` Russell King - ARM Linux admin
2019-05-28 15:31 ` Andrew Lunn [this message]
2019-05-28 9:57 ` [PATCH net-next 4/5] net: sfp: add mandatory attach/detach methods for sfp buses Russell King
2019-05-28 15:21 ` Andrew Lunn
2019-05-28 9:57 ` [PATCH net-next 5/5] net: sfp: remove sfp-bus use of netdevs Russell King
2019-05-28 15:21 ` Andrew Lunn
2019-05-31 19:39 ` [PATCH net-next 0/5] phylink/sfp updates David Miller
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=20190528153124.GM18059@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).