From 97629a9f16117425bc11b3da711f8c8891010f52 Mon Sep 17 00:00:00 2001 From: Don Skidmore Date: Sat, 21 Feb 2009 15:42:56 -0800 Subject: [PATCH] --- yaml --- r: 134647 b: refs/heads/master c: 54037505a5278ce85df66531f384109ad94947e3 h: refs/heads/master i: 134645: 838fcb7760cfff8d4f2e4b9d5c42c2cddffe1e55 134643: 1f1c92a8c7599a5e20cfe7fe2d0b0ac4c91f1dce 134639: 7ee58b957774b1dbe555530b6c3bd23a28433101 v: v3 --- [refs] | 2 +- trunk/drivers/net/ixgbe/ixgbe_main.c | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index d1092c3992a1..04de82e09053 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cd4d8fdad1f13205c769266dfa99015e226b6e07 +refs/heads/master: 54037505a5278ce85df66531f384109ad94947e3 diff --git a/trunk/drivers/net/ixgbe/ixgbe_main.c b/trunk/drivers/net/ixgbe/ixgbe_main.c index 8c32c18f569c..e0d736cc245b 100644 --- a/trunk/drivers/net/ixgbe/ixgbe_main.c +++ b/trunk/drivers/net/ixgbe/ixgbe_main.c @@ -936,7 +936,16 @@ static irqreturn_t ixgbe_msix_lsc(int irq, void *data) struct net_device *netdev = data; struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_hw *hw = &adapter->hw; - u32 eicr = IXGBE_READ_REG(hw, IXGBE_EICR); + u32 eicr; + + /* + * Workaround for Silicon errata. Use clear-by-write instead + * of clear-by-read. Reading with EICS will return the + * interrupt causes without clearing, which later be done + * with the write to EICR. + */ + eicr = IXGBE_READ_REG(hw, IXGBE_EICS); + IXGBE_WRITE_REG(hw, IXGBE_EICR, eicr); if (eicr & IXGBE_EICR_LSC) ixgbe_check_lsc(adapter); @@ -1355,6 +1364,12 @@ static irqreturn_t ixgbe_intr(int irq, void *data) struct ixgbe_hw *hw = &adapter->hw; u32 eicr; + /* + * Workaround for silicon errata. Mask the interrupts + * before the read of EICR. + */ + IXGBE_WRITE_REG(hw, IXGBE_EIMC, IXGBE_IRQ_CLEAR_MASK); + /* for NAPI, using EIAM to auto-mask tx/rx interrupt bits on read * therefore no explict interrupt disable is necessary */ eicr = IXGBE_READ_REG(hw, IXGBE_EICR);