diff options
Diffstat (limited to 'drivers/net/e1000/e1000.h')
-rw-r--r-- | drivers/net/e1000/e1000.h | 113 |
1 files changed, 56 insertions, 57 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 3b840283a9c3..31feae1ea390 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h | |||
@@ -161,13 +161,13 @@ struct e1000_buffer { | |||
161 | struct sk_buff *skb; | 161 | struct sk_buff *skb; |
162 | dma_addr_t dma; | 162 | dma_addr_t dma; |
163 | unsigned long time_stamp; | 163 | unsigned long time_stamp; |
164 | uint16_t length; | 164 | u16 length; |
165 | uint16_t next_to_watch; | 165 | u16 next_to_watch; |
166 | }; | 166 | }; |
167 | 167 | ||
168 | 168 | ||
169 | struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; | 169 | struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; |
170 | struct e1000_ps_page_dma { uint64_t ps_page_dma[PS_PAGE_BUFFERS]; }; | 170 | struct e1000_ps_page_dma { u64 ps_page_dma[PS_PAGE_BUFFERS]; }; |
171 | 171 | ||
172 | struct e1000_tx_ring { | 172 | struct e1000_tx_ring { |
173 | /* pointer to the descriptor ring memory */ | 173 | /* pointer to the descriptor ring memory */ |
@@ -186,9 +186,9 @@ struct e1000_tx_ring { | |||
186 | struct e1000_buffer *buffer_info; | 186 | struct e1000_buffer *buffer_info; |
187 | 187 | ||
188 | spinlock_t tx_lock; | 188 | spinlock_t tx_lock; |
189 | uint16_t tdh; | 189 | u16 tdh; |
190 | uint16_t tdt; | 190 | u16 tdt; |
191 | boolean_t last_tx_tso; | 191 | bool last_tx_tso; |
192 | }; | 192 | }; |
193 | 193 | ||
194 | struct e1000_rx_ring { | 194 | struct e1000_rx_ring { |
@@ -213,8 +213,8 @@ struct e1000_rx_ring { | |||
213 | /* cpu for rx queue */ | 213 | /* cpu for rx queue */ |
214 | int cpu; | 214 | int cpu; |
215 | 215 | ||
216 | uint16_t rdh; | 216 | u16 rdh; |
217 | uint16_t rdt; | 217 | u16 rdt; |
218 | }; | 218 | }; |
219 | 219 | ||
220 | #define E1000_DESC_UNUSED(R) \ | 220 | #define E1000_DESC_UNUSED(R) \ |
@@ -237,31 +237,30 @@ struct e1000_adapter { | |||
237 | struct timer_list watchdog_timer; | 237 | struct timer_list watchdog_timer; |
238 | struct timer_list phy_info_timer; | 238 | struct timer_list phy_info_timer; |
239 | struct vlan_group *vlgrp; | 239 | struct vlan_group *vlgrp; |
240 | uint16_t mng_vlan_id; | 240 | u16 mng_vlan_id; |
241 | uint32_t bd_number; | 241 | u32 bd_number; |
242 | uint32_t rx_buffer_len; | 242 | u32 rx_buffer_len; |
243 | uint32_t wol; | 243 | u32 wol; |
244 | uint32_t smartspeed; | 244 | u32 smartspeed; |
245 | uint32_t en_mng_pt; | 245 | u32 en_mng_pt; |
246 | uint16_t link_speed; | 246 | u16 link_speed; |
247 | uint16_t link_duplex; | 247 | u16 link_duplex; |
248 | spinlock_t stats_lock; | 248 | spinlock_t stats_lock; |
249 | #ifdef CONFIG_E1000_NAPI | 249 | #ifdef CONFIG_E1000_NAPI |
250 | spinlock_t tx_queue_lock; | 250 | spinlock_t tx_queue_lock; |
251 | #endif | 251 | #endif |
252 | atomic_t irq_sem; | ||
253 | unsigned int total_tx_bytes; | 252 | unsigned int total_tx_bytes; |
254 | unsigned int total_tx_packets; | 253 | unsigned int total_tx_packets; |
255 | unsigned int total_rx_bytes; | 254 | unsigned int total_rx_bytes; |
256 | unsigned int total_rx_packets; | 255 | unsigned int total_rx_packets; |
257 | /* Interrupt Throttle Rate */ | 256 | /* Interrupt Throttle Rate */ |
258 | uint32_t itr; | 257 | u32 itr; |
259 | uint32_t itr_setting; | 258 | u32 itr_setting; |
260 | uint16_t tx_itr; | 259 | u16 tx_itr; |
261 | uint16_t rx_itr; | 260 | u16 rx_itr; |
262 | 261 | ||
263 | struct work_struct reset_task; | 262 | struct work_struct reset_task; |
264 | uint8_t fc_autoneg; | 263 | u8 fc_autoneg; |
265 | 264 | ||
266 | struct timer_list blink_timer; | 265 | struct timer_list blink_timer; |
267 | unsigned long led_status; | 266 | unsigned long led_status; |
@@ -270,30 +269,30 @@ struct e1000_adapter { | |||
270 | struct e1000_tx_ring *tx_ring; /* One per active queue */ | 269 | struct e1000_tx_ring *tx_ring; /* One per active queue */ |
271 | unsigned int restart_queue; | 270 | unsigned int restart_queue; |
272 | unsigned long tx_queue_len; | 271 | unsigned long tx_queue_len; |
273 | uint32_t txd_cmd; | 272 | u32 txd_cmd; |
274 | uint32_t tx_int_delay; | 273 | u32 tx_int_delay; |
275 | uint32_t tx_abs_int_delay; | 274 | u32 tx_abs_int_delay; |
276 | uint32_t gotcl; | 275 | u32 gotcl; |
277 | uint64_t gotcl_old; | 276 | u64 gotcl_old; |
278 | uint64_t tpt_old; | 277 | u64 tpt_old; |
279 | uint64_t colc_old; | 278 | u64 colc_old; |
280 | uint32_t tx_timeout_count; | 279 | u32 tx_timeout_count; |
281 | uint32_t tx_fifo_head; | 280 | u32 tx_fifo_head; |
282 | uint32_t tx_head_addr; | 281 | u32 tx_head_addr; |
283 | uint32_t tx_fifo_size; | 282 | u32 tx_fifo_size; |
284 | uint8_t tx_timeout_factor; | 283 | u8 tx_timeout_factor; |
285 | atomic_t tx_fifo_stall; | 284 | atomic_t tx_fifo_stall; |
286 | boolean_t pcix_82544; | 285 | bool pcix_82544; |
287 | boolean_t detect_tx_hung; | 286 | bool detect_tx_hung; |
288 | 287 | ||
289 | /* RX */ | 288 | /* RX */ |
290 | #ifdef CONFIG_E1000_NAPI | 289 | #ifdef CONFIG_E1000_NAPI |
291 | boolean_t (*clean_rx) (struct e1000_adapter *adapter, | 290 | bool (*clean_rx) (struct e1000_adapter *adapter, |
292 | struct e1000_rx_ring *rx_ring, | 291 | struct e1000_rx_ring *rx_ring, |
293 | int *work_done, int work_to_do); | 292 | int *work_done, int work_to_do); |
294 | #else | 293 | #else |
295 | boolean_t (*clean_rx) (struct e1000_adapter *adapter, | 294 | bool (*clean_rx) (struct e1000_adapter *adapter, |
296 | struct e1000_rx_ring *rx_ring); | 295 | struct e1000_rx_ring *rx_ring); |
297 | #endif | 296 | #endif |
298 | void (*alloc_rx_buf) (struct e1000_adapter *adapter, | 297 | void (*alloc_rx_buf) (struct e1000_adapter *adapter, |
299 | struct e1000_rx_ring *rx_ring, | 298 | struct e1000_rx_ring *rx_ring, |
@@ -306,17 +305,17 @@ struct e1000_adapter { | |||
306 | int num_tx_queues; | 305 | int num_tx_queues; |
307 | int num_rx_queues; | 306 | int num_rx_queues; |
308 | 307 | ||
309 | uint64_t hw_csum_err; | 308 | u64 hw_csum_err; |
310 | uint64_t hw_csum_good; | 309 | u64 hw_csum_good; |
311 | uint64_t rx_hdr_split; | 310 | u64 rx_hdr_split; |
312 | uint32_t alloc_rx_buff_failed; | 311 | u32 alloc_rx_buff_failed; |
313 | uint32_t rx_int_delay; | 312 | u32 rx_int_delay; |
314 | uint32_t rx_abs_int_delay; | 313 | u32 rx_abs_int_delay; |
315 | boolean_t rx_csum; | 314 | bool rx_csum; |
316 | unsigned int rx_ps_pages; | 315 | unsigned int rx_ps_pages; |
317 | uint32_t gorcl; | 316 | u32 gorcl; |
318 | uint64_t gorcl_old; | 317 | u64 gorcl_old; |
319 | uint16_t rx_ps_bsize0; | 318 | u16 rx_ps_bsize0; |
320 | 319 | ||
321 | 320 | ||
322 | /* OS defined structs */ | 321 | /* OS defined structs */ |
@@ -330,19 +329,19 @@ struct e1000_adapter { | |||
330 | struct e1000_phy_info phy_info; | 329 | struct e1000_phy_info phy_info; |
331 | struct e1000_phy_stats phy_stats; | 330 | struct e1000_phy_stats phy_stats; |
332 | 331 | ||
333 | uint32_t test_icr; | 332 | u32 test_icr; |
334 | struct e1000_tx_ring test_tx_ring; | 333 | struct e1000_tx_ring test_tx_ring; |
335 | struct e1000_rx_ring test_rx_ring; | 334 | struct e1000_rx_ring test_rx_ring; |
336 | 335 | ||
337 | int msg_enable; | 336 | int msg_enable; |
338 | boolean_t have_msi; | 337 | bool have_msi; |
339 | 338 | ||
340 | /* to not mess up cache alignment, always add to the bottom */ | 339 | /* to not mess up cache alignment, always add to the bottom */ |
341 | boolean_t tso_force; | 340 | bool tso_force; |
342 | boolean_t smart_power_down; /* phy smart power down */ | 341 | bool smart_power_down; /* phy smart power down */ |
343 | boolean_t quad_port_a; | 342 | bool quad_port_a; |
344 | unsigned long flags; | 343 | unsigned long flags; |
345 | uint32_t eeprom_wol; | 344 | u32 eeprom_wol; |
346 | }; | 345 | }; |
347 | 346 | ||
348 | enum e1000_state_t { | 347 | enum e1000_state_t { |