ar8216: disable EEE by default on AR8327 to fix stability issues (#14597)
authorFelix Fietkau <nbd@openwrt.org>
Thu, 10 Jul 2014 21:11:02 +0000 (21:11 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 10 Jul 2014 21:11:02 +0000 (21:11 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 41577

target/linux/generic/files/drivers/net/phy/ar8216.c
target/linux/generic/files/drivers/net/phy/ar8216.h

index 3f60878723d4fa29b5905d0cf86b539059188368..fe0ddb9b1b7697c49efb579ed09d183cc71b94cc 100644 (file)
@@ -1626,6 +1626,15 @@ ar8327_init_globals(struct ar8xxx_priv *priv)
        /* Enable MIB counters */
        ar8xxx_reg_set(priv, AR8327_REG_MODULE_EN,
                       AR8327_MODULE_EN_MIB);
+
+       /* Disable EEE on all ports due to stability issues */
+       t = priv->read(priv, AR8327_REG_EEE_CTRL);
+       t |= AR8327_EEE_CTRL_DISABLE_PHY(0) |
+            AR8327_EEE_CTRL_DISABLE_PHY(1) |
+            AR8327_EEE_CTRL_DISABLE_PHY(2) |
+            AR8327_EEE_CTRL_DISABLE_PHY(3) |
+            AR8327_EEE_CTRL_DISABLE_PHY(4);
+       priv->write(priv, AR8327_REG_EEE_CTRL, t);
 }
 
 static void
index 00d6d7f749d9c7d4dde11a3b702256d5adcc5edc..eb553b489d552d21a2e86fd8261eaef8161e2c60 100644 (file)
 #define   AR8327_SGMII_CTRL_EN_RX              BIT(2)
 #define   AR8327_SGMII_CTRL_EN_TX              BIT(3)
 
+#define AR8327_REG_EEE_CTRL                    0x100
+#define   AR8327_EEE_CTRL_DISABLE_PHY(_i)      BIT(4 + (_i) * 2)
+
 #define AR8327_REG_PORT_VLAN0(_i)              (0x420 + (_i) * 0x8)
 #define   AR8327_PORT_VLAN0_DEF_SVID           BITS(0, 12)
 #define   AR8327_PORT_VLAN0_DEF_SVID_S         0