All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Andrew Lunn <andrew@lunn.ch>, Mason <slash.tmp@free.fr>
Cc: netdev <netdev@vger.kernel.org>, Mans Rullgard <mans@mansr.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Thibaud Cornic <thibaud_cornic@sigmadesigns.com>
Subject: Re: Setting link down or up in software
Date: Thu, 12 Jan 2017 12:45:16 -0600	[thread overview]
Message-ID: <1484246716.4651.5.camel@redhat.com> (raw)
In-Reply-To: <20170112152856.GL13033@lunn.ch>

On Thu, 2017-01-12 at 16:28 +0100, Andrew Lunn wrote:
> > Here's an example of "Link is Down" printed when I set link up:
> > 
> > At [   62.750220] I run ip link set dev eth0 down
> > Then leave the system idle for 10 minutes.
> > At [  646.263041] I run ip link set dev eth0 up
> > At [  647.364079] it prints "Link is Down"
> > At [  649.417434] it prints "Link is Up - 1Gbps/Full - flow control
> > rx/tx"
> 
> Purely a guess, but when you up the interface, it starts auto
> negotiation. That often involves resetting the PHY. If the PHY has
> already once completed autoneg, e.g. because of the boot loader, it
> will be initially UP. The reset will put it DOWN, and then once
> autoneg is complete, it will be Up again.
> 
> Pure guess. Go read the code and see if i'm write.

Historically, !IFF_UP meant the phy could be powered down or go into
some kind of low-power mode where link negotiation and communication
was unavailable.  Some drivers implemented that, some keep the PHY up
because who knows why, or because they just never got around to real
power management.

Dan

  parent reply	other threads:[~2017-01-12 18:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 13:05 Setting link down or up in software Mason
2017-01-12 15:16 ` Mason
2017-01-12 15:28   ` Andrew Lunn
2017-01-12 16:22     ` Mason
2017-01-12 16:27       ` Andrew Lunn
2017-01-12 18:45     ` Dan Williams [this message]
2017-01-13  9:20   ` Zefir Kurtisi
2017-01-13 15:17     ` Mason
2017-01-13 16:28       ` Zefir Kurtisi
2017-01-13 17:35         ` Mason
2017-01-18 10:29           ` Zefir Kurtisi
2017-01-19 15:40             ` Mason
2017-01-19 17:56               ` Måns Rullgård
2017-01-19 17:59                 ` Florian Fainelli

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=1484246716.4651.5.camel@redhat.com \
    --to=dcbw@redhat.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=mans@mansr.com \
    --cc=netdev@vger.kernel.org \
    --cc=slash.tmp@free.fr \
    --cc=thibaud_cornic@sigmadesigns.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.