diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-03-13 17:29:37 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2012-03-13 17:29:37 +0000 |
commit | 90579991ee9a2615f2540f5aecb5899d7b7763f0 (patch) | |
tree | 8c69db2deb3c90d37d50c6576b8fe8df7f6acac3 | |
parent | 16cf112d8c2659b02dcd9d7e170951ae88d73117 (diff) | |
download | master-187ad058-90579991ee9a2615f2540f5aecb5899d7b7763f0.tar.gz master-187ad058-90579991ee9a2615f2540f5aecb5899d7b7763f0.tar.bz2 master-187ad058-90579991ee9a2615f2540f5aecb5899d7b7763f0.zip |
ar71xx: ag71xx: start aneg on switch PHYs after reset
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30925 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c index f14b23121a..9faed2197a 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c @@ -596,6 +596,16 @@ static int ar7240sw_reset(struct ar7240sw *as) ret = ar7240sw_reg_wait(mii, AR7240_REG_MASK_CTRL, AR7240_MASK_CTRL_SOFT_RESET, 0, 1000); + /* setup PHYs */ + for (i = 0; i < AR7240_NUM_PHYS; i++) { + ar7240sw_phy_write(mii, i, MII_ADVERTISE, + ADVERTISE_ALL | ADVERTISE_PAUSE_CAP | + ADVERTISE_PAUSE_ASYM); + ar7240sw_phy_write(mii, i, MII_BMCR, + BMCR_RESET | BMCR_ANENABLE); + } + msleep(1000); + ar7240sw_setup(as); return ret; } |