netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Cutting the link on ndo_stop - phy_stop or phy_disconnect?
@ 2019-06-04 19:58 Vladimir Oltean
  2019-06-04 20:07 ` Andrew Lunn
                   ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Vladimir Oltean @ 2019-06-04 19:58 UTC (permalink / raw)
  To: linux@armlinux.org.uk, Heiner Kallweit, andrew@lunn.ch,
	Florian Fainelli, netdev@vger.kernel.org
  Cc: Ioana Ciornei

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'.
What is the general consensus here?
I see the ability to be able to put the PHY link administratively down a 
desirable feat. If it's left to negotiate/receive traffic etc while the 
MAC driver isn't completely set up and ready, in theory a lot of 
processing can happen outside of the operating system's control.

Regards,
-Vladimir

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2019-06-05 18:01 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).