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

Reply via email to