]> git.proxmox.com Git - pve-kernel-jessie.git/blob - e1000e_4.10_compat.patch
buildsys: update make upload target for stretch
[pve-kernel-jessie.git] / e1000e_4.10_compat.patch
1 src/{netdev.c.orig => netdev.c} | 18 +++++++++---------
2 src/{ptp.c.orig => ptp.c} | 4 ++--
3 2 files changed, 11 insertions(+), 11 deletions(-)
4
5 diff --git a/src/netdev.c.orig b/src/netdev.c
6 index 73b0f9a..480265b 100644
7 --- a/src/netdev.c.orig
8 +++ b/src/netdev.c
9 @@ -4833,24 +4833,24 @@ void e1000e_reinit_locked(struct e1000_adapter *adapter)
10 /**
11 * e1000e_sanitize_systim - sanitize raw cycle counter reads
12 * @hw: pointer to the HW structure
13 - * @systim: cycle_t value read, sanitized and returned
14 + * @systim: u64 value read, sanitized and returned
15 *
16 * Errata for 82574/82583 possible bad bits read from SYSTIMH/L:
17 * check to see that the time is incrementing at a reasonable
18 * rate and is a multiple of incvalue.
19 **/
20 -static cycle_t e1000e_sanitize_systim(struct e1000_hw *hw, cycle_t systim)
21 +static u64 e1000e_sanitize_systim(struct e1000_hw *hw, u64 systim)
22 {
23 u64 time_delta, rem, temp;
24 - cycle_t systim_next;
25 + u64 systim_next;
26 u32 incvalue;
27 int i;
28
29 incvalue = er32(TIMINCA) & E1000_TIMINCA_INCVALUE_MASK;
30 for (i = 0; i < E1000_MAX_82574_SYSTIM_REREADS; i++) {
31 /* latch SYSTIMH on read of SYSTIML */
32 - systim_next = (cycle_t)er32(SYSTIML);
33 - systim_next |= (cycle_t)er32(SYSTIMH) << 32;
34 + systim_next = (u64)er32(SYSTIML);
35 + systim_next |= (u64)er32(SYSTIMH) << 32;
36
37 time_delta = systim_next - systim;
38 temp = time_delta;
39 @@ -4872,13 +4872,13 @@ static cycle_t e1000e_sanitize_systim(struct e1000_hw *hw, cycle_t systim)
40 * e1000e_cyclecounter_read - read raw cycle counter (used by time counter)
41 * @cc: cyclecounter structure
42 **/
43 -static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc)
44 +static u64 e1000e_cyclecounter_read(const struct cyclecounter *cc)
45 {
46 struct e1000_adapter *adapter = container_of(cc, struct e1000_adapter,
47 cc);
48 struct e1000_hw *hw = &adapter->hw;
49 u32 systimel, systimeh;
50 - cycle_t systim;
51 + u64 systim;
52 /* SYSTIMH latching upon SYSTIML read does not work well.
53 * This means that if SYSTIML overflows after we read it but before
54 * we read SYSTIMH, the value of SYSTIMH has been incremented and we
55 @@ -4899,8 +4899,8 @@ static cycle_t e1000e_cyclecounter_read(const struct cyclecounter *cc)
56 systimel = systimel_2;
57 }
58 }
59 - systim = (cycle_t)systimel;
60 - systim |= (cycle_t)systimeh << 32;
61 + systim = (u64)systimel;
62 + systim |= (u64)systimeh << 32;
63
64 if (adapter->flags2 & FLAG2_CHECK_SYSTIM_OVERFLOW)
65 systim = e1000e_sanitize_systim(hw, systim);
66
67 diff --git a/src/ptp.c.orig b/src/ptp.c
68 index 00c419f..228adce 100644
69 --- a/src/ptp.c.orig
70 +++ b/src/ptp.c
71 @@ -136,8 +136,8 @@ static int e1000e_phc_get_syncdevicetime(ktime_t * device,
72 unsigned long flags;
73 int i;
74 u32 tsync_ctrl;
75 - cycle_t dev_cycles;
76 - cycle_t sys_cycles;
77 + u64 dev_cycles;
78 + u64 sys_cycles;
79
80 tsync_ctrl = er32(TSYNCTXCTL);
81 tsync_ctrl |= E1000_TSYNCTXCTL_START_SYNC |