[SRU][Bionic][PATCH 0/1] e1000e: Remove Other from EIAC

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 0/1] e1000e: Remove Other from EIAC

Joseph Salisbury-3
BugLink: http://bugs.launchpad.net/bugs/1764892

== SRU Justification ==
Linux kernel 4.15 has introduced a bug in e1000e msix interrupt drivers,
which violates the e1000e specification. Specifically, the driver
configures auto-clearing of the "OTHER" interrupt types, and the "OTHER" interrupt
 handler expects to see an uncleared interrupt source for the "OTHER" types;
 consequently, the link state change interrupts are not identified by the driver,
 and thus the virtual E1000e device doesn't function correctly inside VMware VMs.

This patch Fixes: 4aea7a5c5e94 ("e1000e: Avoid receiver overrun interrupt bursts")

== Fix ==
745d0bd3af99 ("e1000e: Remove Other from EIAC")

== Regression Potential ==
Low.  Fixes an existing regression and limited to e1000e driver.

== Test Case ==
A test kernel was built with this patch and tested by the original bug reporter.
The bug reporter states the test kernel resolved the bug.

Benjamin Poirier (1):
  e1000e: Remove Other from EIAC

 drivers/net/ethernet/intel/e1000e/netdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[SRU][Bionic][PATCH 1/1] e1000e: Remove Other from EIAC

Joseph Salisbury-3
From: Benjamin Poirier <[hidden email]>

BugLink: http://bugs.launchpad.net/bugs/1764892

It was reported that emulated e1000e devices in vmware esxi 6.5 Build
7526125 do not link up after commit 4aea7a5c5e94 ("e1000e: Avoid receiver
overrun interrupt bursts", v4.15-rc1). Some tracing shows that after
e1000e_trigger_lsc() is called, ICR reads out as 0x0 in e1000_msix_other()
on emulated e1000e devices. In comparison, on real e1000e 82574 hardware,
icr=0x80000004 (_INT_ASSERTED | _LSC) in the same situation.

Some experimentation showed that this flaw in vmware e1000e emulation can
be worked around by not setting Other in EIAC. This is how it was before
16ecba59bc33 ("e1000e: Do not read ICR in Other interrupt", v4.5-rc1).

Fixes: 4aea7a5c5e94 ("e1000e: Avoid receiver overrun interrupt bursts")
Signed-off-by: Benjamin Poirier <[hidden email]>
Tested-by: Aaron Brown <[hidden email]>
Signed-off-by: Jeff Kirsher <[hidden email]>
(cherry picked from commit 745d0bd3af99ccc8c5f5822f808cd133eadad6ac)
Signed-off-by: Joseph Salisbury <[hidden email]>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 6103023..6758bda 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -1918,6 +1918,8 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data)
  bool enable = true;
 
  icr = er32(ICR);
+ ew32(ICR, E1000_ICR_OTHER);
+
  if (icr & E1000_ICR_RXO) {
  ew32(ICR, E1000_ICR_RXO);
  enable = false;
@@ -2040,7 +2042,6 @@ static void e1000_configure_msix(struct e1000_adapter *adapter)
        hw->hw_addr + E1000_EITR_82574(vector));
  else
  writel(1, hw->hw_addr + E1000_EITR_82574(vector));
- adapter->eiac_mask |= E1000_IMS_OTHER;
 
  /* Cause Tx interrupts on every write back */
  ivar |= BIT(31);
@@ -2265,7 +2266,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
 
  if (adapter->msix_entries) {
  ew32(EIAC_82574, adapter->eiac_mask & E1000_EIAC_MASK_82574);
- ew32(IMS, adapter->eiac_mask | E1000_IMS_LSC);
+ ew32(IMS, adapter->eiac_mask | E1000_IMS_OTHER | E1000_IMS_LSC);
  } else if (hw->mac.type >= e1000_pch_lpt) {
  ew32(IMS, IMS_ENABLE_MASK | E1000_IMS_ECCER);
  } else {
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][Bionic][PATCH 1/1] e1000e: Remove Other from EIAC

Kleber Souza
On 04/27/18 20:31, Joseph Salisbury wrote:

> From: Benjamin Poirier <[hidden email]>
>
> BugLink: http://bugs.launchpad.net/bugs/1764892
>
> It was reported that emulated e1000e devices in vmware esxi 6.5 Build
> 7526125 do not link up after commit 4aea7a5c5e94 ("e1000e: Avoid receiver
> overrun interrupt bursts", v4.15-rc1). Some tracing shows that after
> e1000e_trigger_lsc() is called, ICR reads out as 0x0 in e1000_msix_other()
> on emulated e1000e devices. In comparison, on real e1000e 82574 hardware,
> icr=0x80000004 (_INT_ASSERTED | _LSC) in the same situation.
>
> Some experimentation showed that this flaw in vmware e1000e emulation can
> be worked around by not setting Other in EIAC. This is how it was before
> 16ecba59bc33 ("e1000e: Do not read ICR in Other interrupt", v4.5-rc1).
>
> Fixes: 4aea7a5c5e94 ("e1000e: Avoid receiver overrun interrupt bursts")
> Signed-off-by: Benjamin Poirier <[hidden email]>
> Tested-by: Aaron Brown <[hidden email]>
> Signed-off-by: Jeff Kirsher <[hidden email]>
> (cherry picked from commit 745d0bd3af99ccc8c5f5822f808cd133eadad6ac)
> Signed-off-by: Joseph Salisbury <[hidden email]>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

Clean cherry-pick, fixes a regression and tested by the reporter.

Thanks,
Kleber

> ---
>  drivers/net/ethernet/intel/e1000e/netdev.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
> index 6103023..6758bda 100644
> --- a/drivers/net/ethernet/intel/e1000e/netdev.c
> +++ b/drivers/net/ethernet/intel/e1000e/netdev.c
> @@ -1918,6 +1918,8 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data)
>   bool enable = true;
>  
>   icr = er32(ICR);
> + ew32(ICR, E1000_ICR_OTHER);
> +
>   if (icr & E1000_ICR_RXO) {
>   ew32(ICR, E1000_ICR_RXO);
>   enable = false;
> @@ -2040,7 +2042,6 @@ static void e1000_configure_msix(struct e1000_adapter *adapter)
>         hw->hw_addr + E1000_EITR_82574(vector));
>   else
>   writel(1, hw->hw_addr + E1000_EITR_82574(vector));
> - adapter->eiac_mask |= E1000_IMS_OTHER;
>  
>   /* Cause Tx interrupts on every write back */
>   ivar |= BIT(31);
> @@ -2265,7 +2266,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
>  
>   if (adapter->msix_entries) {
>   ew32(EIAC_82574, adapter->eiac_mask & E1000_EIAC_MASK_82574);
> - ew32(IMS, adapter->eiac_mask | E1000_IMS_LSC);
> + ew32(IMS, adapter->eiac_mask | E1000_IMS_OTHER | E1000_IMS_LSC);
>   } else if (hw->mac.type >= e1000_pch_lpt) {
>   ew32(IMS, IMS_ENABLE_MASK | E1000_IMS_ECCER);
>   } else {
>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [SRU][Bionic][PATCH 0/1] e1000e: Remove Other from EIAC

Khaled Elmously
In reply to this post by Joseph Salisbury-3
On 2018-04-27 14:31:16 , Joseph Salisbury wrote:

> BugLink: http://bugs.launchpad.net/bugs/1764892
>
> == SRU Justification ==
> Linux kernel 4.15 has introduced a bug in e1000e msix interrupt drivers,
> which violates the e1000e specification. Specifically, the driver
> configures auto-clearing of the "OTHER" interrupt types, and the "OTHER" interrupt
>  handler expects to see an uncleared interrupt source for the "OTHER" types;
>  consequently, the link state change interrupts are not identified by the driver,
>  and thus the virtual E1000e device doesn't function correctly inside VMware VMs.
>
> This patch Fixes: 4aea7a5c5e94 ("e1000e: Avoid receiver overrun interrupt bursts")
>
> == Fix ==
> 745d0bd3af99 ("e1000e: Remove Other from EIAC")
>
> == Regression Potential ==
> Low.  Fixes an existing regression and limited to e1000e driver.
>
> == Test Case ==
> A test kernel was built with this patch and tested by the original bug reporter.
> The bug reporter states the test kernel resolved the bug.
>
> Benjamin Poirier (1):
>   e1000e: Remove Other from EIAC
>
>  drivers/net/ethernet/intel/e1000e/netdev.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
Acked-by: Khalid Elmously <[hidden email]>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [SRU][Bionic][PATCH 0/1] e1000e: Remove Other from EIAC

Kleber Souza
In reply to this post by Joseph Salisbury-3
On 04/27/18 20:31, Joseph Salisbury wrote:

> BugLink: http://bugs.launchpad.net/bugs/1764892
>
> == SRU Justification ==
> Linux kernel 4.15 has introduced a bug in e1000e msix interrupt drivers,
> which violates the e1000e specification. Specifically, the driver
> configures auto-clearing of the "OTHER" interrupt types, and the "OTHER" interrupt
>  handler expects to see an uncleared interrupt source for the "OTHER" types;
>  consequently, the link state change interrupts are not identified by the driver,
>  and thus the virtual E1000e device doesn't function correctly inside VMware VMs.
>
> This patch Fixes: 4aea7a5c5e94 ("e1000e: Avoid receiver overrun interrupt bursts")
>
> == Fix ==
> 745d0bd3af99 ("e1000e: Remove Other from EIAC")
>
> == Regression Potential ==
> Low.  Fixes an existing regression and limited to e1000e driver.
>
> == Test Case ==
> A test kernel was built with this patch and tested by the original bug reporter.
> The bug reporter states the test kernel resolved the bug.
>
> Benjamin Poirier (1):
>   e1000e: Remove Other from EIAC
>
>  drivers/net/ethernet/intel/e1000e/netdev.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>

Applied to bionic/master-next branch.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team