]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
bonding driver fix from Andy Gospodarek
authorChris Wright <chrisw@sous-sol.org>
Mon, 11 Dec 2006 22:32:08 +0000 (14:32 -0800)
committerChris Wright <chrisw@sous-sol.org>
Mon, 11 Dec 2006 22:32:08 +0000 (14:32 -0800)
queue-2.6.18/bonding-incorrect-bonding-state-reported-via-ioctl.patch [new file with mode: 0644]
queue-2.6.18/series
queue-2.6.19/bonding-incorrect-bonding-state-reported-via-ioctl.patch [new file with mode: 0644]
queue-2.6.19/series

diff --git a/queue-2.6.18/bonding-incorrect-bonding-state-reported-via-ioctl.patch b/queue-2.6.18/bonding-incorrect-bonding-state-reported-via-ioctl.patch
new file mode 100644 (file)
index 0000000..b0676e8
--- /dev/null
@@ -0,0 +1,36 @@
+From stable-bounces@linux.kernel.org  Tue Nov 21 11:28:41 2006
+Resent-From: agospoda@redhat.com
+Date: Tue, 21 Nov 2006 11:46:44 -0500
+From: Andy Gospodarek <andy@greyhouse.net>
+To: stable@kernel.org
+Message-ID: <20061121164643.GA2539@gospo.rdu.redhat.com>
+Cc: fubar@us.ibm.com, ctindel@users.sourceforge.net
+Subject: bonding: incorrect bonding state reported via ioctl
+
+This is a small fix-up to finish out the work done by Jay Vosburgh to
+add carrier-state support for bonding devices.  The output in
+/proc/net/bonding/bondX was correct, but when collecting the same info
+via an iotcl it could still be incorrect.
+
+Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
+Cc: Jeff Garzik <jeff@garzik.org>
+Cc: Stephen Hemminger <shemminger@osdl.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Jeff Garzik <jeff@garzik.org>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+
+ drivers/net/bonding/bond_main.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.18.5.orig/drivers/net/bonding/bond_main.c
++++ linux-2.6.18.5/drivers/net/bonding/bond_main.c
+@@ -3547,7 +3547,7 @@ static int bond_do_ioctl(struct net_devi
+                       mii->val_out = 0;
+                       read_lock_bh(&bond->lock);
+                       read_lock(&bond->curr_slave_lock);
+-                      if (bond->curr_active_slave) {
++                      if (netif_carrier_ok(bond->dev)) {
+                               mii->val_out = BMSR_LSTATUS;
+                       }
+                       read_unlock(&bond->curr_slave_lock);
index cbd07eb25a96a45e557977282889b9a1c4e96052..f88bbb86aea075ac16162baa23b623ec02fe30e8 100644 (file)
@@ -12,3 +12,4 @@ xfrm-use-output-device-disable_xfrm-for-forwarded-packets.patch
 dm-snapshot-fix-freeing-pending-exception.patch
 ipsec-fix-inetpeer-leak-in-ipv4-xfrm-dst-entries.patch
 irda-incorrect-ttp-header-reservation.patch
+bonding-incorrect-bonding-state-reported-via-ioctl.patch
diff --git a/queue-2.6.19/bonding-incorrect-bonding-state-reported-via-ioctl.patch b/queue-2.6.19/bonding-incorrect-bonding-state-reported-via-ioctl.patch
new file mode 100644 (file)
index 0000000..551054c
--- /dev/null
@@ -0,0 +1,36 @@
+From stable-bounces@linux.kernel.org  Tue Nov 21 11:28:41 2006
+Resent-From: agospoda@redhat.com
+Date: Tue, 21 Nov 2006 11:46:44 -0500
+From: Andy Gospodarek <andy@greyhouse.net>
+To: stable@kernel.org
+Message-ID: <20061121164643.GA2539@gospo.rdu.redhat.com>
+Cc: fubar@us.ibm.com, ctindel@users.sourceforge.net
+Subject: bonding: incorrect bonding state reported via ioctl
+
+This is a small fix-up to finish out the work done by Jay Vosburgh to
+add carrier-state support for bonding devices.  The output in
+/proc/net/bonding/bondX was correct, but when collecting the same info
+via an iotcl it could still be incorrect.
+
+Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
+Cc: Jeff Garzik <jeff@garzik.org>
+Cc: Stephen Hemminger <shemminger@osdl.org>
+Signed-off-by: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Jeff Garzik <jeff@garzik.org>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+
+ drivers/net/bonding/bond_main.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.19.1.orig/drivers/net/bonding/bond_main.c
++++ linux-2.6.19.1/drivers/net/bonding/bond_main.c
+@@ -3675,7 +3675,7 @@ static int bond_do_ioctl(struct net_devi
+                       mii->val_out = 0;
+                       read_lock_bh(&bond->lock);
+                       read_lock(&bond->curr_slave_lock);
+-                      if (bond->curr_active_slave) {
++                      if (netif_carrier_ok(bond->dev)) {
+                               mii->val_out = BMSR_LSTATUS;
+                       }
+                       read_unlock(&bond->curr_slave_lock);
index 6144ce037ee283b4598bd319b5b48686e38157ed..ee733c6c1eafbbc34cd396f0b78f8c17fbc4e7dd 100644 (file)
@@ -3,3 +3,4 @@ sha512-fix-sha384-block-size.patch
 read_zero_pagealigned-locking-fix.patch
 ieee80211softmac-fix-mutex_lock-at-exit-of-ieee80211_softmac_get_genie.patch
 x86-64-mark-rdtsc-as-sync-only-for-netburst-not-for-core2.patch
+bonding-incorrect-bonding-state-reported-via-ioctl.patch