Skip to content

Commit 16ecba5

Browse files
gobenjiJeff Kirsher
authored andcommitted
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: Benjamin Poirier <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 4d432f6 commit 16ecba5

File tree

1 file changed

+7
-15
lines changed
  • drivers/net/ethernet/intel/e1000e

1 file changed

+7
-15
lines changed

drivers/net/ethernet/intel/e1000e/netdev.c

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,24 +1905,15 @@ static irqreturn_t e1000_msix_other(int __always_unused irq, void *data)
19051905
struct net_device *netdev = data;
19061906
struct e1000_adapter *adapter = netdev_priv(netdev);
19071907
struct e1000_hw *hw = &adapter->hw;
1908-
u32 icr = er32(ICR);
19091908

1910-
if (icr & adapter->eiac_mask)
1911-
ew32(ICS, (icr & adapter->eiac_mask));
1909+
hw->mac.get_link_status = true;
19121910

1913-
if (icr & E1000_ICR_OTHER) {
1914-
if (!(icr & E1000_ICR_LSC))
1915-
goto no_link_interrupt;
1916-
hw->mac.get_link_status = true;
1917-
/* guard against interrupt when we're going down */
1918-
if (!test_bit(__E1000_DOWN, &adapter->state))
1919-
mod_timer(&adapter->watchdog_timer, jiffies + 1);
1911+
/* guard against interrupt when we're going down */
1912+
if (!test_bit(__E1000_DOWN, &adapter->state)) {
1913+
mod_timer(&adapter->watchdog_timer, jiffies + 1);
1914+
ew32(IMS, E1000_IMS_OTHER);
19201915
}
19211916

1922-
no_link_interrupt:
1923-
if (!test_bit(__E1000_DOWN, &adapter->state))
1924-
ew32(IMS, E1000_IMS_LSC | E1000_IMS_OTHER);
1925-
19261917
return IRQ_HANDLED;
19271918
}
19281919

@@ -2021,6 +2012,7 @@ static void e1000_configure_msix(struct e1000_adapter *adapter)
20212012
hw->hw_addr + E1000_EITR_82574(vector));
20222013
else
20232014
writel(1, hw->hw_addr + E1000_EITR_82574(vector));
2015+
adapter->eiac_mask |= E1000_IMS_OTHER;
20242016

20252017
/* Cause Tx interrupts on every write back */
20262018
ivar |= (1 << 31);
@@ -2249,7 +2241,7 @@ static void e1000_irq_enable(struct e1000_adapter *adapter)
22492241

22502242
if (adapter->msix_entries) {
22512243
ew32(EIAC_82574, adapter->eiac_mask & E1000_EIAC_MASK_82574);
2252-
ew32(IMS, adapter->eiac_mask | E1000_IMS_OTHER | E1000_IMS_LSC);
2244+
ew32(IMS, adapter->eiac_mask | E1000_IMS_LSC);
22532245
} else if ((hw->mac.type == e1000_pch_lpt) ||
22542246
(hw->mac.type == e1000_pch_spt)) {
22552247
ew32(IMS, IMS_ENABLE_MASK | E1000_IMS_ECCER);

0 commit comments

Comments
 (0)