diff options
author | Merav Sicron <meravs@broadcom.com> | 2012-03-18 06:33:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-19 16:52:48 -0400 |
commit | 51c1a580b1e07d58eb063f9f4a70aea8ad32fe23 (patch) | |
tree | 83243fae1f89d3b705117a8f609bc427eb389c98 /drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |
parent | d8290ae54c88cab9f199a84125bd5fda9f48b032 (diff) |
bnx2x: revised driver prints
We've revised driver prints, changing the mask of existing prints
to allow better control over the debug messages, added prints to
error scenarios, removed unnecessary prints and corrected some spelling.
Please note that this patch contains lines with over 80 characters,
as string messages were kept in a single line.
Signed-off-by: Merav Sicron <meravs@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index c0cf313e6519..f534bf132373 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |||
@@ -58,18 +58,22 @@ | |||
58 | #define DRV_MODULE_NAME "bnx2x" | 58 | #define DRV_MODULE_NAME "bnx2x" |
59 | 59 | ||
60 | /* for messages that are currently off */ | 60 | /* for messages that are currently off */ |
61 | #define BNX2X_MSG_OFF 0 | 61 | #define BNX2X_MSG_OFF 0x0 |
62 | #define BNX2X_MSG_MCP 0x010000 /* was: NETIF_MSG_HW */ | 62 | #define BNX2X_MSG_MCP 0x0010000 /* was: NETIF_MSG_HW */ |
63 | #define BNX2X_MSG_STATS 0x020000 /* was: NETIF_MSG_TIMER */ | 63 | #define BNX2X_MSG_STATS 0x0020000 /* was: NETIF_MSG_TIMER */ |
64 | #define BNX2X_MSG_NVM 0x040000 /* was: NETIF_MSG_HW */ | 64 | #define BNX2X_MSG_NVM 0x0040000 /* was: NETIF_MSG_HW */ |
65 | #define BNX2X_MSG_DMAE 0x080000 /* was: NETIF_MSG_HW */ | 65 | #define BNX2X_MSG_DMAE 0x0080000 /* was: NETIF_MSG_HW */ |
66 | #define BNX2X_MSG_SP 0x100000 /* was: NETIF_MSG_INTR */ | 66 | #define BNX2X_MSG_SP 0x0100000 /* was: NETIF_MSG_INTR */ |
67 | #define BNX2X_MSG_FP 0x200000 /* was: NETIF_MSG_INTR */ | 67 | #define BNX2X_MSG_FP 0x0200000 /* was: NETIF_MSG_INTR */ |
68 | #define BNX2X_MSG_IOV 0x0800000 | ||
69 | #define BNX2X_MSG_IDLE 0x2000000 /* used for idle check*/ | ||
70 | #define BNX2X_MSG_ETHTOOL 0x4000000 | ||
71 | #define BNX2X_MSG_DCB 0x8000000 | ||
68 | 72 | ||
69 | /* regular debug print */ | 73 | /* regular debug print */ |
70 | #define DP(__mask, fmt, ...) \ | 74 | #define DP(__mask, fmt, ...) \ |
71 | do { \ | 75 | do { \ |
72 | if (bp->msg_enable & (__mask)) \ | 76 | if (unlikely(bp->msg_enable & (__mask))) \ |
73 | pr_notice("[%s:%d(%s)]" fmt, \ | 77 | pr_notice("[%s:%d(%s)]" fmt, \ |
74 | __func__, __LINE__, \ | 78 | __func__, __LINE__, \ |
75 | bp->dev ? (bp->dev->name) : "?", \ | 79 | bp->dev ? (bp->dev->name) : "?", \ |
@@ -78,14 +82,14 @@ do { \ | |||
78 | 82 | ||
79 | #define DP_CONT(__mask, fmt, ...) \ | 83 | #define DP_CONT(__mask, fmt, ...) \ |
80 | do { \ | 84 | do { \ |
81 | if (bp->msg_enable & (__mask)) \ | 85 | if (unlikely(bp->msg_enable & (__mask))) \ |
82 | pr_cont(fmt, ##__VA_ARGS__); \ | 86 | pr_cont(fmt, ##__VA_ARGS__); \ |
83 | } while (0) | 87 | } while (0) |
84 | 88 | ||
85 | /* errors debug print */ | 89 | /* errors debug print */ |
86 | #define BNX2X_DBG_ERR(fmt, ...) \ | 90 | #define BNX2X_DBG_ERR(fmt, ...) \ |
87 | do { \ | 91 | do { \ |
88 | if (netif_msg_probe(bp)) \ | 92 | if (unlikely(netif_msg_probe(bp))) \ |
89 | pr_err("[%s:%d(%s)]" fmt, \ | 93 | pr_err("[%s:%d(%s)]" fmt, \ |
90 | __func__, __LINE__, \ | 94 | __func__, __LINE__, \ |
91 | bp->dev ? (bp->dev->name) : "?", \ | 95 | bp->dev ? (bp->dev->name) : "?", \ |
@@ -108,7 +112,7 @@ do { \ | |||
108 | /* before we have a dev->name use dev_info() */ | 112 | /* before we have a dev->name use dev_info() */ |
109 | #define BNX2X_DEV_INFO(fmt, ...) \ | 113 | #define BNX2X_DEV_INFO(fmt, ...) \ |
110 | do { \ | 114 | do { \ |
111 | if (netif_msg_probe(bp)) \ | 115 | if (unlikely(netif_msg_probe(bp))) \ |
112 | dev_info(&bp->pdev->dev, fmt, ##__VA_ARGS__); \ | 116 | dev_info(&bp->pdev->dev, fmt, ##__VA_ARGS__); \ |
113 | } while (0) | 117 | } while (0) |
114 | 118 | ||