diff options
author | Yuval Mintz <yuvalmin@broadcom.com> | 2014-02-12 18:19:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-12 19:15:41 -0500 |
commit | 76ca70fabbdaa3d5318748921f79bfdeba7a2ed8 (patch) | |
tree | abbb764c134e2a4c377dc202a81ebb7ab15ab168 /drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |
parent | 8bed1285b98e6a90403cdfe0500e8ad6bd8e8f1c (diff) | |
download | linux-76ca70fabbdaa3d5318748921f79bfdeba7a2ed8.tar.gz linux-76ca70fabbdaa3d5318748921f79bfdeba7a2ed8.tar.bz2 linux-76ca70fabbdaa3d5318748921f79bfdeba7a2ed8.zip |
bnx2x: [Debug] change verbosity of some prints
There are some debug prints (mostly iov/statistics related) which clobber
system logs whenever their verbosity level is set for an interface.
This patch puts harsher verbosity requirements for such debug prints to be
printed.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@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 | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index 391f29ef6d2e..ae91e8f43622 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h @@ -75,13 +75,22 @@ enum bnx2x_int_mode { #define BNX2X_MSG_DCB 0x8000000 /* regular debug print */ +#define DP_INNER(fmt, ...) \ + pr_notice("[%s:%d(%s)]" fmt, \ + __func__, __LINE__, \ + bp->dev ? (bp->dev->name) : "?", \ + ##__VA_ARGS__); + #define DP(__mask, fmt, ...) \ do { \ if (unlikely(bp->msg_enable & (__mask))) \ - pr_notice("[%s:%d(%s)]" fmt, \ - __func__, __LINE__, \ - bp->dev ? (bp->dev->name) : "?", \ - ##__VA_ARGS__); \ + DP_INNER(fmt, ##__VA_ARGS__); \ +} while (0) + +#define DP_AND(__mask, fmt, ...) \ +do { \ + if (unlikely((bp->msg_enable & (__mask)) == __mask)) \ + DP_INNER(fmt, ##__VA_ARGS__); \ } while (0) #define DP_CONT(__mask, fmt, ...) \ |