The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Andre Edich <andre.edich@microchip.com>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	Russell King <linux@armlinux.org.uk>,
	netdev@vger.kernel.org, Lukas Wunner <lukas@wunner.de>
Subject: Re: [PATCH net v2 3/3] net: phy: smsc: Fix link failure in forced mode with Auto-MDIX
Date: Fri, 4 Jul 2025 10:23:45 +0200	[thread overview]
Message-ID: <4012e00f-2192-4cfb-9e29-a8d1855c9ff6@lunn.ch> (raw)
In-Reply-To: <20250703114941.3243890-4-o.rempel@pengutronix.de>

On Thu, Jul 03, 2025 at 01:49:41PM +0200, Oleksij Rempel wrote:
> Force a fixed MDI-X mode when auto-negotiation is disabled to prevent
> link instability.
> 
> When forcing the link speed and duplex on a LAN9500 PHY (e.g., with
> `ethtool -s eth0 autoneg off ...`) while leaving MDI-X control in auto
> mode, the PHY fails to establish a stable link. This occurs because the
> PHY's Auto-MDIX algorithm is not designed to operate when
> auto-negotiation is disabled. In this state, the PHY continuously
> toggles the TX/RX signal pairs, which prevents the link partner from
> synchronizing.

That is not good. Somebody got that badly wrong. They should operate
independently.

> This patch resolves the issue by detecting when auto-negotiation is
> disabled. If the MDI-X control mode is set to 'auto', the driver now
> forces a specific, stable mode (ETH_TP_MDI) to prevent the pair
> toggling. This choice of a fixed MDI mode mirrors the behavior the
> hardware would exhibit if the AUTOMDIX_EN strap were configured for a
> fixed MDI connection.

The text implies it, rather than states it, but the code supports
setting a fixed mode before turning autoneg off. So user space does
have full control if needed.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2025-07-04  8:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-03 11:49 [PATCH net v2 0/4] net: phy: smsc: robustness fixes for LAN87xx/LAN9500 Oleksij Rempel
2025-07-03 11:49 ` [PATCH net v2 1/3] net: phy: smsc: Fix Auto-MDIX configuration when disabled by strap Oleksij Rempel
2025-07-04  7:53   ` Maxime Chevallier
2025-07-03 11:49 ` [PATCH net v2 2/3] net: phy: smsc: Force predictable MDI-X state on LAN87xx Oleksij Rempel
2025-07-04  8:00   ` Maxime Chevallier
2025-07-04  8:16     ` Andrew Lunn
2025-07-03 11:49 ` [PATCH net v2 3/3] net: phy: smsc: Fix link failure in forced mode with Auto-MDIX Oleksij Rempel
2025-07-04  8:23   ` Andrew Lunn [this message]
2025-07-09  1:30 ` [PATCH net v2 0/4] net: phy: smsc: robustness fixes for LAN87xx/LAN9500 patchwork-bot+netdevbpf

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=4012e00f-2192-4cfb-9e29-a8d1855c9ff6@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=andre.edich@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lukas@wunner.de \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --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