lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aEgpE7dZNT_GqhSV@pengutronix.de>
Date: Tue, 10 Jun 2025 14:46:11 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Andrew Lunn <andrew@...n.ch>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	kernel@...gutronix.de, linux-kernel@...r.kernel.org,
	Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v1 1/3] net: phy: micrel: add MDI/MDI-X control
 support for KSZ9477 switch-integrated PHYs

On Tue, Jun 10, 2025 at 02:31:45PM +0200, Andrew Lunn wrote:
> On Tue, Jun 10, 2025 at 11:13:52AM +0200, Oleksij Rempel wrote:
> > Add MDI/MDI-X configuration support for PHYs integrated in the KSZ9477
> > family of Ethernet switches.
> > 
> > All MDI/MDI-X configuration modes are supported:
> >   - Automatic MDI/MDI-X (ETH_TP_MDI_AUTO)
> >   - Forced MDI (ETH_TP_MDI)
> >   - Forced MDI-X (ETH_TP_MDI_X)
> > 
> > However, when operating in automatic mode, the PHY does not expose the
> > resolved crossover status (i.e., whether MDI or MDI-X is active).
> > Therefore, in auto mode, the driver reports ETH_TP_MDI_INVALID as
> > the current status.
> 
> I assume you also considered returning ETH_TP_MDI_AUTO? What makes
> INVALID better than AUTO?

The phydev->mdix_ctrl returns configuration state, which cant be set to
ETH_TP_MDI_AUTO.
The phydev->mdix should return actual crossover state, which is
ETH_TP_MDI or ETH_TP_MDI_X. Setting it to ETH_TP_MDI_AUTO, would not
provide any usable information.

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ