From: Felix Fietkau Date: Mon, 9 Jun 2008 10:31:46 +0000 (+0000) Subject: set marvell switch ATU ageing time to minimum instead of maximum - hopefully fixes... X-Git-Tag: reboot~26329 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b014357704942bbb879b85e36e18a7ab881a0312;p=openwrt%2Fstaging%2Fchunkeey.git set marvell switch ATU ageing time to minimum instead of maximum - hopefully fixes some fonera 2.0 ethernet issues SVN-Revision: 11410 --- diff --git a/target/linux/generic-2.6/files-2.6.25/drivers/net/phy/mvswitch.c b/target/linux/generic-2.6/files-2.6.25/drivers/net/phy/mvswitch.c index f28df43989..be9e6afd2d 100644 --- a/target/linux/generic-2.6/files-2.6.25/drivers/net/phy/mvswitch.c +++ b/target/linux/generic-2.6/files-2.6.25/drivers/net/phy/mvswitch.c @@ -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 */ diff --git a/target/linux/generic-2.6/files-2.6.25/drivers/net/phy/mvswitch.h b/target/linux/generic-2.6/files-2.6.25/drivers/net/phy/mvswitch.h index 81516b708b..a172e37265 100644 --- a/target/linux/generic-2.6/files-2.6.25/drivers/net/phy/mvswitch.h +++ b/target/linux/generic-2.6/files-2.6.25/drivers/net/phy/mvswitch.h @@ -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), diff --git a/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.c b/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.c index f28df43989..be9e6afd2d 100644 --- a/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.c +++ b/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.c @@ -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 */ diff --git a/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.h b/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.h index 81516b708b..a172e37265 100644 --- a/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.h +++ b/target/linux/generic-2.6/files-2.6.26/drivers/net/phy/mvswitch.h @@ -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), diff --git a/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.c b/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.c index f28df43989..be9e6afd2d 100644 --- a/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.c +++ b/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.c @@ -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 */ diff --git a/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.h b/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.h index 81516b708b..a172e37265 100644 --- a/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.h +++ b/target/linux/generic-2.6/files/drivers/net/phy/mvswitch.h @@ -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),