diff options
author | Petri Gynther <pgynther@google.com> | 2009-08-28 08:05:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-29 02:01:20 -0400 |
commit | 6c9888532bb540cb692f51f1d34fe9344eed5a0d (patch) | |
tree | 0db75832b80b10c1aca6f668dd20247b973eb786 /drivers/net/bonding | |
parent | f584130616dfae757b888b7ee472e7c824f59e6a (diff) |
bonding: Have bond_check_dev_link examine netif_running
bonding: Have bond_check_dev_link examine netif_running
Some network devices do not call netif_carrier_off when they
are set administratively down. Have the bonding link check function
also inspect the netif_running state. Ignore netif_running if the
bond_check_dev_link function is called with "reporting" set, as in that
case it's inspecting the capabilities of the non-netif_carrier device
driver.
Signed-off-by: Petri Gynther <pgynther@google.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | 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 6b9f15b32a38..7c0e0bded15e 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, | |||
695 | struct ifreq ifr; | 695 | struct ifreq ifr; |
696 | struct mii_ioctl_data *mii; | 696 | struct mii_ioctl_data *mii; |
697 | 697 | ||
698 | if (!reporting && !netif_running(slave_dev)) | ||
699 | return 0; | ||
700 | |||
698 | if (bond->params.use_carrier) | 701 | if (bond->params.use_carrier) |
699 | return netif_carrier_ok(slave_dev) ? BMSR_LSTATUS : 0; | 702 | return netif_carrier_ok(slave_dev) ? BMSR_LSTATUS : 0; |
700 | 703 | ||