netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Vosburgh <fubar@us.ibm.com>
To: netdev@vger.kernel.org
Cc: David Miller <davem@davemloft.net>, Petri Gynther <pgynther@google.com>
Subject: [PATCH REPOST net-next-2.6 4/4] bonding: Have bond_check_dev_link examine netif_running
Date: Fri, 28 Aug 2009 15:05:15 -0700	[thread overview]
Message-ID: <1251497115-16234-5-git-send-email-fubar@us.ibm.com> (raw)
In-Reply-To: <1251497115-16234-4-git-send-email-fubar@us.ibm.com>

From: Petri Gynther <pgynther@google.com>

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>
---
 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 6b9f15b..7c0e0bd 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 (!reporting && !netif_running(slave_dev))
+		return 0;
+
 	if (bond->params.use_carrier)
 		return netif_carrier_ok(slave_dev) ? BMSR_LSTATUS : 0;
 
-- 
1.6.0.2


  reply	other threads:[~2009-08-28 22:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-28 22:05 [PATCH REPOST net-next-2.6 0/4] bonding: Four patches Jay Vosburgh
2009-08-28 22:05 ` [PATCH REPOST net-next 1/4] bonding: propogate vlan_features to bonding master Jay Vosburgh
2009-08-28 22:05   ` [PATCH REPOST net-next-2.6 2/4] bonding: use compare_ether_addr Jay Vosburgh
2009-08-28 22:05     ` [PATCH REPOST net-next-2.6 3/4] bonding: Fix useless test: int > INT_MAX Jay Vosburgh
2009-08-28 22:05       ` Jay Vosburgh [this message]
2009-08-28 22:49       ` David Miller
2009-08-28 23:18         ` Jay Vosburgh
2009-08-28 23:22           ` David Miller
2009-08-29  6:02 ` [PATCH REPOST net-next-2.6 0/4] bonding: Four patches 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=1251497115-16234-5-git-send-email-fubar@us.ibm.com \
    --to=fubar@us.ibm.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=pgynther@google.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 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).