projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f81eb48
)
can: dev: can_bus_off(): print scheduling of restart if activated
author
Marc Kleine-Budde
<mkl@pengutronix.de>
Tue, 15 Sep 2020 22:35:03 +0000
(
00:35
+0200)
committer
Marc Kleine-Budde
<mkl@pengutronix.de>
Mon, 21 Sep 2020 08:13:17 +0000
(10:13 +0200)
If a CAN device goes into bus-off and has automatic restart enabled, inform
user that a automatic restart is scheduled after the configured delay.
Link:
https://lore.kernel.org/r/20200915223527.1417033-14-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev.c
patch
|
blob
|
history
diff --git
a/drivers/net/can/dev.c
b/drivers/net/can/dev.c
index
e0caf96
..
3c40bba
100644
(file)
--- a/
drivers/net/can/dev.c
+++ b/
drivers/net/can/dev.c
@@
-639,7
+639,11
@@
void can_bus_off(struct net_device *dev)
{
struct can_priv *priv = netdev_priv(dev);
- netdev_info(dev, "bus-off\n");
+ if (priv->restart_ms)
+ netdev_info(dev, "bus-off, scheduling restart in %d ms\n",
+ priv->restart_ms);
+ else
+ netdev_info(dev, "bus-off\n");
netif_carrier_off(dev);