Commit 16ecba59 authored by Benjamin Poirier's avatar Benjamin Poirier Committed by Jeff Kirsher

e1000e: Do not read ICR in Other interrupt

Removes the ICR read in the other interrupt handler, uses EIAC to
autoclear the Other bit from ICR and IMS. This allows us to avoid
interference with Rx and Tx interrupts in the Other interrupt handler.

The information read from ICR is not needed. IMS is configured such that
the only interrupt cause that can trigger the Other interrupt is Link
Status Change.
Signed-off-by: default avatarBenjamin Poirier <bpoirier@suse.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 4d432f67
...@@ -1905,24 +1905,15 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data) ...@@ -1905,24 +1905,15 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data)
struct net_device *netdev = data; struct net_device *netdev = data;
struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_adapter *adapter = netdev_priv(netdev);
struct e1000_hw *hw = &adapter->hw; struct e1000_hw *hw = &adapter->hw;
u32 icr = er32(ICR);
if (icr & adapter->eiac_mask) hw->mac.get_link_status = true;
ew32(ICS, (icr & adapter->eiac_mask));
if (icr & E1000_ICR_OTHER) { /* guard against interrupt when we're going down */
if (!(icr & E1000_ICR_LSC)) if (!test_bit(__E1000_DOWN, &adapter->state)) {
goto no_link_interrupt; mod_timer(&adapter->watchdog_timer, jiffies + 1);
hw->mac.get_link_status = true; ew32(IMS, E1000_IMS_OTHER);
/* guard against interrupt when we're going down */
if (!test_bit(__E1000_DOWN, &adapter->state))
mod_timer(&adapter->watchdog_timer, jiffies + 1);
} }
no_link_interrupt:
if (!test_bit(__E1000_DOWN, &adapter->state))
ew32(IMS, E1000_IMS_LSC | E1000_IMS_OTHER);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -2021,6 +2012,7 @@ static void e1000_configure_msix(struct e1000_adapter *adapter) ...@@ -2021,6 +2012,7 @@ static void e1000_configure_msix(struct e1000_adapter *adapter)
hw->hw_addr + E1000_EITR_82574(vector)); hw->hw_addr + E1000_EITR_82574(vector));
else else
writel(1, hw->hw_addr + E1000_EITR_82574(vector)); writel(1, hw->hw_addr + E1000_EITR_82574(vector));
adapter->eiac_mask |= E1000_IMS_OTHER;
/* Cause Tx interrupts on every write back */ /* Cause Tx interrupts on every write back */
ivar |= (1 << 31); ivar |= (1 << 31);
...@@ -2249,7 +2241,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter) ...@@ -2249,7 +2241,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
if (adapter->msix_entries) { if (adapter->msix_entries) {
ew32(EIAC_82574, adapter->eiac_mask & E1000_EIAC_MASK_82574); ew32(EIAC_82574, adapter->eiac_mask & E1000_EIAC_MASK_82574);
ew32(IMS, adapter->eiac_mask | E1000_IMS_OTHER | E1000_IMS_LSC); ew32(IMS, adapter->eiac_mask | E1000_IMS_LSC);
} else if ((hw->mac.type == e1000_pch_lpt) || } else if ((hw->mac.type == e1000_pch_lpt) ||
(hw->mac.type == e1000_pch_spt)) { (hw->mac.type == e1000_pch_spt)) {
ew32(IMS, IMS_ENABLE_MASK | E1000_IMS_ECCER); ew32(IMS, IMS_ENABLE_MASK | E1000_IMS_ECCER);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment