From: Petri Gynther <pgynther@google.com>
To: benh@kernel.crashing.org, davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH] ibm_newemac: emac_close() needs to call netif_carrier_off()
Date: Wed, 19 Aug 2009 14:00:00 -0700 (PDT) [thread overview]
Message-ID: <20090819210000.D56AB254211@localhost> (raw)
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.
Signed-off-by: Petri Gynther <pgynther@google.com>
---
drivers/net/ibm_newemac/core.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index beb8421..f0f8908 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -1305,6 +1305,8 @@ static int emac_close(struct net_device *ndev)
free_irq(dev->emac_irq, dev);
+ netif_carrier_off(ndev);
+
return 0;
}
--
1.5.4.3
next reply other threads:[~2009-08-19 21:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-19 21:00 Petri Gynther [this message]
2009-08-19 21:11 ` [PATCH] ibm_newemac: emac_close() needs to call netif_carrier_off() Stephen Hemminger
2009-08-19 21:34 ` David Miller
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=20090819210000.D56AB254211@localhost \
--to=pgynther@google.com \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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).