bnx2x: EMAC reset
authorEilon Greenstein <eilong@broadcom.com>
Thu, 12 Feb 2009 08:37:04 +0000 (08:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Feb 2009 07:31:33 +0000 (23:31 -0800)
The NIG_ENABLE does not reset the emac. Replace it with explicit reset

Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2x_link.c
drivers/net/bnx2x_reg.h

index ffa412f63c9639bfe51fde90acc2f11473a4f3b5..f4c699ecfb4190729648f1eb089feceff339417d 100644 (file)
@@ -297,8 +297,10 @@ static u8 bnx2x_emac_enable(struct link_params *params,
                           port*4, 0);
        }
 
-       /* enable emac */
-       REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 1);
+       bnx2x_bits_en(bp, emac_base + EMAC_REG_EMAC_RX_MODE,
+                   EMAC_RX_MODE_RESET);
+       bnx2x_bits_en(bp, emac_base + EMAC_REG_EMAC_TX_MODE,
+                   EMAC_TX_MODE_RESET);
 
        if (CHIP_REV_IS_SLOW(bp)) {
                /* config GMII mode */
index 5cfeac96ea698e683db160bb5c73424fd32e3cba..b6c924934a00707c21402f1a285780ce21f0f5ba 100644 (file)
 #define EMAC_RX_MODE_FLOW_EN                                    (1L<<2)
 #define EMAC_RX_MODE_KEEP_VLAN_TAG                              (1L<<10)
 #define EMAC_RX_MODE_PROMISCUOUS                                (1L<<8)
+#define EMAC_RX_MODE_RESET                                      (1L<<0)
 #define EMAC_RX_MTU_SIZE_JUMBO_ENA                              (1L<<31)
 #define EMAC_TX_MODE_EXT_PAUSE_EN                               (1L<<3)
 #define EMAC_TX_MODE_FLOW_EN                                    (1L<<4)
+#define EMAC_TX_MODE_RESET                                      (1L<<0)
 #define MISC_REGISTERS_GPIO_0                                   0
 #define MISC_REGISTERS_GPIO_1                                   1
 #define MISC_REGISTERS_GPIO_2                                   2