On 08/16/2018 10:26 AM, rpj...@crashcourse.ca wrote:
> 
> I can see from the documentation that the callback adjust_link() is invoked
> "for the enet controller to respond to changes in the link state." Is there
> a specific list of the events that would generate such a change? Are we
> talking initially opening the device, ifup/ifdown, physically unplugging
> from the port, some or all of the above?

adjust_link() is typically called on transitions from link UP to DOWN
and DOWN to UP. This may include the initial configuration of the PHY
during e.g: phy_connect() and then typically when an event occurs than
requires a re-configuration of the MAC: link parameters (speed, status,
duplex, pause) changed.

> 
> Not a network expert (yet), so I'm still digging through the code. Thanks.

Reading the PHY state machine under drivers/net/phy/phy.c will make this
more clear IMHO.
-- 
Florian

Reply via email to