forked from luck/tmp_suning_uos_patched
can: switch carrier on if device was stopped while in bus-off state
This patch fixes a problem when a device is stopped while in the bus-off state. Then the carrier remains off forever. Signed-off-by: Kurt Van Dijck <kurt.van.dijck@skynet.be> Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b3d0df7ca3
commit
1b0d92244f
@ -473,6 +473,10 @@ int open_candev(struct net_device *dev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Switch carrier on if device was stopped while in bus-off state */
|
||||
if (!netif_carrier_ok(dev))
|
||||
netif_carrier_on(dev);
|
||||
|
||||
setup_timer(&priv->restart_timer, can_restart, (unsigned long)dev);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user