diff options
Diffstat (limited to 'drivers/net/wan/lmc/lmc_var.h')
-rw-r--r-- | drivers/net/wan/lmc/lmc_var.h | 234 |
1 files changed, 117 insertions, 117 deletions
diff --git a/drivers/net/wan/lmc/lmc_var.h b/drivers/net/wan/lmc/lmc_var.h index 52e044209d50..65d01978e784 100644 --- a/drivers/net/wan/lmc/lmc_var.h +++ b/drivers/net/wan/lmc/lmc_var.h | |||
@@ -100,45 +100,45 @@ struct lmc_regfile_t { | |||
100 | * used to define bits in the second tulip_desc_t field (length) | 100 | * used to define bits in the second tulip_desc_t field (length) |
101 | * for the transmit descriptor -baz */ | 101 | * for the transmit descriptor -baz */ |
102 | 102 | ||
103 | #define LMC_TDES_FIRST_BUFFER_SIZE ((u_int32_t)(0x000007FF)) | 103 | #define LMC_TDES_FIRST_BUFFER_SIZE ((u32)(0x000007FF)) |
104 | #define LMC_TDES_SECOND_BUFFER_SIZE ((u_int32_t)(0x003FF800)) | 104 | #define LMC_TDES_SECOND_BUFFER_SIZE ((u32)(0x003FF800)) |
105 | #define LMC_TDES_HASH_FILTERING ((u_int32_t)(0x00400000)) | 105 | #define LMC_TDES_HASH_FILTERING ((u32)(0x00400000)) |
106 | #define LMC_TDES_DISABLE_PADDING ((u_int32_t)(0x00800000)) | 106 | #define LMC_TDES_DISABLE_PADDING ((u32)(0x00800000)) |
107 | #define LMC_TDES_SECOND_ADDR_CHAINED ((u_int32_t)(0x01000000)) | 107 | #define LMC_TDES_SECOND_ADDR_CHAINED ((u32)(0x01000000)) |
108 | #define LMC_TDES_END_OF_RING ((u_int32_t)(0x02000000)) | 108 | #define LMC_TDES_END_OF_RING ((u32)(0x02000000)) |
109 | #define LMC_TDES_ADD_CRC_DISABLE ((u_int32_t)(0x04000000)) | 109 | #define LMC_TDES_ADD_CRC_DISABLE ((u32)(0x04000000)) |
110 | #define LMC_TDES_SETUP_PACKET ((u_int32_t)(0x08000000)) | 110 | #define LMC_TDES_SETUP_PACKET ((u32)(0x08000000)) |
111 | #define LMC_TDES_INVERSE_FILTERING ((u_int32_t)(0x10000000)) | 111 | #define LMC_TDES_INVERSE_FILTERING ((u32)(0x10000000)) |
112 | #define LMC_TDES_FIRST_SEGMENT ((u_int32_t)(0x20000000)) | 112 | #define LMC_TDES_FIRST_SEGMENT ((u32)(0x20000000)) |
113 | #define LMC_TDES_LAST_SEGMENT ((u_int32_t)(0x40000000)) | 113 | #define LMC_TDES_LAST_SEGMENT ((u32)(0x40000000)) |
114 | #define LMC_TDES_INTERRUPT_ON_COMPLETION ((u_int32_t)(0x80000000)) | 114 | #define LMC_TDES_INTERRUPT_ON_COMPLETION ((u32)(0x80000000)) |
115 | 115 | ||
116 | #define TDES_SECOND_BUFFER_SIZE_BIT_NUMBER 11 | 116 | #define TDES_SECOND_BUFFER_SIZE_BIT_NUMBER 11 |
117 | #define TDES_COLLISION_COUNT_BIT_NUMBER 3 | 117 | #define TDES_COLLISION_COUNT_BIT_NUMBER 3 |
118 | 118 | ||
119 | /* Constants for the RCV descriptor RDES */ | 119 | /* Constants for the RCV descriptor RDES */ |
120 | 120 | ||
121 | #define LMC_RDES_OVERFLOW ((u_int32_t)(0x00000001)) | 121 | #define LMC_RDES_OVERFLOW ((u32)(0x00000001)) |
122 | #define LMC_RDES_CRC_ERROR ((u_int32_t)(0x00000002)) | 122 | #define LMC_RDES_CRC_ERROR ((u32)(0x00000002)) |
123 | #define LMC_RDES_DRIBBLING_BIT ((u_int32_t)(0x00000004)) | 123 | #define LMC_RDES_DRIBBLING_BIT ((u32)(0x00000004)) |
124 | #define LMC_RDES_REPORT_ON_MII_ERR ((u_int32_t)(0x00000008)) | 124 | #define LMC_RDES_REPORT_ON_MII_ERR ((u32)(0x00000008)) |
125 | #define LMC_RDES_RCV_WATCHDOG_TIMEOUT ((u_int32_t)(0x00000010)) | 125 | #define LMC_RDES_RCV_WATCHDOG_TIMEOUT ((u32)(0x00000010)) |
126 | #define LMC_RDES_FRAME_TYPE ((u_int32_t)(0x00000020)) | 126 | #define LMC_RDES_FRAME_TYPE ((u32)(0x00000020)) |
127 | #define LMC_RDES_COLLISION_SEEN ((u_int32_t)(0x00000040)) | 127 | #define LMC_RDES_COLLISION_SEEN ((u32)(0x00000040)) |
128 | #define LMC_RDES_FRAME_TOO_LONG ((u_int32_t)(0x00000080)) | 128 | #define LMC_RDES_FRAME_TOO_LONG ((u32)(0x00000080)) |
129 | #define LMC_RDES_LAST_DESCRIPTOR ((u_int32_t)(0x00000100)) | 129 | #define LMC_RDES_LAST_DESCRIPTOR ((u32)(0x00000100)) |
130 | #define LMC_RDES_FIRST_DESCRIPTOR ((u_int32_t)(0x00000200)) | 130 | #define LMC_RDES_FIRST_DESCRIPTOR ((u32)(0x00000200)) |
131 | #define LMC_RDES_MULTICAST_FRAME ((u_int32_t)(0x00000400)) | 131 | #define LMC_RDES_MULTICAST_FRAME ((u32)(0x00000400)) |
132 | #define LMC_RDES_RUNT_FRAME ((u_int32_t)(0x00000800)) | 132 | #define LMC_RDES_RUNT_FRAME ((u32)(0x00000800)) |
133 | #define LMC_RDES_DATA_TYPE ((u_int32_t)(0x00003000)) | 133 | #define LMC_RDES_DATA_TYPE ((u32)(0x00003000)) |
134 | #define LMC_RDES_LENGTH_ERROR ((u_int32_t)(0x00004000)) | 134 | #define LMC_RDES_LENGTH_ERROR ((u32)(0x00004000)) |
135 | #define LMC_RDES_ERROR_SUMMARY ((u_int32_t)(0x00008000)) | 135 | #define LMC_RDES_ERROR_SUMMARY ((u32)(0x00008000)) |
136 | #define LMC_RDES_FRAME_LENGTH ((u_int32_t)(0x3FFF0000)) | 136 | #define LMC_RDES_FRAME_LENGTH ((u32)(0x3FFF0000)) |
137 | #define LMC_RDES_OWN_BIT ((u_int32_t)(0x80000000)) | 137 | #define LMC_RDES_OWN_BIT ((u32)(0x80000000)) |
138 | 138 | ||
139 | #define RDES_FRAME_LENGTH_BIT_NUMBER 16 | 139 | #define RDES_FRAME_LENGTH_BIT_NUMBER 16 |
140 | 140 | ||
141 | #define LMC_RDES_ERROR_MASK ( (u_int32_t)( \ | 141 | #define LMC_RDES_ERROR_MASK ( (u32)( \ |
142 | LMC_RDES_OVERFLOW \ | 142 | LMC_RDES_OVERFLOW \ |
143 | | LMC_RDES_DRIBBLING_BIT \ | 143 | | LMC_RDES_DRIBBLING_BIT \ |
144 | | LMC_RDES_REPORT_ON_MII_ERR \ | 144 | | LMC_RDES_REPORT_ON_MII_ERR \ |
@@ -150,32 +150,32 @@ struct lmc_regfile_t { | |||
150 | */ | 150 | */ |
151 | 151 | ||
152 | typedef struct { | 152 | typedef struct { |
153 | u_int32_t n; | 153 | u32 n; |
154 | u_int32_t m; | 154 | u32 m; |
155 | u_int32_t v; | 155 | u32 v; |
156 | u_int32_t x; | 156 | u32 x; |
157 | u_int32_t r; | 157 | u32 r; |
158 | u_int32_t f; | 158 | u32 f; |
159 | u_int32_t exact; | 159 | u32 exact; |
160 | } lmc_av9110_t; | 160 | } lmc_av9110_t; |
161 | 161 | ||
162 | /* | 162 | /* |
163 | * Common structure passed to the ioctl code. | 163 | * Common structure passed to the ioctl code. |
164 | */ | 164 | */ |
165 | struct lmc___ctl { | 165 | struct lmc___ctl { |
166 | u_int32_t cardtype; | 166 | u32 cardtype; |
167 | u_int32_t clock_source; /* HSSI, T1 */ | 167 | u32 clock_source; /* HSSI, T1 */ |
168 | u_int32_t clock_rate; /* T1 */ | 168 | u32 clock_rate; /* T1 */ |
169 | u_int32_t crc_length; | 169 | u32 crc_length; |
170 | u_int32_t cable_length; /* DS3 */ | 170 | u32 cable_length; /* DS3 */ |
171 | u_int32_t scrambler_onoff; /* DS3 */ | 171 | u32 scrambler_onoff; /* DS3 */ |
172 | u_int32_t cable_type; /* T1 */ | 172 | u32 cable_type; /* T1 */ |
173 | u_int32_t keepalive_onoff; /* protocol */ | 173 | u32 keepalive_onoff; /* protocol */ |
174 | u_int32_t ticks; /* ticks/sec */ | 174 | u32 ticks; /* ticks/sec */ |
175 | union { | 175 | union { |
176 | lmc_av9110_t ssi; | 176 | lmc_av9110_t ssi; |
177 | } cardspec; | 177 | } cardspec; |
178 | u_int32_t circuit_type; /* T1 or E1 */ | 178 | u32 circuit_type; /* T1 or E1 */ |
179 | }; | 179 | }; |
180 | 180 | ||
181 | 181 | ||
@@ -224,52 +224,52 @@ struct lmc___media { | |||
224 | 224 | ||
225 | struct lmc_extra_statistics | 225 | struct lmc_extra_statistics |
226 | { | 226 | { |
227 | u_int32_t version_size; | 227 | u32 version_size; |
228 | u_int32_t lmc_cardtype; | 228 | u32 lmc_cardtype; |
229 | 229 | ||
230 | u_int32_t tx_ProcTimeout; | 230 | u32 tx_ProcTimeout; |
231 | u_int32_t tx_IntTimeout; | 231 | u32 tx_IntTimeout; |
232 | u_int32_t tx_NoCompleteCnt; | 232 | u32 tx_NoCompleteCnt; |
233 | u_int32_t tx_MaxXmtsB4Int; | 233 | u32 tx_MaxXmtsB4Int; |
234 | u_int32_t tx_TimeoutCnt; | 234 | u32 tx_TimeoutCnt; |
235 | u_int32_t tx_OutOfSyncPtr; | 235 | u32 tx_OutOfSyncPtr; |
236 | u_int32_t tx_tbusy0; | 236 | u32 tx_tbusy0; |
237 | u_int32_t tx_tbusy1; | 237 | u32 tx_tbusy1; |
238 | u_int32_t tx_tbusy_calls; | 238 | u32 tx_tbusy_calls; |
239 | u_int32_t resetCount; | 239 | u32 resetCount; |
240 | u_int32_t lmc_txfull; | 240 | u32 lmc_txfull; |
241 | u_int32_t tbusy; | 241 | u32 tbusy; |
242 | u_int32_t dirtyTx; | 242 | u32 dirtyTx; |
243 | u_int32_t lmc_next_tx; | 243 | u32 lmc_next_tx; |
244 | u_int32_t otherTypeCnt; | 244 | u32 otherTypeCnt; |
245 | u_int32_t lastType; | 245 | u32 lastType; |
246 | u_int32_t lastTypeOK; | 246 | u32 lastTypeOK; |
247 | u_int32_t txLoopCnt; | 247 | u32 txLoopCnt; |
248 | u_int32_t usedXmtDescripCnt; | 248 | u32 usedXmtDescripCnt; |
249 | u_int32_t txIndexCnt; | 249 | u32 txIndexCnt; |
250 | u_int32_t rxIntLoopCnt; | 250 | u32 rxIntLoopCnt; |
251 | 251 | ||
252 | u_int32_t rx_SmallPktCnt; | 252 | u32 rx_SmallPktCnt; |
253 | u_int32_t rx_BadPktSurgeCnt; | 253 | u32 rx_BadPktSurgeCnt; |
254 | u_int32_t rx_BuffAllocErr; | 254 | u32 rx_BuffAllocErr; |
255 | u_int32_t tx_lossOfClockCnt; | 255 | u32 tx_lossOfClockCnt; |
256 | 256 | ||
257 | /* T1 error counters */ | 257 | /* T1 error counters */ |
258 | u_int32_t framingBitErrorCount; | 258 | u32 framingBitErrorCount; |
259 | u_int32_t lineCodeViolationCount; | 259 | u32 lineCodeViolationCount; |
260 | 260 | ||
261 | u_int32_t lossOfFrameCount; | 261 | u32 lossOfFrameCount; |
262 | u_int32_t changeOfFrameAlignmentCount; | 262 | u32 changeOfFrameAlignmentCount; |
263 | u_int32_t severelyErroredFrameCount; | 263 | u32 severelyErroredFrameCount; |
264 | 264 | ||
265 | u_int32_t check; | 265 | u32 check; |
266 | }; | 266 | }; |
267 | 267 | ||
268 | typedef struct lmc_xinfo { | 268 | typedef struct lmc_xinfo { |
269 | u_int32_t Magic0; /* BEEFCAFE */ | 269 | u32 Magic0; /* BEEFCAFE */ |
270 | 270 | ||
271 | u_int32_t PciCardType; | 271 | u32 PciCardType; |
272 | u_int32_t PciSlotNumber; /* PCI slot number */ | 272 | u32 PciSlotNumber; /* PCI slot number */ |
273 | 273 | ||
274 | u16 DriverMajorVersion; | 274 | u16 DriverMajorVersion; |
275 | u16 DriverMinorVersion; | 275 | u16 DriverMinorVersion; |
@@ -282,9 +282,9 @@ typedef struct lmc_xinfo { | |||
282 | u16 t1_alarm2_status; | 282 | u16 t1_alarm2_status; |
283 | 283 | ||
284 | int link_status; | 284 | int link_status; |
285 | u_int32_t mii_reg16; | 285 | u32 mii_reg16; |
286 | 286 | ||
287 | u_int32_t Magic1; /* DEADBEEF */ | 287 | u32 Magic1; /* DEADBEEF */ |
288 | } LMC_XINFO; | 288 | } LMC_XINFO; |
289 | 289 | ||
290 | 290 | ||
@@ -298,16 +298,16 @@ struct lmc___softc { | |||
298 | struct net_device *lmc_device; | 298 | struct net_device *lmc_device; |
299 | 299 | ||
300 | int hang, rxdesc, bad_packet, some_counter; | 300 | int hang, rxdesc, bad_packet, some_counter; |
301 | u_int32_t txgo; | 301 | u32 txgo; |
302 | struct lmc_regfile_t lmc_csrs; | 302 | struct lmc_regfile_t lmc_csrs; |
303 | volatile u_int32_t lmc_txtick; | 303 | volatile u32 lmc_txtick; |
304 | volatile u_int32_t lmc_rxtick; | 304 | volatile u32 lmc_rxtick; |
305 | u_int32_t lmc_flags; | 305 | u32 lmc_flags; |
306 | u_int32_t lmc_intrmask; /* our copy of csr_intr */ | 306 | u32 lmc_intrmask; /* our copy of csr_intr */ |
307 | u_int32_t lmc_cmdmode; /* our copy of csr_cmdmode */ | 307 | u32 lmc_cmdmode; /* our copy of csr_cmdmode */ |
308 | u_int32_t lmc_busmode; /* our copy of csr_busmode */ | 308 | u32 lmc_busmode; /* our copy of csr_busmode */ |
309 | u_int32_t lmc_gpio_io; /* state of in/out settings */ | 309 | u32 lmc_gpio_io; /* state of in/out settings */ |
310 | u_int32_t lmc_gpio; /* state of outputs */ | 310 | u32 lmc_gpio; /* state of outputs */ |
311 | struct sk_buff* lmc_txq[LMC_TXDESCS]; | 311 | struct sk_buff* lmc_txq[LMC_TXDESCS]; |
312 | struct sk_buff* lmc_rxq[LMC_RXDESCS]; | 312 | struct sk_buff* lmc_rxq[LMC_RXDESCS]; |
313 | volatile | 313 | volatile |
@@ -323,37 +323,37 @@ struct lmc___softc { | |||
323 | int lmc_ok; | 323 | int lmc_ok; |
324 | int last_link_status; | 324 | int last_link_status; |
325 | int lmc_cardtype; | 325 | int lmc_cardtype; |
326 | u_int32_t last_frameerr; | 326 | u32 last_frameerr; |
327 | lmc_media_t *lmc_media; | 327 | lmc_media_t *lmc_media; |
328 | struct timer_list timer; | 328 | struct timer_list timer; |
329 | lmc_ctl_t ictl; | 329 | lmc_ctl_t ictl; |
330 | u_int32_t TxDescriptControlInit; | 330 | u32 TxDescriptControlInit; |
331 | 331 | ||
332 | int tx_TimeoutInd; /* additional driver state */ | 332 | int tx_TimeoutInd; /* additional driver state */ |
333 | int tx_TimeoutDisplay; | 333 | int tx_TimeoutDisplay; |
334 | unsigned int lastlmc_taint_tx; | 334 | unsigned int lastlmc_taint_tx; |
335 | int lasttx_packets; | 335 | int lasttx_packets; |
336 | u_int32_t tx_clockState; | 336 | u32 tx_clockState; |
337 | u_int32_t lmc_crcSize; | 337 | u32 lmc_crcSize; |
338 | LMC_XINFO lmc_xinfo; | 338 | LMC_XINFO lmc_xinfo; |
339 | char lmc_yel, lmc_blue, lmc_red; /* for T1 and DS3 */ | 339 | char lmc_yel, lmc_blue, lmc_red; /* for T1 and DS3 */ |
340 | char lmc_timing; /* for HSSI and SSI */ | 340 | char lmc_timing; /* for HSSI and SSI */ |
341 | int got_irq; | 341 | int got_irq; |
342 | 342 | ||
343 | char last_led_err[4]; | 343 | char last_led_err[4]; |
344 | 344 | ||
345 | u32 last_int; | 345 | u32 last_int; |
346 | u32 num_int; | 346 | u32 num_int; |
347 | 347 | ||
348 | spinlock_t lmc_lock; | 348 | spinlock_t lmc_lock; |
349 | u16 if_type; /* HDLC/PPP or NET */ | 349 | u16 if_type; /* HDLC/PPP or NET */ |
350 | 350 | ||
351 | /* Failure cases */ | 351 | /* Failure cases */ |
352 | u8 failed_ring; | 352 | u8 failed_ring; |
353 | u8 failed_recv_alloc; | 353 | u8 failed_recv_alloc; |
354 | 354 | ||
355 | /* Structure check */ | 355 | /* Structure check */ |
356 | u32 check; | 356 | u32 check; |
357 | }; | 357 | }; |
358 | 358 | ||
359 | #define LMC_PCI_TIME 1 | 359 | #define LMC_PCI_TIME 1 |
@@ -449,8 +449,8 @@ struct lmc___softc { | |||
449 | | TULIP_STS_TXUNDERFLOW\ | 449 | | TULIP_STS_TXUNDERFLOW\ |
450 | | TULIP_STS_RXSTOPPED ) | 450 | | TULIP_STS_RXSTOPPED ) |
451 | 451 | ||
452 | #define DESC_OWNED_BY_SYSTEM ((u_int32_t)(0x00000000)) | 452 | #define DESC_OWNED_BY_SYSTEM ((u32)(0x00000000)) |
453 | #define DESC_OWNED_BY_DC21X4 ((u_int32_t)(0x80000000)) | 453 | #define DESC_OWNED_BY_DC21X4 ((u32)(0x80000000)) |
454 | 454 | ||
455 | #ifndef TULIP_CMD_RECEIVEALL | 455 | #ifndef TULIP_CMD_RECEIVEALL |
456 | #define TULIP_CMD_RECEIVEALL 0x40000000L | 456 | #define TULIP_CMD_RECEIVEALL 0x40000000L |