diff options
Diffstat (limited to 'drivers/net/chelsio/common.h')
-rw-r--r-- | drivers/net/chelsio/common.h | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/net/chelsio/common.h b/drivers/net/chelsio/common.h index 9f89fd600643..2d11afe45310 100644 --- a/drivers/net/chelsio/common.h +++ b/drivers/net/chelsio/common.h | |||
@@ -36,6 +36,8 @@ | |||
36 | * * | 36 | * * |
37 | ****************************************************************************/ | 37 | ****************************************************************************/ |
38 | 38 | ||
39 | #define pr_fmt(fmt) "cxgb: " fmt | ||
40 | |||
39 | #ifndef _CXGB_COMMON_H_ | 41 | #ifndef _CXGB_COMMON_H_ |
40 | #define _CXGB_COMMON_H_ | 42 | #define _CXGB_COMMON_H_ |
41 | 43 | ||
@@ -55,28 +57,6 @@ | |||
55 | #define DRV_DESCRIPTION "Chelsio 10Gb Ethernet Driver" | 57 | #define DRV_DESCRIPTION "Chelsio 10Gb Ethernet Driver" |
56 | #define DRV_NAME "cxgb" | 58 | #define DRV_NAME "cxgb" |
57 | #define DRV_VERSION "2.2" | 59 | #define DRV_VERSION "2.2" |
58 | #define PFX DRV_NAME ": " | ||
59 | |||
60 | #define CH_ERR(fmt, ...) printk(KERN_ERR PFX fmt, ## __VA_ARGS__) | ||
61 | #define CH_WARN(fmt, ...) printk(KERN_WARNING PFX fmt, ## __VA_ARGS__) | ||
62 | #define CH_ALERT(fmt, ...) printk(KERN_ALERT PFX fmt, ## __VA_ARGS__) | ||
63 | |||
64 | /* | ||
65 | * More powerful macro that selectively prints messages based on msg_enable. | ||
66 | * For info and debugging messages. | ||
67 | */ | ||
68 | #define CH_MSG(adapter, level, category, fmt, ...) do { \ | ||
69 | if ((adapter)->msg_enable & NETIF_MSG_##category) \ | ||
70 | printk(KERN_##level PFX "%s: " fmt, (adapter)->name, \ | ||
71 | ## __VA_ARGS__); \ | ||
72 | } while (0) | ||
73 | |||
74 | #ifdef DEBUG | ||
75 | # define CH_DBG(adapter, category, fmt, ...) \ | ||
76 | CH_MSG(adapter, DEBUG, category, fmt, ## __VA_ARGS__) | ||
77 | #else | ||
78 | # define CH_DBG(fmt, ...) | ||
79 | #endif | ||
80 | 60 | ||
81 | #define CH_DEVICE(devid, ssid, idx) \ | 61 | #define CH_DEVICE(devid, ssid, idx) \ |
82 | { PCI_VENDOR_ID_CHELSIO, devid, PCI_ANY_ID, ssid, 0, 0, idx } | 62 | { PCI_VENDOR_ID_CHELSIO, devid, PCI_ANY_ID, ssid, 0, 0, idx } |