Patchwork [1/3] bonding: fix miimon failure counter

login
register
mail settings
Submitter Jay Vosburgh
Date Oct. 31, 2008, 12:41 a.m.
Message ID <1225413676-13579-2-git-send-email-fubar@us.ibm.com>
Download mbox | patch
Permalink /patch/6635/
State Accepted
Delegated to: Jeff Garzik
Headers show

Comments

Jay Vosburgh - Oct. 31, 2008, 12:41 a.m.
During the rework of the mii monitor for:

commit f0c76d61779b153dbfb955db3f144c62d02173c2
Author: Jay Vosburgh <fubar@us.ibm.com>
Date:   Wed Jul 2 18:21:58 2008 -0700

    bonding: refactor mii monitor

	I left out the increment of the link failure counter.  This
patch corrects that omission.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
---
 drivers/net/bonding/bond_main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Jeff Garzik - Oct. 31, 2008, 4:49 a.m.
Jay Vosburgh wrote:
> During the rework of the mii monitor for:
> 
> commit f0c76d61779b153dbfb955db3f144c62d02173c2
> Author: Jay Vosburgh <fubar@us.ibm.com>
> Date:   Wed Jul 2 18:21:58 2008 -0700
> 
>     bonding: refactor mii monitor
> 
> 	I left out the increment of the link failure counter.  This
> patch corrects that omission.
> 
> 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 832739f..85de1d0 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -2376,6 +2376,9 @@ static void bond_miimon_commit(struct bonding *bond)
>  			continue;
>  
>  		case BOND_LINK_DOWN:
> +			if (slave->link_failure_count < UINT_MAX)
> +				slave->link_failure_count++;
> +
>  			slave->link = BOND_LINK_DOWN;

applied 1-3


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 832739f..85de1d0 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2376,6 +2376,9 @@  static void bond_miimon_commit(struct bonding *bond)
 			continue;
 
 		case BOND_LINK_DOWN:
+			if (slave->link_failure_count < UINT_MAX)
+				slave->link_failure_count++;
+
 			slave->link = BOND_LINK_DOWN;
 
 			if (bond->params.mode == BOND_MODE_ACTIVEBACKUP ||