]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.18.114/can-dev-increase-bus-off-message-severity.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.18.114 / can-dev-increase-bus-off-message-severity.patch
CommitLineData
0bfe1e00
GKH
1From foo@baz Sun Jun 17 13:19:44 CEST 2018
2From: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
3Date: Wed, 18 Apr 2018 16:10:03 +0200
4Subject: can: dev: increase bus-off message severity
5
6From: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
7
8[ Upstream commit 71c23a821c6bcacba71a094efe49ee689605906b ]
9
10bus-off is usually caused by hardware malfunction or configuration error
11(baud rate mismatch) and causes a complete loss of communication.
12
13Increase the "bus-off" message's severity from netdev_dbg() to
14netdev_info() to make it visible to the user.
15
16A 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
19It is debatable whether the the "restarted" message should also be
20changed to netdev_info() to make the interface state changes
21comprehensible from the kernel log. I have chosen to keep the
22"restarted" message at dbg for now as the "bus-off" message should be
23enough for the user to notice and investigate the problem.
24
25Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
26Cc: linux-can@vger.kernel.org
27Cc: linux-kernel@vger.kernel.org
28Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
29Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
30Signed-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++;