netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Bastian Germann <bage@linutronix.de>,
	Benedikt Spranger <b.spranger@linutronix.de>,
	davem@davemloft.net, netdev@vger.kernel.org,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH net v2] net: phy: phy_ethtool_ksettings_set: Don't discard phy_start_aneg's return
Date: Mon, 8 Nov 2021 18:06:03 +0000	[thread overview]
Message-ID: <YYlnCx+S34B1b5Xy@shell.armlinux.org.uk> (raw)
In-Reply-To: <e07b6b7c-3353-461e-887d-96be9a9f6f36@gmail.com>

On Mon, Nov 08, 2021 at 07:01:23PM +0100, Heiner Kallweit wrote:
> On 08.11.2021 18:57, Andrew Lunn wrote:
> >> It is BCM53125. Currently, you can set "mdix auto|off|on" which does
> >> not take any effect.  The chip will do what is its default depending
> >> on copper autonegotiation.
> >>
> >> I am adding support for setting "mdix auto|off". I want the thing to error on "mdix on".
> >> Where would I add that check?
> > 
> > /* MDI or MDI-X status/control - if MDI/MDI_X/AUTO is set then
> >  * the driver is required to renegotiate link
> >  */
> > #define ETH_TP_MDI_INVALID	0x00 /* status: unknown; control: unsupported */
> > #define ETH_TP_MDI		0x01 /* status: MDI;     control: force MDI */
> > #define ETH_TP_MDI_X		0x02 /* status: MDI-X;   control: force MDI-X */
> > #define ETH_TP_MDI_AUTO		0x03 /*                  control: auto-select */
> > 
> > So there are three valid settings. And you are saying you only want to
> > implement two of them? If the hardware can do all three, you should
> > implement all three.
> > 
> 
> If we would like to support PHY's that don't support all MDI modes then
> supposedly this would require to add ETHTOOL_LINK_MODE bits for the
> MDI modes. Then we could use the generic mechanism to check the bits in
> the "supported" bitmap.

We'll have to add more stuff to phylink to avoid MACs masking these
bits... ETHTOOL_LINK_MODE seems to be becoming a disorganised dumping
ground for random stuff. :(

Also, what would these bits in the advertising bitmap mean?

Finally, how do we handle the lack of these bits for existing PHYs
that already implement MDI modes?

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

  reply	other threads:[~2021-11-08 18:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-05 15:36 [PATCH] phy: phy_ethtool_ksettings_set: Don't discard phy_start_aneg's return bage
2021-11-05 18:32 ` Andrew Lunn
2021-11-08 14:21   ` Bastian Germann
2021-11-06 21:52 ` Heiner Kallweit
2021-11-08 14:25   ` Bastian Germann
2021-11-10  8:14     ` Heiner Kallweit
2021-11-08 14:18 ` [PATCH net v2] net: " bage
2021-11-08 14:25   ` Russell King (Oracle)
2021-11-08 15:06     ` Benedikt Spranger
2021-11-08 15:40       ` Russell King (Oracle)
2021-11-08 16:09       ` Andrew Lunn
2021-11-08 16:32         ` Bastian Germann
2021-11-08 17:57           ` Andrew Lunn
2021-11-08 18:01             ` Heiner Kallweit
2021-11-08 18:06               ` Russell King (Oracle) [this message]
2021-11-08 19:02               ` Benedikt Spranger
2021-11-08 19:35                 ` Heiner Kallweit
2021-11-09 18:29                 ` Florian Fainelli

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=YYlnCx+S34B1b5Xy@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=b.spranger@linutronix.de \
    --cc=bage@linutronix.de \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).