LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] can: dev: increase bus-off message severity
@ 2018-04-18 14:10 Jakob Unterwurzacher
  2018-04-25 14:42 ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Jakob Unterwurzacher @ 2018-04-18 14:10 UTC (permalink / raw)
  To: jakob.unterwurzacher; +Cc: linux-can, linux-kernel

bus-off is usually caused by hardware malfunction or
configuration error (baud rate mismatch) and causes a
complete loss of communication.

Increase the "bus-off" message's severity from netdev_dbg
to netdev_info to make it visible to the user.

A can interface going into bus-off is similar in severity to
ethernet's "Link is Down" message, which is also printed
at info level.

It is debatable whether the the "restarted" message should
also be changed to netdev_info to make the interface state
changes comprehensible from the kernel log.
I have chosen to keep the "restarted" message at dbg for now
as the "bus-off" message should be enough for the user to
notice and investigate the problem.

Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
Cc: linux-can@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/net/can/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index b1779566c5bb..3c71f1cb205f 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -605,7 +605,7 @@ void can_bus_off(struct net_device *dev)
 {
 	struct can_priv *priv = netdev_priv(dev);
 
-	netdev_dbg(dev, "bus-off\n");
+	netdev_info(dev, "bus-off\n");
 
 	netif_carrier_off(dev);
 
-- 
2.11.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] can: dev: increase bus-off message severity
  2018-04-18 14:10 [PATCH] can: dev: increase bus-off message severity Jakob Unterwurzacher
@ 2018-04-25 14:42 ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2018-04-25 14:42 UTC (permalink / raw)
  To: Jakob Unterwurzacher; +Cc: linux-can, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1268 bytes --]

On 04/18/2018 04:10 PM, Jakob Unterwurzacher wrote:
> bus-off is usually caused by hardware malfunction or
> configuration error (baud rate mismatch) and causes a
> complete loss of communication.
> 
> Increase the "bus-off" message's severity from netdev_dbg
> to netdev_info to make it visible to the user.
> 
> A can interface going into bus-off is similar in severity to
> ethernet's "Link is Down" message, which is also printed
> at info level.
> 
> It is debatable whether the the "restarted" message should
> also be changed to netdev_info to make the interface state
> changes comprehensible from the kernel log.
> I have chosen to keep the "restarted" message at dbg for now
> as the "bus-off" message should be enough for the user to
> notice and investigate the problem.
> 
> Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com>
> Cc: linux-can@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org

Applied to can.

Tnx,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-04-25 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-18 14:10 [PATCH] can: dev: increase bus-off message severity Jakob Unterwurzacher
2018-04-25 14:42 ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).