diff options
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb.h')
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb.h | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h index 9e572dd29ab2..8aad230c0592 100644 --- a/drivers/net/ethernet/intel/igb/igb.h +++ b/drivers/net/ethernet/intel/igb/igb.h | |||
@@ -34,9 +34,11 @@ | |||
34 | #include "e1000_mac.h" | 34 | #include "e1000_mac.h" |
35 | #include "e1000_82575.h" | 35 | #include "e1000_82575.h" |
36 | 36 | ||
37 | #ifdef CONFIG_IGB_PTP | ||
37 | #include <linux/clocksource.h> | 38 | #include <linux/clocksource.h> |
38 | #include <linux/net_tstamp.h> | 39 | #include <linux/net_tstamp.h> |
39 | #include <linux/ptp_clock_kernel.h> | 40 | #include <linux/ptp_clock_kernel.h> |
41 | #endif /* CONFIG_IGB_PTP */ | ||
40 | #include <linux/bitops.h> | 42 | #include <linux/bitops.h> |
41 | #include <linux/if_vlan.h> | 43 | #include <linux/if_vlan.h> |
42 | 44 | ||
@@ -99,7 +101,6 @@ struct vf_data_storage { | |||
99 | u16 pf_vlan; /* When set, guest VLAN config not allowed. */ | 101 | u16 pf_vlan; /* When set, guest VLAN config not allowed. */ |
100 | u16 pf_qos; | 102 | u16 pf_qos; |
101 | u16 tx_rate; | 103 | u16 tx_rate; |
102 | struct pci_dev *vfdev; | ||
103 | }; | 104 | }; |
104 | 105 | ||
105 | #define IGB_VF_FLAG_CTS 0x00000001 /* VF is clear to send data */ | 106 | #define IGB_VF_FLAG_CTS 0x00000001 /* VF is clear to send data */ |
@@ -131,9 +132,9 @@ struct vf_data_storage { | |||
131 | #define MAXIMUM_ETHERNET_VLAN_SIZE 1522 | 132 | #define MAXIMUM_ETHERNET_VLAN_SIZE 1522 |
132 | 133 | ||
133 | /* Supported Rx Buffer Sizes */ | 134 | /* Supported Rx Buffer Sizes */ |
134 | #define IGB_RXBUFFER_512 512 | 135 | #define IGB_RXBUFFER_256 256 |
135 | #define IGB_RXBUFFER_16384 16384 | 136 | #define IGB_RXBUFFER_16384 16384 |
136 | #define IGB_RX_HDR_LEN IGB_RXBUFFER_512 | 137 | #define IGB_RX_HDR_LEN IGB_RXBUFFER_256 |
137 | 138 | ||
138 | /* How many Tx Descriptors do we need to call netif_wake_queue ? */ | 139 | /* How many Tx Descriptors do we need to call netif_wake_queue ? */ |
139 | #define IGB_TX_QUEUE_WAKE 16 | 140 | #define IGB_TX_QUEUE_WAKE 16 |
@@ -167,8 +168,8 @@ struct igb_tx_buffer { | |||
167 | unsigned int bytecount; | 168 | unsigned int bytecount; |
168 | u16 gso_segs; | 169 | u16 gso_segs; |
169 | __be16 protocol; | 170 | __be16 protocol; |
170 | dma_addr_t dma; | 171 | DEFINE_DMA_UNMAP_ADDR(dma); |
171 | u32 length; | 172 | DEFINE_DMA_UNMAP_LEN(len); |
172 | u32 tx_flags; | 173 | u32 tx_flags; |
173 | }; | 174 | }; |
174 | 175 | ||
@@ -212,7 +213,6 @@ struct igb_q_vector { | |||
212 | struct igb_ring_container rx, tx; | 213 | struct igb_ring_container rx, tx; |
213 | 214 | ||
214 | struct napi_struct napi; | 215 | struct napi_struct napi; |
215 | int numa_node; | ||
216 | 216 | ||
217 | u16 itr_val; | 217 | u16 itr_val; |
218 | u8 set_itr; | 218 | u8 set_itr; |
@@ -257,7 +257,6 @@ struct igb_ring { | |||
257 | }; | 257 | }; |
258 | /* Items past this point are only used during ring alloc / free */ | 258 | /* Items past this point are only used during ring alloc / free */ |
259 | dma_addr_t dma; /* phys address of the ring */ | 259 | dma_addr_t dma; /* phys address of the ring */ |
260 | int numa_node; /* node to alloc ring memory on */ | ||
261 | }; | 260 | }; |
262 | 261 | ||
263 | enum e1000_ring_flags_t { | 262 | enum e1000_ring_flags_t { |
@@ -342,7 +341,6 @@ struct igb_adapter { | |||
342 | 341 | ||
343 | /* OS defined structs */ | 342 | /* OS defined structs */ |
344 | struct pci_dev *pdev; | 343 | struct pci_dev *pdev; |
345 | struct hwtstamp_config hwtstamp_config; | ||
346 | 344 | ||
347 | spinlock_t stats64_lock; | 345 | spinlock_t stats64_lock; |
348 | struct rtnl_link_stats64 stats64; | 346 | struct rtnl_link_stats64 stats64; |
@@ -373,15 +371,19 @@ struct igb_adapter { | |||
373 | int vf_rate_link_speed; | 371 | int vf_rate_link_speed; |
374 | u32 rss_queues; | 372 | u32 rss_queues; |
375 | u32 wvbr; | 373 | u32 wvbr; |
376 | int node; | ||
377 | u32 *shadow_vfta; | 374 | u32 *shadow_vfta; |
378 | 375 | ||
376 | #ifdef CONFIG_IGB_PTP | ||
379 | struct ptp_clock *ptp_clock; | 377 | struct ptp_clock *ptp_clock; |
380 | struct ptp_clock_info caps; | 378 | struct ptp_clock_info ptp_caps; |
381 | struct delayed_work overflow_work; | 379 | struct delayed_work ptp_overflow_work; |
380 | struct work_struct ptp_tx_work; | ||
381 | struct sk_buff *ptp_tx_skb; | ||
382 | spinlock_t tmreg_lock; | 382 | spinlock_t tmreg_lock; |
383 | struct cyclecounter cc; | 383 | struct cyclecounter cc; |
384 | struct timecounter tc; | 384 | struct timecounter tc; |
385 | #endif /* CONFIG_IGB_PTP */ | ||
386 | |||
385 | char fw_version[32]; | 387 | char fw_version[32]; |
386 | }; | 388 | }; |
387 | 389 | ||
@@ -390,6 +392,7 @@ struct igb_adapter { | |||
390 | #define IGB_FLAG_QUAD_PORT_A (1 << 2) | 392 | #define IGB_FLAG_QUAD_PORT_A (1 << 2) |
391 | #define IGB_FLAG_QUEUE_PAIRS (1 << 3) | 393 | #define IGB_FLAG_QUEUE_PAIRS (1 << 3) |
392 | #define IGB_FLAG_DMAC (1 << 4) | 394 | #define IGB_FLAG_DMAC (1 << 4) |
395 | #define IGB_FLAG_PTP (1 << 5) | ||
393 | 396 | ||
394 | /* DMA Coalescing defines */ | 397 | /* DMA Coalescing defines */ |
395 | #define IGB_MIN_TXPBSIZE 20408 | 398 | #define IGB_MIN_TXPBSIZE 20408 |
@@ -435,13 +438,17 @@ extern void igb_power_up_link(struct igb_adapter *); | |||
435 | extern void igb_set_fw_version(struct igb_adapter *); | 438 | extern void igb_set_fw_version(struct igb_adapter *); |
436 | #ifdef CONFIG_IGB_PTP | 439 | #ifdef CONFIG_IGB_PTP |
437 | extern void igb_ptp_init(struct igb_adapter *adapter); | 440 | extern void igb_ptp_init(struct igb_adapter *adapter); |
438 | extern void igb_ptp_remove(struct igb_adapter *adapter); | 441 | extern void igb_ptp_stop(struct igb_adapter *adapter); |
439 | 442 | extern void igb_ptp_reset(struct igb_adapter *adapter); | |
440 | extern void igb_systim_to_hwtstamp(struct igb_adapter *adapter, | 443 | extern void igb_ptp_tx_work(struct work_struct *work); |
441 | struct skb_shared_hwtstamps *hwtstamps, | 444 | extern void igb_ptp_tx_hwtstamp(struct igb_adapter *adapter); |
442 | u64 systim); | 445 | extern void igb_ptp_rx_hwtstamp(struct igb_q_vector *q_vector, |
446 | union e1000_adv_rx_desc *rx_desc, | ||
447 | struct sk_buff *skb); | ||
448 | extern int igb_ptp_hwtstamp_ioctl(struct net_device *netdev, | ||
449 | struct ifreq *ifr, int cmd); | ||
450 | #endif /* CONFIG_IGB_PTP */ | ||
443 | 451 | ||
444 | #endif | ||
445 | static inline s32 igb_reset_phy(struct e1000_hw *hw) | 452 | static inline s32 igb_reset_phy(struct e1000_hw *hw) |
446 | { | 453 | { |
447 | if (hw->phy.ops.reset) | 454 | if (hw->phy.ops.reset) |