700-2-6-Partial-revert-e1000e-Avoid-receiver-overrun-interrupt-bursts.diff 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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" <[email protected]>
  8. X-Patchwork-Id: 881769
  9. X-Patchwork-Delegate: [email protected]
  10. Message-Id: <[email protected]>
  11. To: [email protected]
  12. Cc: Benjamin Poirier <[email protected]>, [email protected],
  13. [email protected], [email protected], [email protected],
  14. Jeff Kirsher <[email protected]>
  15. Date: Mon, 5 Mar 2018 13:40:26 -0800
  16. From: Jeff Kirsher <[email protected]>
  17. List-Id: <netdev.vger.kernel.org>
  18. From: Benjamin Poirier <[email protected]>
  19. This partially reverts commit 4aea7a5c5e940c1723add439f4088844cd26196d.
  20. We keep the fix for the first part of the problem (1) described in the log
  21. of that commit, that is to read ICR in the other interrupt handler. We
  22. remove the fix for the second part of the problem (2), Other interrupt
  23. throttling.
  24. Bursts of "Other" interrupts may once again occur during rxo (receive
  25. overflow) traffic conditions. This is deemed acceptable in the interest of
  26. avoiding unforeseen fallout from changes that are not strictly necessary.
  27. As discussed, the e1000e driver should be in "maintenance mode".
  28. Link: https://www.spinics.net/lists/netdev/msg480675.html
  29. Signed-off-by: Benjamin Poirier <[email protected]>
  30. Acked-by: Alexander Duyck <[email protected]>
  31. Tested-by: Aaron Brown <[email protected]>
  32. Signed-off-by: Jeff Kirsher <[email protected]>
  33. ---
  34. drivers/net/ethernet/intel/e1000e/netdev.c | 16 ++--------------
  35. 1 file changed, 2 insertions(+), 14 deletions(-)
  36. --- a/drivers/net/ethernet/intel/e1000e/netdev.c
  37. +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
  38. @@ -1911,21 +1911,10 @@ static irqreturn_t e1000_msix_other(int
  39. struct e1000_adapter *adapter = netdev_priv(netdev);
  40. struct e1000_hw *hw = &adapter->hw;
  41. u32 icr;
  42. - bool enable = true;
  43. icr = er32(ICR);
  44. ew32(ICR, E1000_ICR_OTHER);
  45. - if (icr & E1000_ICR_RXO) {
  46. - ew32(ICR, E1000_ICR_RXO);
  47. - enable = false;
  48. - /* napi poll will re-enable Other, make sure it runs */
  49. - if (napi_schedule_prep(&adapter->napi)) {
  50. - adapter->total_rx_bytes = 0;
  51. - adapter->total_rx_packets = 0;
  52. - __napi_schedule(&adapter->napi);
  53. - }
  54. - }
  55. if (icr & E1000_ICR_LSC) {
  56. ew32(ICR, E1000_ICR_LSC);
  57. hw->mac.get_link_status = true;
  58. @@ -1934,7 +1923,7 @@ static irqreturn_t e1000_msix_other(int
  59. mod_timer(&adapter->watchdog_timer, jiffies + 1);
  60. }
  61. - if (enable && !test_bit(__E1000_DOWN, &adapter->state))
  62. + if (!test_bit(__E1000_DOWN, &adapter->state))
  63. ew32(IMS, E1000_IMS_OTHER);
  64. return IRQ_HANDLED;
  65. @@ -2704,8 +2693,7 @@ static int e1000e_poll(struct napi_struc
  66. napi_complete_done(napi, work_done);
  67. if (!test_bit(__E1000_DOWN, &adapter->state)) {
  68. if (adapter->msix_entries)
  69. - ew32(IMS, adapter->rx_ring->ims_val |
  70. - E1000_IMS_OTHER);
  71. + ew32(IMS, adapter->rx_ring->ims_val);
  72. else
  73. e1000_irq_enable(adapter);
  74. }