mvebu: Add support for kernel 4.14
[openwrt/openwrt.git] / target / linux / mvebu / patches-4.14 / 405-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch
1 From fde9e742a47606110232b7464608b6f9c0510938 Mon Sep 17 00:00:00 2001
2 From: Russell King <rmk+kernel@armlinux.org.uk>
3 Date: Sat, 24 Dec 2016 10:27:08 +0000
4 Subject: net: mvneta: disable MVNETA_CAUSE_PSC_SYNC_CHANGE interrupt
5
6 The PSC sync change interrupt can fire multiple times while the link is
7 down. As this isn't information we make use of, it's pointless having
8 the interrupt enabled, so let's disable this interrupt.
9
10 Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
11 ---
12 drivers/net/ethernet/marvell/mvneta.c | 12 ++++--------
13 1 file changed, 4 insertions(+), 8 deletions(-)
14
15 --- a/drivers/net/ethernet/marvell/mvneta.c
16 +++ b/drivers/net/ethernet/marvell/mvneta.c
17 @@ -2704,8 +2704,7 @@ static int mvneta_poll(struct napi_struc
18 mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0);
19
20 if (cause_misc & (MVNETA_CAUSE_PHY_STATUS_CHANGE |
21 - MVNETA_CAUSE_LINK_CHANGE |
22 - MVNETA_CAUSE_PSC_SYNC_CHANGE))
23 + MVNETA_CAUSE_LINK_CHANGE))
24 mvneta_link_change(pp);
25 }
26
27 @@ -3044,8 +3043,7 @@ static void mvneta_start_dev(struct mvne
28
29 mvreg_write(pp, MVNETA_INTR_MISC_MASK,
30 MVNETA_CAUSE_PHY_STATUS_CHANGE |
31 - MVNETA_CAUSE_LINK_CHANGE |
32 - MVNETA_CAUSE_PSC_SYNC_CHANGE);
33 + MVNETA_CAUSE_LINK_CHANGE);
34
35 phylink_start(pp->phylink);
36 netif_tx_start_all_queues(pp->dev);
37 @@ -3542,8 +3540,7 @@ static int mvneta_cpu_online(unsigned in
38 on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true);
39 mvreg_write(pp, MVNETA_INTR_MISC_MASK,
40 MVNETA_CAUSE_PHY_STATUS_CHANGE |
41 - MVNETA_CAUSE_LINK_CHANGE |
42 - MVNETA_CAUSE_PSC_SYNC_CHANGE);
43 + MVNETA_CAUSE_LINK_CHANGE);
44 netif_tx_start_all_queues(pp->dev);
45 spin_unlock(&pp->lock);
46 return 0;
47 @@ -3584,8 +3581,7 @@ static int mvneta_cpu_dead(unsigned int
48 on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true);
49 mvreg_write(pp, MVNETA_INTR_MISC_MASK,
50 MVNETA_CAUSE_PHY_STATUS_CHANGE |
51 - MVNETA_CAUSE_LINK_CHANGE |
52 - MVNETA_CAUSE_PSC_SYNC_CHANGE);
53 + MVNETA_CAUSE_LINK_CHANGE);
54 netif_tx_start_all_queues(pp->dev);
55 return 0;
56 }