From: Paul Davey <Paul.Davey@alliedtelesis.co.nz>
To: "andrew@lunn.ch" <andrew@lunn.ch>
Cc: "daniel@makrotopia.org" <daniel@makrotopia.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: phy: aquantia: Add mdix config and reporting
Date: Fri, 18 Oct 2024 02:49:52 +0000 [thread overview]
Message-ID: <858331af57bd1d9ab478c3ec6f5ecd19dcd205ef.camel@alliedtelesis.co.nz> (raw)
In-Reply-To: <ec453754-3474-4824-b4e3-e26603e2e1d8@lunn.ch>
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
next prev parent reply other threads:[~2024-10-18 2:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 1:54 Paul Davey
2024-10-17 11:54 ` Daniel Golle
2024-10-17 23:52 ` Paul Davey
2024-10-18 0:19 ` Andrew Lunn
2024-10-18 2:49 ` Paul Davey [this message]
2024-10-18 17:20 ` Andrew Lunn
2024-11-06 0:01 ` Paul Davey
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=858331af57bd1d9ab478c3ec6f5ecd19dcd205ef.camel@alliedtelesis.co.nz \
--to=paul.davey@alliedtelesis.co.nz \
--cc=andrew@lunn.ch \
--cc=daniel@makrotopia.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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®