linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Thomas Bogendoerfer <tbogendoerfer@suse.de>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: mvpp2: Enable autoneg bypass for 1000BaseX/2500BaseX ports
Date: Fri, 29 May 2020 16:51:22 +0100	[thread overview]
Message-ID: <20200529155121.GA1551@shell.armlinux.org.uk> (raw)
In-Reply-To: <20200529145928.GF869823@lunn.ch>

On Fri, May 29, 2020 at 04:59:28PM +0200, Andrew Lunn wrote:
> On Fri, May 29, 2020 at 01:05:39PM +0200, Thomas Bogendoerfer wrote:
> > On Thu, 28 May 2020 23:04:20 +0100
> > Russell King - ARM Linux admin <linux@armlinux.org.uk> wrote:
> > 
> > > Can you explain this please?  Just as we think we understand what's
> > > going on here, you throw in a new comment that makes us confused.
> > 
> > sorry about that.
> > 
> > > You said previously that the mvpp2 was connected to a switch, which
> > > makes us think that you've got some DSA-like setup going on here.
> > > Does your switch drop its serdes link when all the external links
> > > (presumably the 10G SFP+ cages) fail?
> > > 
> > > Both Andrew and myself wish to have a complete picture before we
> > > move forward with this.
> > 
> > full understandable, I'll try by a small picture, which just
> > covers one switch:
> > 
> >         external ports
> >       |  |          |  |
> > *-----------------------------*
> > |     1  1          2  2      |
> > |                             |
> > |           switch            |
> > |                             |
> > |   1   2            1   2    |
> > *-----------------------------*
> >     |   |            |   |
> >     |   |            |   |
> > *----------*     *----------*
> > |   1   2  |     |   1   2  |
> > |          |     |          |
> > |  node 1  | ... |  node 8  |
> > |          |     |          |
> > *----------*     *----------*
> > 
> > External ports a grouped in ports to network 1 and network 2. If one of the
> > external ports has an established link, this link state will be propagated
> > to the internal ports. Same when both external ports of a network are down.
> 
> By propagated, you mean if the external link is down, the link between
> the switch and node 1 will also be forced down, at the SERDES level?
> And if external ports are down, the nodes cannot talk to each other?
> External link down causes the whole in box network to fall apart? That
> seems a rather odd design.
> 
> > I have no control over the software running on the switch, therefore I can't
> > enable autoneg on the internal links.
> 
> O.K. So that means using in-band signalling in DT is clearly
> wrong. There is no signalling....
> 
> What you are actually interested in is the sync state of the SERDES?
> The link is up if the SERDES has sync.

Right now we force the link up/down for fixed-link mode, depending on
the state that phylink is given (either via the callback, or the gpio,
or in the absence of either of those, we assume link up.)

In the case of a serdes link, where we also have the sync state to
consider, that doesn't sound sane - if in fixed link mode, phylink is
told that the link is up, yet we can clearly see that the serdes we
are attached to is not, we aren't going to receive anything and
anything we try to transmit isn't going to go anywhere.

I wonder how much risk there is to changing that, so we force the link
down if phylink says the link should be down, otherwise we force the
speed/duplex, disable AN, and allow the link to come up depending on
the serdes status.  It /sounds/ like something sane to do.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC for 0.8m (est. 1762m) line in suburbia: sync at 13.1Mbps down 424kbps up

  reply	other threads:[~2020-05-29 15:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28 12:11 [PATCH net] net: mvpp2: Enable autoneg bypass for 1000BaseX/2500BaseX ports Thomas Bogendoerfer
2020-05-28 13:07 ` Russell King - ARM Linux admin
2020-05-28 13:17   ` Thomas Bogendoerfer
2020-05-28 13:56     ` Russell King - ARM Linux admin
2020-05-28 14:33       ` Thomas Bogendoerfer
2020-05-28 14:48         ` Russell King - ARM Linux admin
2020-05-28 18:43           ` Thomas Bogendoerfer
2020-05-28 20:15             ` Andrew Lunn
2020-05-28 22:04             ` Russell King - ARM Linux admin
2020-05-29 11:05               ` Thomas Bogendoerfer
2020-05-29 14:59                 ` Andrew Lunn
2020-05-29 15:51                   ` Russell King - ARM Linux admin [this message]
2020-05-29 16:25                     ` Andrew Lunn
2020-05-29 17:02                       ` Russell King - ARM Linux admin
2020-05-29 15:52                   ` Thomas Bogendoerfer
2020-05-29 16:33                     ` Andrew Lunn
2020-06-02  8:08                       ` Thomas Bogendoerfer
2020-06-02 22:50                       ` Russell King - ARM Linux admin
2020-06-03 12:31                         ` Russell King - ARM Linux admin
2020-06-03 13:21                         ` Andrew Lunn
2020-06-03 14:58                           ` Russell King - ARM Linux admin
2020-05-28 16:33         ` Andrew Lunn
2020-05-28 18:43           ` Thomas Bogendoerfer

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=20200529155121.GA1551@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tbogendoerfer@suse.de \
    /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).