[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53c990a5-9b27-df58-43c3-517708e97511@gmail.com>
Date: Thu, 16 Aug 2018 11:59:19 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: rpjday@...shcourse.ca, netdev@...r.kernel.org
Subject: Re: Under what conditions is phy_device "adjust_link()" called?
On 08/16/2018 10:26 AM, rpjday@...shcourse.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
Powered by blists - more mailing lists