netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Ioana Ciornei <ioana.ciornei@nxp.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net] net: dsa: fix phylink_start()/phylink_stop() calls
Date: Sat, 29 Feb 2020 18:06:41 +0100	[thread overview]
Message-ID: <20200229170641.GE6305@lunn.ch> (raw)
In-Reply-To: <20200229164538.GB25745@shell.armlinux.org.uk>

Hi Russell

> > The current code in dsa_slave_open() first enables the port, then
> > calls phylink_start(). So maybe we should keep the ordering the same?
> 
> However, dsa_port_setup() does it in the reverse order, so it was a
> bit of guess work which is right.  So, if the port needs to be enabled
> first, then the dsa_port_setup() path for DSA and CPU ports is wrong.
> 
> It's not clear what dsa_port_enable() actually does, and should a port
> be enabled before its interface mode and link parameters have been
> set?

Agreed, it is not clearly defined. port_enable()/port_disable() are
mostly used for power saving. If a port is not used, it can be turned
off.

Having phylink for DSA and CPU ports is a new thing. Slaves have
always had phylib/phylink. So i think it would be safest to follow the
order used for slave interfaces, enable the port first, then start
phylink.

We should probably also change the order for DSA and CPU ports so it
is consistent.

   Andrew

      reply	other threads:[~2020-02-29 17:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 19:39 [PATCH net] net: dsa: fix phylink_start()/phylink_stop() calls Russell King
2020-02-29  0:46 ` Vladimir Oltean
2020-02-29 15:42 ` Andrew Lunn
2020-02-29 16:45   ` Russell King - ARM Linux admin
2020-02-29 17:06     ` Andrew Lunn [this message]

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=20200229170641.GE6305@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.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).