netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ibm_newemac: emac_close() needs to call netif_carrier_off()
@ 2009-08-19 21:00 Petri Gynther
  2009-08-19 21:11 ` Stephen Hemminger
  2009-08-20  9:21 ` David Miller
  0 siblings, 2 replies; 9+ messages in thread
From: Petri Gynther @ 2009-08-19 21:00 UTC (permalink / raw)
  To: benh, davem; +Cc: netdev

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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-08-20  9:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).