From: Andrew Lunn <andrew@lunn.ch>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: rpjday@crashcourse.ca, netdev@vger.kernel.org
Subject: Re: Under what conditions is phy_device "adjust_link()" called?
Date: Fri, 17 Aug 2018 01:33:45 +0200 [thread overview]
Message-ID: <20180816233345.GA12941@lunn.ch> (raw)
In-Reply-To: <53c990a5-9b27-df58-43c3-517708e97511@gmail.com>
On Thu, Aug 16, 2018 at 11:59:19AM -0700, Florian Fainelli wrote:
> On 08/16/2018 10:26 AM, rpjday@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.
Just adding to that, if you have a 10G PHY, the MAC-PHY interface mode
can also change, e.g. SGMII for 10/100/1000, and 10GBase-T for 10G,
etc.
Andrew
prev parent reply other threads:[~2018-08-17 2:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-16 17:26 Under what conditions is phy_device "adjust_link()" called? rpjday
2018-08-16 18:59 ` Florian Fainelli
2018-08-16 23:33 ` Andrew Lunn [this message]
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=20180816233345.GA12941@lunn.ch \
--to=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rpjday@crashcourse.ca \
/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).