diff options
Diffstat (limited to 'drivers/net/e1000/e1000.h')
| -rw-r--r-- | drivers/net/e1000/e1000.h | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h index 99baf0e099fc..281de41d030a 100644 --- a/drivers/net/e1000/e1000.h +++ b/drivers/net/e1000/e1000.h | |||
| @@ -83,10 +83,6 @@ | |||
| 83 | struct e1000_adapter; | 83 | struct e1000_adapter; |
| 84 | 84 | ||
| 85 | #include "e1000_hw.h" | 85 | #include "e1000_hw.h" |
| 86 | #ifdef CONFIG_E1000_MQ | ||
| 87 | #include <linux/cpu.h> | ||
| 88 | #include <linux/smp.h> | ||
| 89 | #endif | ||
| 90 | 86 | ||
| 91 | #ifdef DBG | 87 | #ifdef DBG |
| 92 | #define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args) | 88 | #define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args) |
| @@ -169,12 +165,6 @@ struct e1000_buffer { | |||
| 169 | uint16_t next_to_watch; | 165 | uint16_t next_to_watch; |
| 170 | }; | 166 | }; |
| 171 | 167 | ||
| 172 | #ifdef CONFIG_E1000_MQ | ||
| 173 | struct e1000_queue_stats { | ||
| 174 | uint64_t packets; | ||
| 175 | uint64_t bytes; | ||
| 176 | }; | ||
| 177 | #endif | ||
| 178 | 168 | ||
| 179 | struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; | 169 | struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; |
| 180 | struct e1000_ps_page_dma { uint64_t ps_page_dma[PS_PAGE_BUFFERS]; }; | 170 | struct e1000_ps_page_dma { uint64_t ps_page_dma[PS_PAGE_BUFFERS]; }; |
| @@ -198,12 +188,7 @@ struct e1000_tx_ring { | |||
| 198 | spinlock_t tx_lock; | 188 | spinlock_t tx_lock; |
| 199 | uint16_t tdh; | 189 | uint16_t tdh; |
| 200 | uint16_t tdt; | 190 | uint16_t tdt; |
| 201 | |||
| 202 | boolean_t last_tx_tso; | 191 | boolean_t last_tx_tso; |
| 203 | |||
| 204 | #ifdef CONFIG_E1000_MQ | ||
| 205 | struct e1000_queue_stats tx_stats; | ||
| 206 | #endif | ||
| 207 | }; | 192 | }; |
| 208 | 193 | ||
| 209 | struct e1000_rx_ring { | 194 | struct e1000_rx_ring { |
| @@ -230,9 +215,6 @@ struct e1000_rx_ring { | |||
| 230 | 215 | ||
| 231 | uint16_t rdh; | 216 | uint16_t rdh; |
| 232 | uint16_t rdt; | 217 | uint16_t rdt; |
| 233 | #ifdef CONFIG_E1000_MQ | ||
| 234 | struct e1000_queue_stats rx_stats; | ||
| 235 | #endif | ||
| 236 | }; | 218 | }; |
| 237 | 219 | ||
| 238 | #define E1000_DESC_UNUSED(R) \ | 220 | #define E1000_DESC_UNUSED(R) \ |
| @@ -260,6 +242,7 @@ struct e1000_adapter { | |||
| 260 | uint32_t rx_buffer_len; | 242 | uint32_t rx_buffer_len; |
| 261 | uint32_t part_num; | 243 | uint32_t part_num; |
| 262 | uint32_t wol; | 244 | uint32_t wol; |
| 245 | uint32_t ksp3_port_a; | ||
| 263 | uint32_t smartspeed; | 246 | uint32_t smartspeed; |
| 264 | uint32_t en_mng_pt; | 247 | uint32_t en_mng_pt; |
| 265 | uint16_t link_speed; | 248 | uint16_t link_speed; |
| @@ -269,8 +252,8 @@ struct e1000_adapter { | |||
| 269 | spinlock_t tx_queue_lock; | 252 | spinlock_t tx_queue_lock; |
| 270 | #endif | 253 | #endif |
| 271 | atomic_t irq_sem; | 254 | atomic_t irq_sem; |
| 272 | struct work_struct tx_timeout_task; | ||
| 273 | struct work_struct watchdog_task; | 255 | struct work_struct watchdog_task; |
| 256 | struct work_struct reset_task; | ||
| 274 | uint8_t fc_autoneg; | 257 | uint8_t fc_autoneg; |
| 275 | 258 | ||
| 276 | struct timer_list blink_timer; | 259 | struct timer_list blink_timer; |
| @@ -278,9 +261,6 @@ struct e1000_adapter { | |||
| 278 | 261 | ||
| 279 | /* TX */ | 262 | /* TX */ |
| 280 | struct e1000_tx_ring *tx_ring; /* One per active queue */ | 263 | struct e1000_tx_ring *tx_ring; /* One per active queue */ |
| 281 | #ifdef CONFIG_E1000_MQ | ||
| 282 | struct e1000_tx_ring **cpu_tx_ring; /* per-cpu */ | ||
| 283 | #endif | ||
| 284 | unsigned long tx_queue_len; | 264 | unsigned long tx_queue_len; |
| 285 | uint32_t txd_cmd; | 265 | uint32_t txd_cmd; |
| 286 | uint32_t tx_int_delay; | 266 | uint32_t tx_int_delay; |
| @@ -301,24 +281,19 @@ struct e1000_adapter { | |||
| 301 | /* RX */ | 281 | /* RX */ |
| 302 | #ifdef CONFIG_E1000_NAPI | 282 | #ifdef CONFIG_E1000_NAPI |
| 303 | boolean_t (*clean_rx) (struct e1000_adapter *adapter, | 283 | boolean_t (*clean_rx) (struct e1000_adapter *adapter, |
| 304 | struct e1000_rx_ring *rx_ring, | 284 | struct e1000_rx_ring *rx_ring, |
| 305 | int *work_done, int work_to_do); | 285 | int *work_done, int work_to_do); |
| 306 | #else | 286 | #else |
| 307 | boolean_t (*clean_rx) (struct e1000_adapter *adapter, | 287 | boolean_t (*clean_rx) (struct e1000_adapter *adapter, |
| 308 | struct e1000_rx_ring *rx_ring); | 288 | struct e1000_rx_ring *rx_ring); |
| 309 | #endif | 289 | #endif |
| 310 | void (*alloc_rx_buf) (struct e1000_adapter *adapter, | 290 | void (*alloc_rx_buf) (struct e1000_adapter *adapter, |
| 311 | struct e1000_rx_ring *rx_ring, | 291 | struct e1000_rx_ring *rx_ring, |
| 312 | int cleaned_count); | 292 | int cleaned_count); |
| 313 | struct e1000_rx_ring *rx_ring; /* One per active queue */ | 293 | struct e1000_rx_ring *rx_ring; /* One per active queue */ |
| 314 | #ifdef CONFIG_E1000_NAPI | 294 | #ifdef CONFIG_E1000_NAPI |
| 315 | struct net_device *polling_netdev; /* One per active queue */ | 295 | struct net_device *polling_netdev; /* One per active queue */ |
| 316 | #endif | 296 | #endif |
| 317 | #ifdef CONFIG_E1000_MQ | ||
| 318 | struct net_device **cpu_netdev; /* per-cpu */ | ||
| 319 | struct call_async_data_struct rx_sched_call_data; | ||
| 320 | cpumask_t cpumask; | ||
| 321 | #endif | ||
| 322 | int num_tx_queues; | 297 | int num_tx_queues; |
| 323 | int num_rx_queues; | 298 | int num_rx_queues; |
| 324 | 299 | ||
| @@ -353,10 +328,37 @@ struct e1000_adapter { | |||
| 353 | struct e1000_rx_ring test_rx_ring; | 328 | struct e1000_rx_ring test_rx_ring; |
| 354 | 329 | ||
| 355 | 330 | ||
| 356 | u32 *config_space; | 331 | uint32_t *config_space; |
| 357 | int msg_enable; | 332 | int msg_enable; |
| 358 | #ifdef CONFIG_PCI_MSI | 333 | #ifdef CONFIG_PCI_MSI |
| 359 | boolean_t have_msi; | 334 | boolean_t have_msi; |
| 360 | #endif | 335 | #endif |
| 336 | /* to not mess up cache alignment, always add to the bottom */ | ||
| 337 | boolean_t txb2b; | ||
| 338 | #ifdef NETIF_F_TSO | ||
| 339 | boolean_t tso_force; | ||
| 340 | #endif | ||
| 361 | }; | 341 | }; |
| 342 | |||
| 343 | |||
| 344 | /* e1000_main.c */ | ||
| 345 | extern char e1000_driver_name[]; | ||
| 346 | extern char e1000_driver_version[]; | ||
| 347 | int e1000_up(struct e1000_adapter *adapter); | ||
| 348 | void e1000_down(struct e1000_adapter *adapter); | ||
| 349 | void e1000_reset(struct e1000_adapter *adapter); | ||
| 350 | int e1000_setup_all_tx_resources(struct e1000_adapter *adapter); | ||
| 351 | void e1000_free_all_tx_resources(struct e1000_adapter *adapter); | ||
| 352 | int e1000_setup_all_rx_resources(struct e1000_adapter *adapter); | ||
| 353 | void e1000_free_all_rx_resources(struct e1000_adapter *adapter); | ||
| 354 | void e1000_update_stats(struct e1000_adapter *adapter); | ||
| 355 | int e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx); | ||
| 356 | |||
| 357 | /* e1000_ethtool.c */ | ||
| 358 | void e1000_set_ethtool_ops(struct net_device *netdev); | ||
| 359 | |||
| 360 | /* e1000_param.c */ | ||
| 361 | void e1000_check_options(struct e1000_adapter *adapter); | ||
| 362 | |||
| 363 | |||
| 362 | #endif /* _E1000_H_ */ | 364 | #endif /* _E1000_H_ */ |
