From: Michael Walle <mwalle@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Yisen Zhuang" <yisen.zhuang@huawei.com>,
"Salil Mehta" <salil.mehta@huawei.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Marek Behún" <kabel@kernel.org>, "Xu Liang" <lxu@maxlinear.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 04/10] net: phy: replace is_c45 with phy_accces_mode
Date: Mon, 26 Jun 2023 08:31:26 +0200 [thread overview]
Message-ID: <353752b143bca56f79035635808e8e30@kernel.org> (raw)
In-Reply-To: <6fcd887a-c731-4c31-bb43-e8d14071524e@lunn.ch>
Am 2023-06-23 21:54, schrieb Andrew Lunn:
> On Fri, Jun 23, 2023 at 07:34:22PM +0200, Andrew Lunn wrote:
>> > @@ -131,9 +131,11 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
>> >
>> > is_c45 = fwnode_device_is_compatible(child, "ethernet-phy-ieee802.3-c45");
>> > if (is_c45 || fwnode_get_phy_id(child, &phy_id))
>> > - phy = get_phy_device(bus, addr, is_c45);
>> > + phy = get_phy_device(bus, addr,
>> > + is_c45 ? PHY_ACCESS_C45 : PHY_ACCESS_C22);
>> > else
>> > - phy = phy_device_create(bus, addr, phy_id, 0, NULL);
>> > + phy = phy_device_create(bus, addr, phy_id, PHY_ACCESS_C22,
>> > + NULL);
>>
>> Documentation/devicetree/bindings/net/ethernet-phy.yaml says:
>>
>> compatible:
>> oneOf:
>> - const: ethernet-phy-ieee802.3-c22
>> description: PHYs that implement IEEE802.3 clause 22
>> - const: ethernet-phy-ieee802.3-c45
>> description: PHYs that implement IEEE802.3 clause 45
>>
>> It would be nice to make this documentation more specific. It now
>> refers to 'bus transaction', so maybe we want to append that to these
>> lines?
>
> Humm, looking at patch 9, maybe i got this wrong. Patch 9 seems to
> suggest ethernet-phy-ieee802.3-c45 means c45 register space, and it is
> upto the core to figure out how to access that register space, either
> using c45 transactions, or C45 over C22.
Yes. And I think the core has all information to determine what mode
should be used. Use C45 transfers first and iff that's not possible
switch to C45-over-C22. Therefore, there isn't really a choice. It's
either "it will work" or "it won't work at all".
For all supported C45 PHYs right now, the mode should stay with C45
because, that was the only supported mode. Except, if a C45 PHY was
probed as a C22 PHY and stayed that way. With this patchset they
would now be probed a PHY with C45 registers and using C45-over-C22.
But I'm not sure if that's a thing.
-michael
next prev parent reply other threads:[~2023-06-26 6:31 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-23 10:29 [PATCH net-next v2 00/10] net: phy: C45-over-C22 access Michael Walle
2023-06-23 10:29 ` [PATCH net-next v2 01/10] net: phy: add error checks in mmd_phy_indirect() and export it Michael Walle
2023-06-23 10:29 ` [PATCH net-next v2 02/10] net: phy: get rid of redundant is_c45 information Michael Walle
2023-06-23 10:29 ` [PATCH net-next v2 03/10] net: phy: introduce phy_is_c45() Michael Walle
2023-06-23 17:15 ` Andrew Lunn
2023-06-23 10:29 ` [PATCH net-next v2 04/10] net: phy: replace is_c45 with phy_accces_mode Michael Walle
2023-06-23 17:34 ` Andrew Lunn
2023-06-23 19:54 ` Andrew Lunn
2023-06-26 6:31 ` Michael Walle [this message]
2023-06-23 10:29 ` [PATCH net-next v2 05/10] net: phy: make the "prevent_c45_scan" a property of the MII bus Michael Walle
2023-06-23 10:29 ` [PATCH net-next v2 06/10] net: phy: print an info if a broken C45 bus is found Michael Walle
2023-06-23 17:42 ` Andrew Lunn
2023-06-23 20:35 ` Simon Horman
2023-06-26 6:50 ` Michael Walle
2023-06-23 10:29 ` [PATCH net-next v2 07/10] net: phy: add support for C45-over-C22 transfers Michael Walle
2023-06-23 20:43 ` Simon Horman
2023-06-24 20:15 ` Andrew Lunn
2023-06-26 7:14 ` Michael Walle
2023-06-23 10:29 ` [PATCH net-next v2 08/10] net: phy: introduce phy_promote_to_c45() Michael Walle
2023-06-23 10:29 ` [PATCH net-next v2 09/10] net: mdio: add C45-over-C22 fallback to fwnode_mdiobus_register_phy() Michael Walle
2023-06-23 10:29 ` [PATCH net-next v2 10/10] net: mdio: support C45-over-C22 when probed via OF Michael Walle
2023-06-23 20:48 ` Simon Horman
2023-06-26 7:37 ` Michael Walle
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=353752b143bca56f79035635808e8e30@kernel.org \
--to=mwalle@kernel.org \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lxu@maxlinear.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=salil.mehta@huawei.com \
--cc=yisen.zhuang@huawei.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).