set marvell switch ATU ageing time to minimum instead of maximum - hopefully fixes...
authorFelix Fietkau <nbd@openwrt.org>
Mon, 9 Jun 2008 10:31:46 +0000 (10:31 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 9 Jun 2008 10:31:46 +0000 (10:31 +0000)
SVN-Revision: 11410

target/linux/generic-2.6/files-2.6.25/drivers/net/phy/mvswitch.c
target/linux/generic-2.6/files-2.6.25/drivers/net/phy/mvswitch.h
target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.c
target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.h
target/linux/generic-2.6/files/drivers/net/phy/mvswitch.c
target/linux/generic-2.6/files/drivers/net/phy/mvswitch.h

index f28df4398972bf7bfd336b0662e9550e1b891a3c..be9e6afd2d14fbff7ecc5ab30bd39c8e0247aa3b 100644 (file)
@@ -246,7 +246,7 @@ mvswitch_config_init(struct phy_device *pdev)
        w16(pdev, MV_SWITCHREG(ATU_CTRL),
                MV_ATUCTL_RESET |
                MV_ATUCTL_ATU_1K |
-               MV_ATUCTL_AGETIME(4080) /* maximum */
+               MV_ATUCTL_AGETIME(MV_ATUCTL_AGETIME_MIN) /* minimum without disabling ageing */
        );
 
        i = 100; /* timeout */
index 81516b708b6585f0976b1174c97c410b3d3e4baf..a172e372652e95e072b8af7bc1ebacbd07ff10fc 100644 (file)
@@ -114,6 +114,8 @@ enum {
 };
 
 enum {
+#define MV_ATUCTL_AGETIME_MIN  16
+#define MV_ATUCTL_AGETIME_MAX  4080
 #define MV_ATUCTL_AGETIME(_n)  ((((_n) / 16) & 0xff) << 4)
        MV_ATUCTL_ATU_256   = (0 << 12),
        MV_ATUCTL_ATU_512   = (1 << 12),
index f28df4398972bf7bfd336b0662e9550e1b891a3c..be9e6afd2d14fbff7ecc5ab30bd39c8e0247aa3b 100644 (file)
@@ -246,7 +246,7 @@ mvswitch_config_init(struct phy_device *pdev)
        w16(pdev, MV_SWITCHREG(ATU_CTRL),
                MV_ATUCTL_RESET |
                MV_ATUCTL_ATU_1K |
-               MV_ATUCTL_AGETIME(4080) /* maximum */
+               MV_ATUCTL_AGETIME(MV_ATUCTL_AGETIME_MIN) /* minimum without disabling ageing */
        );
 
        i = 100; /* timeout */
index 81516b708b6585f0976b1174c97c410b3d3e4baf..a172e372652e95e072b8af7bc1ebacbd07ff10fc 100644 (file)
@@ -114,6 +114,8 @@ enum {
 };
 
 enum {
+#define MV_ATUCTL_AGETIME_MIN  16
+#define MV_ATUCTL_AGETIME_MAX  4080
 #define MV_ATUCTL_AGETIME(_n)  ((((_n) / 16) & 0xff) << 4)
        MV_ATUCTL_ATU_256   = (0 << 12),
        MV_ATUCTL_ATU_512   = (1 << 12),
index f28df4398972bf7bfd336b0662e9550e1b891a3c..be9e6afd2d14fbff7ecc5ab30bd39c8e0247aa3b 100644 (file)
@@ -246,7 +246,7 @@ mvswitch_config_init(struct phy_device *pdev)
        w16(pdev, MV_SWITCHREG(ATU_CTRL),
                MV_ATUCTL_RESET |
                MV_ATUCTL_ATU_1K |
-               MV_ATUCTL_AGETIME(4080) /* maximum */
+               MV_ATUCTL_AGETIME(MV_ATUCTL_AGETIME_MIN) /* minimum without disabling ageing */
        );
 
        i = 100; /* timeout */
index 81516b708b6585f0976b1174c97c410b3d3e4baf..a172e372652e95e072b8af7bc1ebacbd07ff10fc 100644 (file)
@@ -114,6 +114,8 @@ enum {
 };
 
 enum {
+#define MV_ATUCTL_AGETIME_MIN  16
+#define MV_ATUCTL_AGETIME_MAX  4080
 #define MV_ATUCTL_AGETIME(_n)  ((((_n) / 16) & 0xff) << 4)
        MV_ATUCTL_ATU_256   = (0 << 12),
        MV_ATUCTL_ATU_512   = (1 << 12),