]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
e1000e: enable ECC correction on 82571 silicon
authorAlexander Duyck <alexander.h.duyck@intel.com>
Fri, 14 Nov 2008 06:54:36 +0000 (06:54 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Nov 2008 03:09:43 +0000 (19:09 -0800)
This change enables ECC correction for the packet buffer on all 82571
silicon.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/e1000e/82571.c
drivers/net/e1000e/defines.h
drivers/net/e1000e/hw.h

index b2c910c52df9756717246d21bdf2b115ab475d2c..3027ad53fa65820364f64ecfacb4cd30861bbffd 100644 (file)
@@ -973,6 +973,12 @@ static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw)
                ew32(CTRL_EXT, reg);
        }
 
+       if (hw->mac.type == e1000_82571) {
+               reg = er32(PBA_ECC);
+               reg |= E1000_PBA_ECC_CORR_EN;
+               ew32(PBA_ECC, reg);
+       }
+
        /* PCI-Ex Control Register */
        if (hw->mac.type == e1000_82574) {
                reg = er32(GCR);
index 48f79ecb82a035e424c7ffa855bd9e92595087ba..34a68fcab5a9304c3e8f7094d6bb004a75fa628d 100644 (file)
 #define E1000_ICR_TXQ1          0x00800000 /* Tx Queue 1 Interrupt */
 #define E1000_ICR_OTHER         0x01000000 /* Other Interrupts */
 
+/* PBA ECC Register */
+#define E1000_PBA_ECC_COUNTER_MASK  0xFFF00000 /* ECC counter mask */
+#define E1000_PBA_ECC_COUNTER_SHIFT 20         /* ECC counter shift value */
+#define E1000_PBA_ECC_CORR_EN       0x00000001 /* ECC correction enable */
+#define E1000_PBA_ECC_STAT_CLR      0x00000002 /* Clear ECC error counter */
+#define E1000_PBA_ECC_INT_EN        0x00000004 /* Enable ICR bit 5 for ECC */
+
 /*
  * This defines the bits that are set in the Interrupt Mask
  * Set/Read Register.  Each bit is documented below:
index f66ed37a7f766484e59a91bab9b3565fa34f7555..c4ffd4b705170d8d4d2c879dcdd7869c14946347 100644 (file)
@@ -87,6 +87,7 @@ enum e1e_registers {
        E1000_EEMNGCTL = 0x01010, /* MNG EEprom Control */
        E1000_EEWR     = 0x0102C, /* EEPROM Write Register - RW */
        E1000_FLOP     = 0x0103C, /* FLASH Opcode Register */
+       E1000_PBA_ECC  = 0x01100, /* PBA ECC Register */
        E1000_ERT      = 0x02008, /* Early Rx Threshold - RW */
        E1000_FCRTL    = 0x02160, /* Flow Control Receive Threshold Low - RW */
        E1000_FCRTH    = 0x02168, /* Flow Control Receive Threshold High - RW */