summaryrefslogtreecommitdiff
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorVeaceslav Falico <[email protected]>2014-07-17 19:46:10 +0200
committerDavid S. Miller <[email protected]>2014-07-20 20:38:43 -0700
commitccc7f4968a18b980994e622006b84e0195754390 (patch)
tree92c83d2cbb4ff1a24b21295853f3c5008d1d0158 /lib/dynamic_debug.c
parentc6f854d57d704a97adbf952ef0948acc68f3312c (diff)
net: print net_device reg_state in netdev_* unless it's registered
This way we'll always know in what status the device is, unless it's running normally (i.e. NETDEV_REGISTERED). Also, emit a warning once in case of a bad reg_state. CC: "David S. Miller" <[email protected]> CC: Jason Baron <[email protected]> CC: Eric Dumazet <[email protected]> CC: Vlad Yasevich <[email protected]> CC: stephen hemminger <[email protected]> CC: Jerry Chu <[email protected]> CC: Ben Hutchings <[email protected]> CC: Joe Perches <[email protected]> Signed-off-by: Veaceslav Falico <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'lib/dynamic_debug.c')
-rw-r--r--lib/dynamic_debug.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 7288e38e1757..c9afbe2c445a 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -614,13 +614,15 @@ int __dynamic_netdev_dbg(struct _ddebug *descriptor,
char buf[PREFIX_SIZE];
res = dev_printk_emit(7, dev->dev.parent,
- "%s%s %s %s: %pV",
+ "%s%s %s %s%s: %pV",
dynamic_emit_prefix(descriptor, buf),
dev_driver_string(dev->dev.parent),
dev_name(dev->dev.parent),
- netdev_name(dev), &vaf);
+ netdev_name(dev), netdev_reg_state(dev),
+ &vaf);
} else if (dev) {
- res = printk(KERN_DEBUG "%s: %pV", netdev_name(dev), &vaf);
+ res = printk(KERN_DEBUG "%s%s: %pV", netdev_name(dev),
+ netdev_reg_state(dev), &vaf);
} else {
res = printk(KERN_DEBUG "(NULL net_device): %pV", &vaf);
}