* [PATCH] bonding: bond_check_dev_link() needs to check for netif_running()
@ 2009-08-26 20:35 Petri Gynther
0 siblings, 0 replies; only message in thread
From: Petri Gynther @ 2009-08-26 20:35 UTC (permalink / raw)
To: Stephen Hemminger, David S. Miller; +Cc: netdev
bond_check_dev_link() needs to check for netif_running() before checking
the link status of a slave. This needs to be done because some interfaces
keep reporting netif_carrier_ok() == TRUE even after "ifconfig down".
Signed-off-by: Petri Gynther <pgynther@google.com>
---
drivers/net/bonding/bond_main.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index aa1be1f..0835cbe 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -695,6 +695,9 @@ static int bond_check_dev_link(struct bonding *bond,
struct ifreq ifr;
struct mii_ioctl_data *mii;
+ if (!netif_running(slave_dev))
+ return 0;
+
if (bond->params.use_carrier)
return netif_carrier_ok(slave_dev) ? BMSR_LSTATUS : 0;
--
1.5.4.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-26 20:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-26 20:35 [PATCH] bonding: bond_check_dev_link() needs to check for netif_running() Petri Gynther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox