kernel: bump 4.9 to 4.9.75
[openwrt/openwrt.git] / target / linux / mvebu / patches-4.9 / 420-net-mvneta-disable-MVNETA_CAUSE_PSC_SYNC_CHANGE-inte.patch
1 From: Russell King <rmk+kernel@armlinux.org.uk>
2 Date: Sat, 24 Dec 2016 10:27:08 +0000
3 Subject: [PATCH] net: mvneta: disable MVNETA_CAUSE_PSC_SYNC_CHANGE
4 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
13 --- a/drivers/net/ethernet/marvell/mvneta.c
14 +++ b/drivers/net/ethernet/marvell/mvneta.c
15 @@ -2630,9 +2630,11 @@ static int mvneta_poll(struct napi_struc
16 mvreg_write(pp, MVNETA_INTR_MISC_CAUSE, 0);
17
18 if (cause_misc & (MVNETA_CAUSE_PHY_STATUS_CHANGE |
19 - MVNETA_CAUSE_LINK_CHANGE |
20 - MVNETA_CAUSE_PSC_SYNC_CHANGE))
21 + MVNETA_CAUSE_LINK_CHANGE)) {
22 + printk(KERN_DEBUG "%s: cause 0x%08x:0x%08x\n",
23 + __func__, cause_rx_tx, cause_misc);
24 mvneta_link_change(pp);
25 + }
26 }
27
28 /* Release Tx descriptors */
29 @@ -2947,8 +2949,7 @@ static void mvneta_start_dev(struct mvne
30
31 mvreg_write(pp, MVNETA_INTR_MISC_MASK,
32 MVNETA_CAUSE_PHY_STATUS_CHANGE |
33 - MVNETA_CAUSE_LINK_CHANGE |
34 - MVNETA_CAUSE_PSC_SYNC_CHANGE);
35 + MVNETA_CAUSE_LINK_CHANGE);
36
37 phylink_start(pp->phylink);
38 netif_tx_start_all_queues(pp->dev);
39 @@ -3439,8 +3440,7 @@ static int mvneta_cpu_online(unsigned in
40 on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true);
41 mvreg_write(pp, MVNETA_INTR_MISC_MASK,
42 MVNETA_CAUSE_PHY_STATUS_CHANGE |
43 - MVNETA_CAUSE_LINK_CHANGE |
44 - MVNETA_CAUSE_PSC_SYNC_CHANGE);
45 + MVNETA_CAUSE_LINK_CHANGE);
46 netif_tx_start_all_queues(pp->dev);
47 spin_unlock(&pp->lock);
48 return 0;
49 @@ -3481,8 +3481,7 @@ static int mvneta_cpu_dead(unsigned int
50 on_each_cpu(mvneta_percpu_unmask_interrupt, pp, true);
51 mvreg_write(pp, MVNETA_INTR_MISC_MASK,
52 MVNETA_CAUSE_PHY_STATUS_CHANGE |
53 - MVNETA_CAUSE_LINK_CHANGE |
54 - MVNETA_CAUSE_PSC_SYNC_CHANGE);
55 + MVNETA_CAUSE_LINK_CHANGE);
56 netif_tx_start_all_queues(pp->dev);
57 return 0;
58 }