All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: shemminger@vyatta.com
Cc: pgynther@google.com, benh@kernel.crashing.org, netdev@vger.kernel.org
Subject: Re: [PATCH] ibm_newemac: emac_close() needs to call netif_carrier_off()
Date: Wed, 19 Aug 2009 14:34:03 -0700 (PDT)	[thread overview]
Message-ID: <20090819.143403.27319428.davem@davemloft.net> (raw)
In-Reply-To: <20090819141136.74f5c266@s6510>

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 19 Aug 2009 14:11:36 -0700

> On Wed, 19 Aug 2009 14:00:00 -0700 (PDT)
> Petri Gynther <pgynther@google.com> wrote:
> 
>> When ibm_newemac netdev instance is shutdown with "ifconfig down",
>> the netdev interface does not go properly down. netif_carrier_ok()
>> keeps returning TRUE even after "ifconfig down".
>> 
>> The problem can be seen when ibm_newemac instances are slaves of
>> a bonding interface. The bonding interface code uses netif_carrier_ok()
>> to determine the link status of its slaves. When ibm_newemac slave is
>> shutdown with "ifconfig down", the bonding interface won't detect any
>> link status change because netif_carrier_ok() keeps returning TRUE.
> 
> Bonding should be testing for netif_running() && netif_carrier_ok().
> 
> In many devices state of carrier is undefined when device is down.

But if you check all of the drivers, ethernet in particular, the
convention is to call netif_carrier_off() in foo_close().

  reply	other threads:[~2009-08-19 21:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19 21:00 [PATCH] ibm_newemac: emac_close() needs to call netif_carrier_off() Petri Gynther
2009-08-19 21:11 ` Stephen Hemminger
2009-08-19 21:34   ` David Miller [this message]
2009-08-19 21:40     ` Petri Gynther
2009-08-19 22:32       ` Petri Gynther
2009-08-19 23:48         ` Stephen Hemminger
2009-08-20  6:02         ` Benjamin Herrenschmidt
2009-08-20  9:20           ` David Miller
2009-08-20  9:21 ` David Miller

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=20090819.143403.27319428.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=benh@kernel.crashing.org \
    --cc=netdev@vger.kernel.org \
    --cc=pgynther@google.com \
    --cc=shemminger@vyatta.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.