[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <63352ee3-f056-4e28-bc10-b6e971e2c775@lunn.ch>
Date: Mon, 14 Oct 2024 15:18:29 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Gerhard Engleder <gerhard@...leder-embedded.com>
Cc: hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org
Subject: Re: [PATCH RFC net-next] net: phy: micrel: Improve loopback support
if autoneg is enabled
On Sun, Oct 13, 2024 at 10:24:30PM +0200, Gerhard Engleder wrote:
> Prior to commit 6ff3cddc365b it was possible to enable loopback with
> a defined speed. First a fixed speed was set with ETHTOOL_SLINKSETTINGS
> and afterwards the loopback was enabled. This worked, because
> genphy_loopback() uses the current speed and duplex. I used this
> mechanism to test tsnep in loopback with different speeds. A KSZ9031 PHY
> is used.
>
> With commit 6ff3cddc365b for 1000 Mbit/s auto negotiation was enabled.
> Setting a fixed speed with ETHTOOL_SLINKSETTINGS does not work anymore
> for 1000 Mbit/s as speed and duplex of the PHY now depend on the result
> of the auto negotiation. As a result, genphy_loopback() also depends on
> the result of the auto negotiation. But enabling loopback shall be
> independent of any auto negotiation process.
>
> Make loopback of KSZ9031 PHY work even if current speed and/or duplex of
> PHY are unkown because of autoneg.
We probably should think about the big picture, not one particular
PHY.
Russell's reading of 802.3 is that 1G requires autoneg. Hence the
change. Loopback is however special. Either the PHY needs to do
autoneg with itself, which is pretty unlikely, or it needs to ignore
autoneg and loopback packets independent of the autoneg status.
What does 802.3 say about loopback? At least the bit in BMCR must be
defined. Is there more? Any mention of how it should work in
combination with autoneg?
Andrew
Powered by blists - more mailing lists