From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>, Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net: phy: fixed_phy: use genphy_read_abilities to simplify the code
Date: Mon, 10 Nov 2025 21:57:01 +0000 [thread overview]
Message-ID: <aRJfrUQ0hSKETbxp@shell.armlinux.org.uk> (raw)
In-Reply-To: <ed9eb89b-8205-4ca3-9182-d7e091972846@gmail.com>
On Mon, Nov 10, 2025 at 10:11:24PM +0100, Heiner Kallweit wrote:
> Populating phy->supported can be achieved easier by using
> genphy_read_abilities().
Are you sure about that?
> - switch (status->speed) {
> - case SPEED_1000:
> - linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
> - phy->supported);
> - linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
> - phy->supported);
> - fallthrough;
> - case SPEED_100:
> - linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT,
> - phy->supported);
> - linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT,
> - phy->supported);
> - fallthrough;
> - case SPEED_10:
> - default:
> - linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT,
> - phy->supported);
> - linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT,
> - phy->supported);
This code sets both HD and FD for each speed, and if at 1G it sets
100M and 10M as well, if at 100M, it sets 10M as well.
However, swphy emulation (including what was reported through BMSR
and ESTAT) has only ever indicated one speed and duplex supported
via the normal ability bits in these registers. So, "simplifying"
the code introduces user visible changes. This needs to be mentioned
in the commit message.
The next questions are:
1. does this difference matter?
2. is it a bug fix?
3. is swphy wrong?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2025-11-10 21:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 21:11 [PATCH net-next] net: phy: fixed_phy: use genphy_read_abilities to simplify the code Heiner Kallweit
2025-11-10 21:57 ` Russell King (Oracle) [this message]
2025-11-11 7:39 ` Heiner Kallweit
2025-11-12 20:28 ` Heiner Kallweit
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=aRJfrUQ0hSKETbxp@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=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).