]>
Commit | Line | Data |
---|---|---|
0bfe1e00 GKH |
1 | From foo@baz Sun Jun 17 13:19:44 CEST 2018 |
2 | From: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> | |
3 | Date: Wed, 18 Apr 2018 16:10:03 +0200 | |
4 | Subject: can: dev: increase bus-off message severity | |
5 | ||
6 | From: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> | |
7 | ||
8 | [ Upstream commit 71c23a821c6bcacba71a094efe49ee689605906b ] | |
9 | ||
10 | bus-off is usually caused by hardware malfunction or configuration error | |
11 | (baud rate mismatch) and causes a complete loss of communication. | |
12 | ||
13 | Increase the "bus-off" message's severity from netdev_dbg() to | |
14 | netdev_info() to make it visible to the user. | |
15 | ||
16 | A can interface going into bus-off is similar in severity to ethernet's | |
17 | "Link is Down" message, which is also printed at info level. | |
18 | ||
19 | It is debatable whether the the "restarted" message should also be | |
20 | changed to netdev_info() to make the interface state changes | |
21 | comprehensible from the kernel log. I have chosen to keep the | |
22 | "restarted" message at dbg for now as the "bus-off" message should be | |
23 | enough for the user to notice and investigate the problem. | |
24 | ||
25 | Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> | |
26 | Cc: linux-can@vger.kernel.org | |
27 | Cc: linux-kernel@vger.kernel.org | |
28 | Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> | |
29 | Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> | |
30 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
31 | --- | |
32 | drivers/net/can/dev.c | 2 +- | |
33 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
34 | ||
35 | --- a/drivers/net/can/dev.c | |
36 | +++ b/drivers/net/can/dev.c | |
37 | @@ -471,7 +471,7 @@ void can_bus_off(struct net_device *dev) | |
38 | { | |
39 | struct can_priv *priv = netdev_priv(dev); | |
40 | ||
41 | - netdev_dbg(dev, "bus-off\n"); | |
42 | + netdev_info(dev, "bus-off\n"); | |
43 | ||
44 | netif_carrier_off(dev); | |
45 | priv->can_stats.bus_off++; |