@@ -1708,10 +1708,8 @@ void igb_reset(struct igb_adapter *adapter)
17081708 /* Enable h/w to recognize an 802.1Q VLAN Ethernet packet */
17091709 wr32 (E1000_VET , ETHERNET_IEEE_VLAN_TYPE );
17101710
1711- #ifdef CONFIG_IGB_PTP
17121711 /* Re-enable PTP, where applicable. */
17131712 igb_ptp_reset (adapter );
1714- #endif /* CONFIG_IGB_PTP */
17151713
17161714 igb_get_phy_info (hw );
17171715}
@@ -2119,10 +2117,8 @@ static int __devinit igb_probe(struct pci_dev *pdev,
21192117
21202118#endif
21212119
2122- #ifdef CONFIG_IGB_PTP
21232120 /* do hw tstamp init after resetting */
21242121 igb_ptp_init (adapter );
2125- #endif /* CONFIG_IGB_PTP */
21262122
21272123 dev_info (& pdev -> dev , "Intel(R) Gigabit Ethernet Network Connection\n" );
21282124 /* print bus type/speed/width info */
@@ -2197,9 +2193,7 @@ static void __devexit igb_remove(struct pci_dev *pdev)
21972193 struct e1000_hw * hw = & adapter -> hw ;
21982194
21992195 pm_runtime_get_noresume (& pdev -> dev );
2200- #ifdef CONFIG_IGB_PTP
22012196 igb_ptp_stop (adapter );
2202- #endif /* CONFIG_IGB_PTP */
22032197
22042198 /*
22052199 * The watchdog timer may be rescheduled, so explicitly
@@ -3095,10 +3089,8 @@ void igb_configure_rx_ring(struct igb_adapter *adapter,
30953089 srrctl = IGB_RX_HDR_LEN << E1000_SRRCTL_BSIZEHDRSIZE_SHIFT ;
30963090 srrctl |= IGB_RX_BUFSZ >> E1000_SRRCTL_BSIZEPKT_SHIFT ;
30973091 srrctl |= E1000_SRRCTL_DESCTYPE_ADV_ONEBUF ;
3098- #ifdef CONFIG_IGB_PTP
30993092 if (hw -> mac .type >= e1000_82580 )
31003093 srrctl |= E1000_SRRCTL_TIMESTAMP ;
3101- #endif /* CONFIG_IGB_PTP */
31023094 /* Only set Drop Enable if we are supporting multiple queues */
31033095 if (adapter -> vfs_allocated_count || adapter -> num_rx_queues > 1 )
31043096 srrctl |= E1000_SRRCTL_DROP_EN ;
@@ -4134,11 +4126,9 @@ static __le32 igb_tx_cmd_type(u32 tx_flags)
41344126 if (tx_flags & IGB_TX_FLAGS_VLAN )
41354127 cmd_type |= cpu_to_le32 (E1000_ADVTXD_DCMD_VLE );
41364128
4137- #ifdef CONFIG_IGB_PTP
41384129 /* set timestamp bit if present */
41394130 if (unlikely (tx_flags & IGB_TX_FLAGS_TSTAMP ))
41404131 cmd_type |= cpu_to_le32 (E1000_ADVTXD_MAC_TSTAMP );
4141- #endif /* CONFIG_IGB_PTP */
41424132
41434133 /* set segmentation bits for TSO */
41444134 if (tx_flags & IGB_TX_FLAGS_TSO )
@@ -4347,9 +4337,7 @@ static inline int igb_maybe_stop_tx(struct igb_ring *tx_ring, const u16 size)
43474337netdev_tx_t igb_xmit_frame_ring (struct sk_buff * skb ,
43484338 struct igb_ring * tx_ring )
43494339{
4350- #ifdef CONFIG_IGB_PTP
43514340 struct igb_adapter * adapter = netdev_priv (tx_ring -> netdev );
4352- #endif /* CONFIG_IGB_PTP */
43534341 struct igb_tx_buffer * first ;
43544342 int tso ;
43554343 u32 tx_flags = 0 ;
@@ -4372,7 +4360,6 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
43724360 first -> bytecount = skb -> len ;
43734361 first -> gso_segs = 1 ;
43744362
4375- #ifdef CONFIG_IGB_PTP
43764363 if (unlikely ((skb_shinfo (skb )-> tx_flags & SKBTX_HW_TSTAMP ) &&
43774364 !(adapter -> ptp_tx_skb ))) {
43784365 skb_shinfo (skb )-> tx_flags |= SKBTX_IN_PROGRESS ;
@@ -4382,7 +4369,6 @@ netdev_tx_t igb_xmit_frame_ring(struct sk_buff *skb,
43824369 if (adapter -> hw .mac .type == e1000_82576 )
43834370 schedule_work (& adapter -> ptp_tx_work );
43844371 }
4385- #endif /* CONFIG_IGB_PTP */
43864372
43874373 if (vlan_tx_tag_present (skb )) {
43884374 tx_flags |= IGB_TX_FLAGS_VLAN ;
@@ -4776,7 +4762,6 @@ static irqreturn_t igb_msix_other(int irq, void *data)
47764762 mod_timer (& adapter -> watchdog_timer , jiffies + 1 );
47774763 }
47784764
4779- #ifdef CONFIG_IGB_PTP
47804765 if (icr & E1000_ICR_TS ) {
47814766 u32 tsicr = rd32 (E1000_TSICR );
47824767
@@ -4787,7 +4772,6 @@ static irqreturn_t igb_msix_other(int irq, void *data)
47874772 schedule_work (& adapter -> ptp_tx_work );
47884773 }
47894774 }
4790- #endif /* CONFIG_IGB_PTP */
47914775
47924776 wr32 (E1000_EIMS , adapter -> eims_other );
47934777
@@ -5539,7 +5523,6 @@ static irqreturn_t igb_intr_msi(int irq, void *data)
55395523 mod_timer (& adapter -> watchdog_timer , jiffies + 1 );
55405524 }
55415525
5542- #ifdef CONFIG_IGB_PTP
55435526 if (icr & E1000_ICR_TS ) {
55445527 u32 tsicr = rd32 (E1000_TSICR );
55455528
@@ -5550,7 +5533,6 @@ static irqreturn_t igb_intr_msi(int irq, void *data)
55505533 schedule_work (& adapter -> ptp_tx_work );
55515534 }
55525535 }
5553- #endif /* CONFIG_IGB_PTP */
55545536
55555537 napi_schedule (& q_vector -> napi );
55565538
@@ -5593,7 +5575,6 @@ static irqreturn_t igb_intr(int irq, void *data)
55935575 mod_timer (& adapter -> watchdog_timer , jiffies + 1 );
55945576 }
55955577
5596- #ifdef CONFIG_IGB_PTP
55975578 if (icr & E1000_ICR_TS ) {
55985579 u32 tsicr = rd32 (E1000_TSICR );
55995580
@@ -5604,7 +5585,6 @@ static irqreturn_t igb_intr(int irq, void *data)
56045585 schedule_work (& adapter -> ptp_tx_work );
56055586 }
56065587 }
5607- #endif /* CONFIG_IGB_PTP */
56085588
56095589 napi_schedule (& q_vector -> napi );
56105590
@@ -5889,14 +5869,12 @@ static bool igb_add_rx_frag(struct igb_ring *rx_ring,
58895869 if ((size <= IGB_RX_HDR_LEN ) && !skb_is_nonlinear (skb )) {
58905870 unsigned char * va = page_address (page ) + rx_buffer -> page_offset ;
58915871
5892- #ifdef CONFIG_IGB_PTP
58935872 if (igb_test_staterr (rx_desc , E1000_RXDADV_STAT_TSIP )) {
58945873 igb_ptp_rx_pktstamp (rx_ring -> q_vector , va , skb );
58955874 va += IGB_TS_HDR_LEN ;
58965875 size -= IGB_TS_HDR_LEN ;
58975876 }
58985877
5899- #endif
59005878 memcpy (__skb_put (skb , size ), va , ALIGN (size , sizeof (long )));
59015879
59025880 /* we can reuse buffer as-is, just make sure it is local */
@@ -6221,7 +6199,6 @@ static void igb_pull_tail(struct igb_ring *rx_ring,
62216199 */
62226200 va = skb_frag_address (frag );
62236201
6224- #ifdef CONFIG_IGB_PTP
62256202 if (igb_test_staterr (rx_desc , E1000_RXDADV_STAT_TSIP )) {
62266203 /* retrieve timestamp from buffer */
62276204 igb_ptp_rx_pktstamp (rx_ring -> q_vector , va , skb );
@@ -6236,7 +6213,6 @@ static void igb_pull_tail(struct igb_ring *rx_ring,
62366213 va += IGB_TS_HDR_LEN ;
62376214 }
62386215
6239- #endif
62406216 /*
62416217 * we need the header to contain the greater of either ETH_HLEN or
62426218 * 60 bytes if the skb->len is less than 60 for skb_pad.
@@ -6317,9 +6293,7 @@ static void igb_process_skb_fields(struct igb_ring *rx_ring,
63176293
63186294 igb_rx_checksum (rx_ring , rx_desc , skb );
63196295
6320- #ifdef CONFIG_IGB_PTP
63216296 igb_ptp_rx_hwtstamp (rx_ring -> q_vector , rx_desc , skb );
6322- #endif /* CONFIG_IGB_PTP */
63236297
63246298 if ((dev -> features & NETIF_F_HW_VLAN_RX ) &&
63256299 igb_test_staterr (rx_desc , E1000_RXD_STAT_VP )) {
@@ -6553,10 +6527,8 @@ static int igb_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
65536527 case SIOCGMIIREG :
65546528 case SIOCSMIIREG :
65556529 return igb_mii_ioctl (netdev , ifr , cmd );
6556- #ifdef CONFIG_IGB_PTP
65576530 case SIOCSHWTSTAMP :
65586531 return igb_ptp_hwtstamp_ioctl (netdev , ifr , cmd );
6559- #endif /* CONFIG_IGB_PTP */
65606532 default :
65616533 return - EOPNOTSUPP ;
65626534 }
0 commit comments