From: Chris Babroski <cbabroski@nvidia.com>
To: <kuba@kernel.org>
Cc: <andrew+netdev@lunn.ch>, <cbabroski@nvidia.com>,
<davem@davemloft.net>, <davthompson@nvidia.com>,
<edumazet@google.com>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>, <pabeni@redhat.com>,
<hkallweit1@gmail.com>, <linux@armlinux.org.uk>
Subject: Re: [PATCH net-next v1] mlxbf_gige: report unknown speed and duplex when link is down
Date: Tue, 26 Aug 2025 14:45:59 -0400 [thread overview]
Message-ID: <20250826184559.89822-1-cbabroski@nvidia.com> (raw)
In-Reply-To: <20250815121102.0653f13f@kernel.org>
Hi Jakub,
Thanks for the feedback.
> If that's the correct thing to do why is
> phy_ethtool_get_link_ksettings() not doing it?
If I understand correctly, phy_ethtool_get_link_ksettings() reads
cached values that are updated when phy_read_status() is called by the
phy state machine. Doing "ifconfig down" will eventually trigger
phy_stop() in the ndo_stop() handler. This halts the phy state machine
and sets phydev->link without calling phy_read_status() or explicitly
setting other values, like speed and duplex.
It seems this is expected behavior with phylib, but I'm not familiar
with the implementation history. CC'd PHY maintainers for additional
input.
> Please explain what makes mlxbf special
BlueField is unique in that the phy is hardwired to an internal switch
and so the physical link between the phy and link partner is always
up. This will also affect what link settings are reported by the phy.
This patch comes from a desire for ethtool output behavior to be the
same when an administrative link down is issued on the BlueField OOB
(mlxbf_gige) and NIC (mlx5) interfaces. The mlx5 driver implements
custom get_link_ksettings() handlers and does not use phylib.
Best,
Chris
next prev parent reply other threads:[~2025-08-26 18:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 16:33 Chris Babroski
2025-08-15 19:11 ` Jakub Kicinski
2025-08-26 18:45 ` Chris Babroski [this message]
2025-10-13 15:17 ` Chris Babroski
2025-10-13 17:59 ` Jakub Kicinski
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=20250826184559.89822-1-cbabroski@nvidia.com \
--to=cbabroski@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=davthompson@nvidia.com \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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
all inboxes | Powered by JetHome®