]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.19.2/bonding-incorrect-bonding-state-reported-via-ioctl.patch
Fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 2.6.19.2 / bonding-incorrect-bonding-state-reported-via-ioctl.patch
1 From stable-bounces@linux.kernel.org Tue Nov 21 11:28:41 2006
2 Resent-From: agospoda@redhat.com
3 Date: Tue, 21 Nov 2006 11:46:44 -0500
4 From: Andy Gospodarek <andy@greyhouse.net>
5 To: stable@kernel.org
6 Message-ID: <20061121164643.GA2539@gospo.rdu.redhat.com>
7 Cc: fubar@us.ibm.com, ctindel@users.sourceforge.net
8 Subject: bonding: incorrect bonding state reported via ioctl
9
10 This is a small fix-up to finish out the work done by Jay Vosburgh to
11 add carrier-state support for bonding devices. The output in
12 /proc/net/bonding/bondX was correct, but when collecting the same info
13 via an iotcl it could still be incorrect.
14
15 Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
16 Cc: Jeff Garzik <jeff@garzik.org>
17 Cc: Stephen Hemminger <shemminger@osdl.org>
18 Signed-off-by: Andrew Morton <akpm@osdl.org>
19 Signed-off-by: Jeff Garzik <jeff@garzik.org>
20 Signed-off-by: Chris Wright <chrisw@sous-sol.org>
21 ---
22
23 drivers/net/bonding/bond_main.c | 2 +-
24 1 file changed, 1 insertion(+), 1 deletion(-)
25
26 --- linux-2.6.19.1.orig/drivers/net/bonding/bond_main.c
27 +++ linux-2.6.19.1/drivers/net/bonding/bond_main.c
28 @@ -3675,7 +3675,7 @@ static int bond_do_ioctl(struct net_devi
29 mii->val_out = 0;
30 read_lock_bh(&bond->lock);
31 read_lock(&bond->curr_slave_lock);
32 - if (bond->curr_active_slave) {
33 + if (netif_carrier_ok(bond->dev)) {
34 mii->val_out = BMSR_LSTATUS;
35 }
36 read_unlock(&bond->curr_slave_lock);