Acked-by: me.

///jon

> -----Original Message-----
> From: Parthasarathy Bhuvaragan
> Sent: Thursday, April 27, 2017 07:54 AM
> To: [email protected]; Jon Maloy
> <[email protected]>; Ying Xue <[email protected]>
> Subject: [PATCH net v1 3/6] tipc: reset bearer if device carrier not ok
> 
> If we detect that under lying carrier detects errors and goes down, we reset
> the bearer immediately.
> 
> Signed-off-by: Parthasarathy Bhuvaragan
> <[email protected]>
> ---
>  net/tipc/bearer.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index
> 33a5bdfbef76..fa233d2c6987 100644
> --- a/net/tipc/bearer.c
> +++ b/net/tipc/bearer.c
> @@ -629,15 +629,18 @@ static int tipc_l2_device_event(struct notifier_block
> *nb, unsigned long evt,
> 
>       switch (evt) {
>       case NETDEV_CHANGE:
> -             if (netif_carrier_ok(dev))
> +             if (netif_carrier_ok(dev)) {
> +                     test_and_set_bit_lock(0, &b->up);
>                       break;
> -     case NETDEV_UP:
> -             test_and_set_bit_lock(0, &b->up);
> -             break;
> +             }
> +             /* fall thru' */
>       case NETDEV_GOING_DOWN:
>               clear_bit_unlock(0, &b->up);
>               tipc_reset_bearer(net, b);
>               break;
> +     case NETDEV_UP:
> +             test_and_set_bit_lock(0, &b->up);
> +             break;
>       case NETDEV_CHANGEMTU:
>               if (tipc_mtu_bad(dev, 0)) {
>                       bearer_disable(net, b);
> --
> 2.1.4


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tipc-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to