netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: "linux@armlinux.org.uk" <linux@armlinux.org.uk>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Ioana Ciornei <ioana.ciornei@nxp.com>
Subject: Re: Cutting the link on ndo_stop - phy_stop or phy_disconnect?
Date: Tue, 4 Jun 2019 22:07:13 +0200	[thread overview]
Message-ID: <20190604200713.GV19627@lunn.ch> (raw)
In-Reply-To: <52888d1f-2f7d-bfa1-ca05-73887b68153d@gmail.com>

On Tue, Jun 04, 2019 at 10:58:41PM +0300, Vladimir Oltean wrote:
> Hi,
> 
> I've been wondering what is the correct approach to cut the Ethernet link
> when the user requests it to be administratively down (aka ip link set dev
> eth0 down).
> Most of the Ethernet drivers simply call phy_stop or the phylink equivalent.
> This leaves an Ethernet link between the PHY and its link partner.
> The Freescale gianfar driver (authored by Andy Fleming who also authored the
> phylib) does a phy_disconnect here. It may seem a bit overkill, but of the
> extra things it does, it calls phy_suspend where most PHY drivers set the
> BMCR_PDOWN bit. Only this achieves the intended purpose of also cutting the
> link partner's link on 'ip link set dev eth0 down'.

Hi Vladimir

Heiner knows the state machine better than i. But when we transition
to PHY_HALTED, as part of phy_stop(), it should do a phy_suspend().

   Andrew

  reply	other threads:[~2019-06-04 20:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 19:58 Cutting the link on ndo_stop - phy_stop or phy_disconnect? Vladimir Oltean
2019-06-04 20:07 ` Andrew Lunn [this message]
2019-06-04 20:42   ` Vladimir Oltean
2019-06-04 20:55     ` Heiner Kallweit
2019-06-04 21:23       ` Vladimir Oltean
2019-06-04 20:57     ` Florian Fainelli
2019-06-04 21:26       ` Vladimir Oltean
2019-06-04 21:12     ` Andrew Lunn
2019-06-04 21:29       ` Vladimir Oltean
2019-06-04 21:37         ` Florian Fainelli
2019-06-04 21:48           ` Russell King - ARM Linux admin
2019-06-04 21:56             ` Andrew Lunn
2019-06-04 22:03             ` Vladimir Oltean
2019-06-04 22:16               ` Russell King - ARM Linux admin
2019-06-04 22:44                 ` Vladimir Oltean
2019-06-04 22:59                   ` Russell King - ARM Linux admin
2019-06-04 23:03                     ` Vladimir Oltean
2019-06-04 23:24                       ` Russell King - ARM Linux admin
2019-06-04 23:46                         ` Vladimir Oltean
2019-06-05  0:04                           ` Russell King - ARM Linux admin
2019-06-05  3:06                           ` Florian Fainelli
2019-06-05  8:27                             ` Vladimir Oltean
2019-06-05  9:30                               ` Russell King - ARM Linux admin
2019-06-05 11:19                                 ` Vladimir Oltean
2019-06-05 12:16                           ` Russell King - ARM Linux admin
2019-06-05 12:35                             ` Russell King - ARM Linux admin
2019-06-04 20:25 ` Florian Fainelli
2019-06-04 21:36 ` Russell King - ARM Linux admin
2019-06-05  2:25   ` Florian Fainelli
2019-06-05  8:45     ` Russell King - ARM Linux admin
2019-06-05 18:01       ` 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=20190604200713.GV19627@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@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).