diff options
Diffstat (limited to 'drivers/net/bnx2x.h')
-rw-r--r-- | drivers/net/bnx2x.h | 53 |
1 files changed, 31 insertions, 22 deletions
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h index 602ab86b6392..3c48a7a68308 100644 --- a/drivers/net/bnx2x.h +++ b/drivers/net/bnx2x.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* bnx2x.h: Broadcom Everest network driver. | 1 | /* bnx2x.h: Broadcom Everest network driver. |
2 | * | 2 | * |
3 | * Copyright (c) 2007-2009 Broadcom Corporation | 3 | * Copyright (c) 2007-2010 Broadcom Corporation |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
@@ -44,7 +44,6 @@ | |||
44 | /* error/debug prints */ | 44 | /* error/debug prints */ |
45 | 45 | ||
46 | #define DRV_MODULE_NAME "bnx2x" | 46 | #define DRV_MODULE_NAME "bnx2x" |
47 | #define PFX DRV_MODULE_NAME ": " | ||
48 | 47 | ||
49 | /* for messages that are currently off */ | 48 | /* for messages that are currently off */ |
50 | #define BNX2X_MSG_OFF 0 | 49 | #define BNX2X_MSG_OFF 0 |
@@ -58,30 +57,40 @@ | |||
58 | #define DP_LEVEL KERN_NOTICE /* was: KERN_DEBUG */ | 57 | #define DP_LEVEL KERN_NOTICE /* was: KERN_DEBUG */ |
59 | 58 | ||
60 | /* regular debug print */ | 59 | /* regular debug print */ |
61 | #define DP(__mask, __fmt, __args...) do { \ | 60 | #define DP(__mask, __fmt, __args...) \ |
62 | if (bp->msglevel & (__mask)) \ | 61 | do { \ |
63 | printk(DP_LEVEL "[%s:%d(%s)]" __fmt, __func__, __LINE__, \ | 62 | if (bp->msg_enable & (__mask)) \ |
64 | bp->dev ? (bp->dev->name) : "?", ##__args); \ | 63 | printk(DP_LEVEL "[%s:%d(%s)]" __fmt, \ |
65 | } while (0) | 64 | __func__, __LINE__, \ |
65 | bp->dev ? (bp->dev->name) : "?", \ | ||
66 | ##__args); \ | ||
67 | } while (0) | ||
66 | 68 | ||
67 | /* errors debug print */ | 69 | /* errors debug print */ |
68 | #define BNX2X_DBG_ERR(__fmt, __args...) do { \ | 70 | #define BNX2X_DBG_ERR(__fmt, __args...) \ |
69 | if (bp->msglevel & NETIF_MSG_PROBE) \ | 71 | do { \ |
70 | printk(KERN_ERR "[%s:%d(%s)]" __fmt, __func__, __LINE__, \ | 72 | if (netif_msg_probe(bp)) \ |
71 | bp->dev ? (bp->dev->name) : "?", ##__args); \ | 73 | pr_err("[%s:%d(%s)]" __fmt, \ |
72 | } while (0) | 74 | __func__, __LINE__, \ |
75 | bp->dev ? (bp->dev->name) : "?", \ | ||
76 | ##__args); \ | ||
77 | } while (0) | ||
73 | 78 | ||
74 | /* for errors (never masked) */ | 79 | /* for errors (never masked) */ |
75 | #define BNX2X_ERR(__fmt, __args...) do { \ | 80 | #define BNX2X_ERR(__fmt, __args...) \ |
76 | printk(KERN_ERR "[%s:%d(%s)]" __fmt, __func__, __LINE__, \ | 81 | do { \ |
77 | bp->dev ? (bp->dev->name) : "?", ##__args); \ | 82 | pr_err("[%s:%d(%s)]" __fmt, \ |
78 | } while (0) | 83 | __func__, __LINE__, \ |
84 | bp->dev ? (bp->dev->name) : "?", \ | ||
85 | ##__args); \ | ||
86 | } while (0) | ||
79 | 87 | ||
80 | /* before we have a dev->name use dev_info() */ | 88 | /* before we have a dev->name use dev_info() */ |
81 | #define BNX2X_DEV_INFO(__fmt, __args...) do { \ | 89 | #define BNX2X_DEV_INFO(__fmt, __args...) \ |
82 | if (bp->msglevel & NETIF_MSG_PROBE) \ | 90 | do { \ |
83 | dev_info(&bp->pdev->dev, __fmt, ##__args); \ | 91 | if (netif_msg_probe(bp)) \ |
84 | } while (0) | 92 | dev_info(&bp->pdev->dev, __fmt, ##__args); \ |
93 | } while (0) | ||
85 | 94 | ||
86 | 95 | ||
87 | #ifdef BNX2X_STOP_ON_ERROR | 96 | #ifdef BNX2X_STOP_ON_ERROR |
@@ -130,7 +139,7 @@ | |||
130 | offset, len32); \ | 139 | offset, len32); \ |
131 | } while (0) | 140 | } while (0) |
132 | 141 | ||
133 | #define VIRT_WR_DMAE_LEN(bp, data, addr, len32) \ | 142 | #define VIRT_WR_DMAE_LEN(bp, data, addr, len32, le32_swap) \ |
134 | do { \ | 143 | do { \ |
135 | memcpy(GUNZIP_BUF(bp), data, (len32) * 4); \ | 144 | memcpy(GUNZIP_BUF(bp), data, (len32) * 4); \ |
136 | bnx2x_write_big_buf_wb(bp, addr, len32); \ | 145 | bnx2x_write_big_buf_wb(bp, addr, len32); \ |
@@ -882,7 +891,7 @@ struct bnx2x { | |||
882 | /* End of fields used in the performance code paths */ | 891 | /* End of fields used in the performance code paths */ |
883 | 892 | ||
884 | int panic; | 893 | int panic; |
885 | int msglevel; | 894 | int msg_enable; |
886 | 895 | ||
887 | u32 flags; | 896 | u32 flags; |
888 | #define PCIX_FLAG 1 | 897 | #define PCIX_FLAG 1 |