ixgbe: modify behavior on receiving a HW ECC error.
authorDon Skidmore <donald.c.skidmore@intel.com>
Wed, 26 Feb 2014 01:58:53 +0000 (17:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Feb 2014 20:54:51 +0000 (15:54 -0500)
Currently when we noticed a HW ECC error we would request the use reload
the driver to force a reset of the part.  This was done due to the mistaken
believe that a normal reset would not be sufficient.  Well it turns out it
would be so now we just schedule a reset upon seeing the ECC.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 18076c4178b4ff7762a117ef00595ab71173a10d..c7b2ae5570b44de863e189bb1c492de3355b650d 100644 (file)
@@ -2630,9 +2630,12 @@ static irqreturn_t ixgbe_msix_other(int irq, void *data)
        switch (hw->mac.type) {
        case ixgbe_mac_82599EB:
        case ixgbe_mac_X540:
-               if (eicr & IXGBE_EICR_ECC)
-                       e_info(link, "Received unrecoverable ECC Err, please "
-                              "reboot\n");
+               if (eicr & IXGBE_EICR_ECC) {
+                       e_info(link, "Received ECC Err, initiating reset\n");
+                       adapter->flags2 |= IXGBE_FLAG2_RESET_REQUESTED;
+                       ixgbe_service_event_schedule(adapter);
+                       IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_ECC);
+               }
                /* Handle Flow Director Full threshold interrupt */
                if (eicr & IXGBE_EICR_FLOW_DIR) {
                        int reinit_count = 0;
@@ -2846,9 +2849,12 @@ static irqreturn_t ixgbe_intr(int irq, void *data)
                ixgbe_check_sfp_event(adapter, eicr);
                /* Fall through */
        case ixgbe_mac_X540:
-               if (eicr & IXGBE_EICR_ECC)
-                       e_info(link, "Received unrecoverable ECC err, please "
-                                    "reboot\n");
+               if (eicr & IXGBE_EICR_ECC) {
+                       e_info(link, "Received ECC Err, initiating reset\n");
+                       adapter->flags2 |= IXGBE_FLAG2_RESET_REQUESTED;
+                       ixgbe_service_event_schedule(adapter);
+                       IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_ECC);
+               }
                ixgbe_check_overtemp_event(adapter, eicr);
                break;
        default: