700-1-6-e1000e-Remove-Other-from-EIAC.diff 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. From patchwork Mon Mar 5 21:40:25 2018
  2. Content-Type: text/plain; charset="utf-8"
  3. MIME-Version: 1.0
  4. Content-Transfer-Encoding: 7bit
  5. Subject: [net,v2,1/6] e1000e: Remove Other from EIAC
  6. X-Patchwork-Submitter: "Kirsher, Jeffrey T" <[email protected]>
  7. X-Patchwork-Id: 881773
  8. X-Patchwork-Delegate: [email protected]
  9. Message-Id: <[email protected]>
  10. To: [email protected]
  11. Cc: Benjamin Poirier <[email protected]>, [email protected],
  12. [email protected], [email protected], [email protected],
  13. Jeff Kirsher <[email protected]>
  14. Date: Mon, 5 Mar 2018 13:40:25 -0800
  15. From: Jeff Kirsher <[email protected]>
  16. List-Id: <netdev.vger.kernel.org>
  17. From: Benjamin Poirier <[email protected]>
  18. It was reported that emulated e1000e devices in vmware esxi 6.5 Build
  19. 7526125 do not link up after commit 4aea7a5c5e94 ("e1000e: Avoid receiver
  20. overrun interrupt bursts", v4.15-rc1). Some tracing shows that after
  21. e1000e_trigger_lsc() is called, ICR reads out as 0x0 in e1000_msix_other()
  22. on emulated e1000e devices. In comparison, on real e1000e 82574 hardware,
  23. icr=0x80000004 (_INT_ASSERTED | _LSC) in the same situation.
  24. Some experimentation showed that this flaw in vmware e1000e emulation can
  25. be worked around by not setting Other in EIAC. This is how it was before
  26. 16ecba59bc33 ("e1000e: Do not read ICR in Other interrupt", v4.5-rc1).
  27. Fixes: 4aea7a5c5e94 ("e1000e: Avoid receiver overrun interrupt bursts")
  28. Signed-off-by: Benjamin Poirier <[email protected]>
  29. Tested-by: Aaron Brown <[email protected]>
  30. Signed-off-by: Jeff Kirsher <[email protected]>
  31. ---
  32. drivers/net/ethernet/intel/e1000e/netdev.c | 5 +++--
  33. 1 file changed, 3 insertions(+), 2 deletions(-)
  34. --- a/drivers/net/ethernet/intel/e1000e/netdev.c
  35. +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
  36. @@ -1914,6 +1914,8 @@ static irqreturn_t e1000_msix_other(int
  37. bool enable = true;
  38. icr = er32(ICR);
  39. + ew32(ICR, E1000_ICR_OTHER);
  40. +
  41. if (icr & E1000_ICR_RXO) {
  42. ew32(ICR, E1000_ICR_RXO);
  43. enable = false;
  44. @@ -2036,7 +2038,6 @@ static void e1000_configure_msix(struct
  45. hw->hw_addr + E1000_EITR_82574(vector));
  46. else
  47. writel(1, hw->hw_addr + E1000_EITR_82574(vector));
  48. - adapter->eiac_mask |= E1000_IMS_OTHER;
  49. /* Cause Tx interrupts on every write back */
  50. ivar |= BIT(31);
  51. @@ -2261,7 +2262,7 @@ static void e1000_irq_enable(struct e100
  52. if (adapter->msix_entries) {
  53. ew32(EIAC_82574, adapter->eiac_mask & E1000_EIAC_MASK_82574);
  54. - ew32(IMS, adapter->eiac_mask | E1000_IMS_LSC);
  55. + ew32(IMS, adapter->eiac_mask | E1000_IMS_OTHER | E1000_IMS_LSC);
  56. } else if (hw->mac.type >= e1000_pch_lpt) {
  57. ew32(IMS, IMS_ENABLE_MASK | E1000_IMS_ECCER);
  58. } else {