|
@@ -74,60 +74,60 @@ typedef enum {
|
74
|
74
|
#define DEBUGOUT3 DEBUGOUT1
|
75
|
75
|
#define DEBUGOUT7 DEBUGOUT1
|
76
|
76
|
|
77
|
|
-#define E1000_WRITE_REG(a, reg, value) ( \
|
|
77
|
+#define E1000_WRITE_REG(a, reg, value) \
|
78
|
78
|
writel((value), ((a)->hw_addr + \
|
79
|
|
- (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg))))
|
|
79
|
+ (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg)))
|
80
|
80
|
|
81
|
|
-#define E1000_READ_REG(a, reg) ( \
|
|
81
|
+#define E1000_READ_REG(a, reg) \
|
82
|
82
|
readl((a)->hw_addr + \
|
83
|
|
- (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg)))
|
|
83
|
+ (((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg))
|
84
|
84
|
|
85
|
|
-#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) ( \
|
|
85
|
+#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) \
|
86
|
86
|
writel((value), ((a)->hw_addr + \
|
87
|
87
|
(((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
|
88
|
|
- ((offset) << 2))))
|
|
88
|
+ ((offset) << 2)))
|
89
|
89
|
|
90
|
|
-#define E1000_READ_REG_ARRAY(a, reg, offset) ( \
|
|
90
|
+#define E1000_READ_REG_ARRAY(a, reg, offset) \
|
91
|
91
|
readl((a)->hw_addr + \
|
92
|
92
|
(((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
|
93
|
|
- ((offset) << 2)))
|
|
93
|
+ ((offset) << 2))
|
94
|
94
|
|
95
|
95
|
#define E1000_READ_REG_ARRAY_DWORD E1000_READ_REG_ARRAY
|
96
|
96
|
#define E1000_WRITE_REG_ARRAY_DWORD E1000_WRITE_REG_ARRAY
|
97
|
97
|
|
98
|
|
-#define E1000_WRITE_REG_ARRAY_WORD(a, reg, offset, value) ( \
|
|
98
|
+#define E1000_WRITE_REG_ARRAY_WORD(a, reg, offset, value) \
|
99
|
99
|
writew((value), ((a)->hw_addr + \
|
100
|
100
|
(((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
|
101
|
|
- ((offset) << 1))))
|
|
101
|
+ ((offset) << 1)))
|
102
|
102
|
|
103
|
|
-#define E1000_READ_REG_ARRAY_WORD(a, reg, offset) ( \
|
|
103
|
+#define E1000_READ_REG_ARRAY_WORD(a, reg, offset) \
|
104
|
104
|
readw((a)->hw_addr + \
|
105
|
105
|
(((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
|
106
|
|
- ((offset) << 1)))
|
|
106
|
+ ((offset) << 1))
|
107
|
107
|
|
108
|
|
-#define E1000_WRITE_REG_ARRAY_BYTE(a, reg, offset, value) ( \
|
|
108
|
+#define E1000_WRITE_REG_ARRAY_BYTE(a, reg, offset, value) \
|
109
|
109
|
writeb((value), ((a)->hw_addr + \
|
110
|
110
|
(((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
|
111
|
|
- (offset))))
|
|
111
|
+ (offset)))
|
112
|
112
|
|
113
|
|
-#define E1000_READ_REG_ARRAY_BYTE(a, reg, offset) ( \
|
|
113
|
+#define E1000_READ_REG_ARRAY_BYTE(a, reg, offset) \
|
114
|
114
|
readb((a)->hw_addr + \
|
115
|
115
|
(((a)->mac_type >= e1000_82543) ? E1000_##reg : E1000_82542_##reg) + \
|
116
|
|
- (offset)))
|
|
116
|
+ (offset))
|
117
|
117
|
|
118
|
118
|
#define E1000_WRITE_FLUSH(a) E1000_READ_REG(a, STATUS)
|
119
|
119
|
|
120
|
|
-#define E1000_WRITE_ICH_FLASH_REG(a, reg, value) ( \
|
121
|
|
- writel((value), ((a)->flash_address + reg)))
|
|
120
|
+#define E1000_WRITE_ICH_FLASH_REG(a, reg, value) \
|
|
121
|
+ writel((value), ((a)->flash_address + reg))
|
122
|
122
|
|
123
|
|
-#define E1000_READ_ICH_FLASH_REG(a, reg) ( \
|
124
|
|
- readl((a)->flash_address + reg))
|
|
123
|
+#define E1000_READ_ICH_FLASH_REG(a, reg) \
|
|
124
|
+ readl((a)->flash_address + reg)
|
125
|
125
|
|
126
|
|
-#define E1000_WRITE_ICH_FLASH_REG16(a, reg, value) ( \
|
127
|
|
- writew((value), ((a)->flash_address + reg)))
|
|
126
|
+#define E1000_WRITE_ICH_FLASH_REG16(a, reg, value) \
|
|
127
|
+ writew((value), ((a)->flash_address + reg))
|
128
|
128
|
|
129
|
|
-#define E1000_READ_ICH_FLASH_REG16(a, reg) ( \
|
130
|
|
- readw((a)->flash_address + reg))
|
|
129
|
+#define E1000_READ_ICH_FLASH_REG16(a, reg) \
|
|
130
|
+ readw((a)->flash_address + reg)
|
131
|
131
|
|
132
|
132
|
#define msleep(n) mdelay(n)
|
133
|
133
|
|