netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Daniel Golle <daniel@makrotopia.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
	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>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: phy: populate host_interfaces when attaching PHY
Date: Wed, 9 Oct 2024 10:01:09 +0100	[thread overview]
Message-ID: <ZwZGVRL_j62tH9Mp@shell.armlinux.org.uk> (raw)
In-Reply-To: <ae53177a7b68964b2a988934a09f74a4931b862d.1728438951.git.daniel@makrotopia.org>

On Wed, Oct 09, 2024 at 02:57:03AM +0100, Daniel Golle wrote:
> Use bitmask of interfaces supported by the MAC for the PHY to choose
> from if the declared interface mode is among those using a single pair
> of SerDes lanes.
> This will allow 2500Base-T PHYs to switch to SGMII on most hosts, which
> results in half-duplex being supported in case the MAC supports that.
> Without this change, 2500Base-T PHYs will always operate in 2500Base-X
> mode with rate-matching, which is not only wasteful in terms of energy
> consumption, but also limits the supported interface modes to
> full-duplex only.

We've had a similar patch before, and it's been NAK'd. The problem is
that supplying the host_interfaces for built-in PHYs means that the
hardware strapping for the PHY interface mode becomes useless, as does
the DT property specifying it - and thus we may end up selecting a
mode that both the MAC and PHY support, but the hardware design
doesn't (e.g. signals aren't connected, signal speed to fast.)

For example, take a board designed to use RXAUI and the host supports
10GBASE-R. The first problem is, RXAUI is not listed in the SFP
interface list because it's not usable over a SFP cage. So, the
host_interfaces excludes that, and thus the PHY thinks that's not
supported. It looks at the mask and sees only 10GBASE-R, and
decides to use that instead with rate matching. The MAC doesn't have
support for flow control, and thus can't use rate matching.

Not only have the electrical charateristics been violated by selecting
a faster interface than the hardware was designed for, but we now have
rate matching being used when it shouldn't be.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

  reply	other threads:[~2024-10-09  9:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09  1:57 [PATCH net-next] net: phy: populate host_interfaces when attaching PHY Daniel Golle
2024-10-09  9:01 ` Russell King (Oracle) [this message]
2024-10-09 11:52   ` Daniel Golle
2024-10-09 17:34     ` Russell King (Oracle)
2024-10-09 18:52       ` Daniel Golle
2024-10-09 20:12         ` Russell King (Oracle)
2024-10-09 21:31           ` Daniel Golle
2024-10-09 23:23             ` Russell King (Oracle)
2024-10-10 14:07               ` Daniel Golle
2024-10-10 14:58                 ` Russell King (Oracle)
2024-10-10 16:28                   ` Daniel Golle
2024-10-10 16:58                     ` Andrew Lunn

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=ZwZGVRL_j62tH9Mp@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).