From: Jakub Kicinski <kuba@kernel.org>
To: Chris Babroski <cbabroski@nvidia.com>
Cc: <andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<davthompson@nvidia.com>, <hkallweit1@gmail.com>,
<linux@armlinux.org.uk>
Subject: Re: [PATCH net-next v2] mlxbf_gige: report unknown speed and duplex when link is down
Date: Fri, 17 Oct 2025 15:54:02 -0700 [thread overview]
Message-ID: <20251017155402.35750413@kernel.org> (raw)
In-Reply-To: <20251014161631.769596-1-cbabroski@nvidia.com>
On Tue, 14 Oct 2025 12:16:31 -0400 Chris Babroski wrote:
> The "Speed" and "Duplex" fields displayed by ethtool for the OOB
> interface should report "Unknown" when the link is down to match the
> behavior of other network interfaces on BlueField (implemented by the
> mlx5 driver). Currently, the mlxbf_gige driver always reports the
> initially configured link speed and duplex, regardless of the actual
> link state.
>
> The link speed and duplex are not updated for two reasons:
> 1. On BlueField the OOB phy is internally hardwired to a three port
> switch. This means the physical link between the phy and link
> partner is always up, regardless of the administrative link state
> configured with ifconfig.
> 2. phy_ethtool_get_link_ksettings() reads cached values that are only
> updated when phy_read_status() is called by the phy state machine.
> Doing "ifconfig down" will 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
> updating other values, so the speed and duplex returned by
> future phy_ethtool_get_link_ksettings() calls will be stale.
>
> While #2 could potentially be fixed (assuming this is even an issue for
> other devices), #1 is unique to BlueField.
>
> Implement a custom get_link_ksettings() handler in mlxbf_gige that calls
> phy_ethtool_get_link_ksettings() and updates the speed and duplex based
> on the link state. When the link is brought down with ifconfig, the
> driver now reports unknown speed and duplex to ethtool as expected.
Are you sure you still need this now that 60f887b1290b has been applied?
next prev parent reply other threads:[~2025-10-17 22:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 16:16 [PATCH net-next v2] mlxbf_gige: report unknown speed and duplex when link is down Chris Babroski
2025-10-17 22:54 ` Jakub Kicinski [this message]
2025-10-22 17:08 ` Chris Babroski
2025-10-23 0:09 ` 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=20251017155402.35750413@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=cbabroski@nvidia.com \
--cc=davem@davemloft.net \
--cc=davthompson@nvidia.com \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).