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: <858331af57bd1d9ab478c3ec6f5ecd19dcd205ef.camel@alliedtelesis.co.nz>
Date: Fri, 18 Oct 2024 02:49:52 +0000
From: Paul Davey <Paul.Davey@...iedtelesis.co.nz>
To: "andrew@...n.ch" <andrew@...n.ch>
CC: "daniel@...rotopia.org" <daniel@...rotopia.org>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: phy: aquantia: Add mdix config and
 reporting

On Fri, 2024-10-18 at 02:19 +0200, Andrew Lunn wrote:
> > Due to this I wonder whether the mdix configuration should reject
> > ETH_TP_MDI_AUTO if auto-negotiation is disabled?
> 
> How does MDIX actually work? Is there anything in 802.3?
> 
> For 10BaseT, one pair Rx, one pair Tx, i guess you can find out by
> just looking at the signal. But for 4 pairs?
> 
802.3 Clause 40.4.4 Automatic MDI/MDI-X Configuration specifies some
aspects of how Auto MDI/MDI-X crossover detection works for 1000BASE-T

For 1000BASE-T (and above) with 4 pairs the MDI-X state crosses over
both pairs A/B and pairs C/D.  Though some PHYs have support for
detecting partial crossover.

The crossover is required for auto-negotiation to complete so the
Automatic MDI/MDI-X resolution has to occur prior to auto-negotiation.

I believe the detection works by selecting a proposed crossover config,
then waiting a period to detect either auto-negotiation fast link
pulses or an RX link detection. If it doesn't find one it uses a
pseudorandom process (an LFSR I believe) to decide whether it should
swap to the other crossover state or remain in the current one.  This
is to ensure two link partners performing this process do not get stuck
both trying the wrong crossover and then swapping at the same time to
the other crossover.  From the state machine diagrams it appears the
initial crossover config is MDI.

As auto-negotiation is required for 1000BASE-T (and higher speed
twisted pair modes) the question of whether Auto MDI/MDI-X detection
occurs when auto-negotiation is turned off is only really relevant for
10BASE-T and 100BASE-T being forced.

When I was wondering if mdix_ctrl being set to ETH_TP_MDI_AUTO should
be rejected if auto-negotiation is disabled I meant for this specific
PHY driver as it definitely does not appear to perform the Auto
MDI/MDI-X resolution so if the wiring/cabling between and/or config on
the link partner does not match the default (MDI I think for the AQR)
then the link will not establish.

Thanks,
Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ