1 --- igb-5.3.2/src/igb_ptp.c~ 2015-05-26 23:59:51.000000000 +0200
2 +++ igb-5.3.2/src/igb_ptp.c 2015-06-29 08:05:18.930401431 +0200
6 static int igb_ptp_gettime64_82576(struct ptp_clock_info *ptp,
7 +#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
10 + struct timespec64 *ts64)
13 struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
18 static int igb_ptp_gettime64_i210(struct ptp_clock_info *ptp,
19 +#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
20 struct timespec *ts64)
22 + struct timespec64 *ts64)
25 struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
29 #ifdef HAVE_PTP_CLOCK_INFO_GETTIME64
30 static int igb_ptp_settime64_82576(struct ptp_clock_info *ptp,
31 +#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
32 const struct timespec *ts64)
34 + const struct timespec64 *ts64)
37 struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
42 static int igb_ptp_settime64_i210(struct ptp_clock_info *ptp,
43 +#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
44 const struct timespec *ts64)
46 + const struct timespec64 *ts64)
49 struct igb_adapter *igb = container_of(ptp, struct igb_adapter,
53 struct igb_adapter *igb =
54 container_of(work, struct igb_adapter, ptp_overflow_work.work);
55 +#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
58 + struct timespec64 ts;
61 igb_ptp_gettime64_82576(&igb->ptp_caps, &ts);
65 /* Initialize the clock and overflow work for devices that need it. */
66 if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) {
67 +#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
68 struct timespec ts = ktime_to_timespec(ktime_get_real());
70 + struct timespec64 ts = ktime_to_timespec64(ktime_get_real());
73 igb_ptp_settime64_i210(&adapter->ptp_caps, &ts);
75 @@ -1073,7 +1073,11 @@
77 /* Re-initialize the timer. */
78 if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) {
79 +#if ( LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) )
80 struct timespec ts = ktime_to_timespec(ktime_get_real());
82 + struct timespec64 ts = ktime_to_timespec64(ktime_get_real());
85 igb_ptp_settime64_i210(&adapter->ptp_caps, &ts);