From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Jianhui Zhao <zhaojh329@gmail.com>
Cc: andrew@lunn.ch, davem@davemloft.net, edumazet@google.com,
hkallweit1@gmail.com, kuba@kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
pabeni@redhat.com
Subject: Re: [PATCH] net: phy: Add sysfs attribute for PHY c45 identifiers.
Date: Mon, 12 Jun 2023 16:10:24 +0100 [thread overview]
Message-ID: <ZIc1YJvUCsvX2+0p@shell.armlinux.org.uk> (raw)
In-Reply-To: <ZIc0d48xURaZzZc/@shell.armlinux.org.uk>
On Mon, Jun 12, 2023 at 04:06:32PM +0100, Russell King (Oracle) wrote:
> On Mon, Jun 12, 2023 at 10:04:26PM +0800, Jianhui Zhao wrote:
> > diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> > index 17d0d0555a79..81a4bc043ee2 100644
> > --- a/drivers/net/phy/phy_device.c
> > +++ b/drivers/net/phy/phy_device.c
> > @@ -541,8 +541,10 @@ static int phy_bus_match(struct device *dev, struct device_driver *drv)
> >
> > if ((phydrv->phy_id & phydrv->phy_id_mask) ==
> > (phydev->c45_ids.device_ids[i] &
> > - phydrv->phy_id_mask))
> > + phydrv->phy_id_mask)) {
> > + phydev->phy_id = phydev->c45_ids.device_ids[i];
> > return 1;
> > + }
> > }
> > return 0;
> > } else {
> >
> > How about modifying it like this?
>
> No - there are C45 PHYs where the ID in each MMD are different. 88x3310
> is one such example. If we're going to report any of them, we should
> report all of them.
The other issue is, this will remain as zero until a driver has
successfully matched the device, which means as far as userspace
knowing what type of PHY it is (to find a driver) this doesn't
improve the situation.
I don't think this is a very good solution.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
prev parent reply other threads:[~2023-06-12 15:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-11 15:27 [PATCH] net: phy: Add sysfs attribute for PHY c45 identifiers Jianhui Zhao
2023-06-11 15:40 ` Andrew Lunn
2023-06-12 14:04 ` Jianhui Zhao
2023-06-12 14:10 ` Andrew Lunn
2023-06-12 15:06 ` Russell King (Oracle)
2023-06-12 15:10 ` Russell King (Oracle) [this message]
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=ZIc1YJvUCsvX2+0p@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=zhaojh329@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).