2800e6f8d836e239c2c711f7d42ee5207cb3793b
[openwrt/staging/xback.git] /
1 From patchwork Mon Mar 5 21:40:26 2018
2 Content-Type: text/plain; charset="utf-8"
3 MIME-Version: 1.0
4 Content-Transfer-Encoding: 7bit
5 Subject: [net, v2,
6 2/6] Partial revert "e1000e: Avoid receiver overrun interrupt bursts"
7 X-Patchwork-Submitter: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>
8 X-Patchwork-Id: 881769
9 X-Patchwork-Delegate: davem@davemloft.net
10 Message-Id: <20180305214030.25141-3-jeffrey.t.kirsher@intel.com>
11 To: davem@davemloft.net
12 Cc: Benjamin Poirier <bpoirier@suse.com>, netdev@vger.kernel.org,
13 nhorman@redhat.com, sassmann@redhat.com, jogreene@redhat.com,
14 Jeff Kirsher <jeffrey.t.kirsher@intel.com>
15 Date: Mon, 5 Mar 2018 13:40:26 -0800
16 From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
17 List-Id: <netdev.vger.kernel.org>
18
19 From: Benjamin Poirier <bpoirier@suse.com>
20
21 This partially reverts commit 4aea7a5c5e940c1723add439f4088844cd26196d.
22
23 We keep the fix for the first part of the problem (1) described in the log
24 of that commit, that is to read ICR in the other interrupt handler. We
25 remove the fix for the second part of the problem (2), Other interrupt
26 throttling.
27
28 Bursts of "Other" interrupts may once again occur during rxo (receive
29 overflow) traffic conditions. This is deemed acceptable in the interest of
30 avoiding unforeseen fallout from changes that are not strictly necessary.
31 As discussed, the e1000e driver should be in "maintenance mode".
32
33 Link: https://www.spinics.net/lists/netdev/msg480675.html
34 Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
35 Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
36 Tested-by: Aaron Brown <aaron.f.brown@intel.com>
37 Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
38 ---
39 drivers/net/ethernet/intel/e1000e/netdev.c | 16 ++--------------
40 1 file changed, 2 insertions(+), 14 deletions(-)
41
42 --- a/drivers/net/ethernet/intel/e1000e/netdev.c
43 +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
44 @@ -1911,21 +1911,10 @@ static irqreturn_t e1000_msix_other(int
45 struct e1000_adapter *adapter = netdev_priv(netdev);
46 struct e1000_hw *hw = &adapter->hw;
47 u32 icr;
48 - bool enable = true;
49
50 icr = er32(ICR);
51 ew32(ICR, E1000_ICR_OTHER);
52
53 - if (icr & E1000_ICR_RXO) {
54 - ew32(ICR, E1000_ICR_RXO);
55 - enable = false;
56 - /* napi poll will re-enable Other, make sure it runs */
57 - if (napi_schedule_prep(&adapter->napi)) {
58 - adapter->total_rx_bytes = 0;
59 - adapter->total_rx_packets = 0;
60 - __napi_schedule(&adapter->napi);
61 - }
62 - }
63 if (icr & E1000_ICR_LSC) {
64 ew32(ICR, E1000_ICR_LSC);
65 hw->mac.get_link_status = true;
66 @@ -1934,7 +1923,7 @@ static irqreturn_t e1000_msix_other(int
67 mod_timer(&adapter->watchdog_timer, jiffies + 1);
68 }
69
70 - if (enable && !test_bit(__E1000_DOWN, &adapter->state))
71 + if (!test_bit(__E1000_DOWN, &adapter->state))
72 ew32(IMS, E1000_IMS_OTHER);
73
74 return IRQ_HANDLED;
75 @@ -2704,8 +2693,7 @@ static int e1000e_poll(struct napi_struc
76 napi_complete_done(napi, work_done);
77 if (!test_bit(__E1000_DOWN, &adapter->state)) {
78 if (adapter->msix_entries)
79 - ew32(IMS, adapter->rx_ring->ims_val |
80 - E1000_IMS_OTHER);
81 + ew32(IMS, adapter->rx_ring->ims_val);
82 else
83 e1000_irq_enable(adapter);
84 }