diff options
author | John Crispin <blogic@openwrt.org> | 2012-12-21 20:04:04 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2012-12-21 20:04:04 +0000 |
commit | c2951f7a26b716869503c7d5b6f7366c62729803 (patch) | |
tree | 723fbbfc604bafb2822271cd8d94a6a5d4e552ad /target/linux/lantiq/patches-3.7/0127-lantiq_etop-Fix-supported-modes-flag.patch | |
parent | 6a50405768e895615da878d9f09ca597a40fee17 (diff) | |
download | master-187ad058-c2951f7a26b716869503c7d5b6f7366c62729803.tar.gz master-187ad058-c2951f7a26b716869503c7d5b6f7366c62729803.tar.bz2 master-187ad058-c2951f7a26b716869503c7d5b6f7366c62729803.zip |
[lantiq] Setting the MDC clock to 2.5MHz and changing the mii mode to rgmii seems to fix the communication issues with the ar8316 switch. (ticket #11143)
Tested only on the wbmr-hp-g300h, could affect/break other devices.
Signed-off-by: Sebastian Mayr <sebastian.mayr@student.uibk.ac.at>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34837 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/lantiq/patches-3.7/0127-lantiq_etop-Fix-supported-modes-flag.patch')
-rw-r--r-- | target/linux/lantiq/patches-3.7/0127-lantiq_etop-Fix-supported-modes-flag.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-3.7/0127-lantiq_etop-Fix-supported-modes-flag.patch b/target/linux/lantiq/patches-3.7/0127-lantiq_etop-Fix-supported-modes-flag.patch new file mode 100644 index 0000000000..73394fc60d --- /dev/null +++ b/target/linux/lantiq/patches-3.7/0127-lantiq_etop-Fix-supported-modes-flag.patch @@ -0,0 +1,51 @@ +From 4de6a250878c9ce5605838b65acbddf338a7254a Mon Sep 17 00:00:00 2001 +From: Sebastian Mayr <sebastian.mayr@student.uibk.ac.at> +Date: Thu, 20 Dec 2012 18:52:10 +0100 +Subject: [PATCH 2/2] lantiq_etop: Fix supported modes flag + +--- + drivers/net/ethernet/lantiq_etop.c | 19 ++++++++++--------- + 1 file changed, 10 insertions(+), 9 deletions(-) + +diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c +index fc963f6..b50b91e 100644 +--- a/drivers/net/ethernet/lantiq_etop.c ++++ b/drivers/net/ethernet/lantiq_etop.c +@@ -551,6 +551,13 @@ ltq_etop_mdio_probe(struct net_device *dev) + { + struct ltq_etop_priv *priv = netdev_priv(dev); + struct phy_device *phydev = NULL; ++ u32 phy_supported = (SUPPORTED_10baseT_Half ++ | SUPPORTED_10baseT_Full ++ | SUPPORTED_100baseT_Half ++ | SUPPORTED_100baseT_Full ++ | SUPPORTED_Autoneg ++ | SUPPORTED_MII ++ | SUPPORTED_TP); + + if (of_machine_is_compatible("lantiq,ase")) + phydev = priv->mii_bus->phy_map[8]; +@@ -570,17 +577,11 @@ ltq_etop_mdio_probe(struct net_device *dev) + return PTR_ERR(phydev); + } + +- phydev->supported &= (SUPPORTED_10baseT_Half +- | SUPPORTED_10baseT_Full +- | SUPPORTED_100baseT_Half +- | SUPPORTED_100baseT_Full +- | SUPPORTED_Autoneg +- | SUPPORTED_MII +- | SUPPORTED_TP); + if (of_machine_is_compatible("lantiq,ar9")) +- phydev->supported &= SUPPORTED_1000baseT_Half +- | SUPPORTED_1000baseT_Full; ++ phy_supported |= SUPPORTED_1000baseT_Half ++ | SUPPORTED_1000baseT_Full; + ++ phydev->supported &= phy_supported; + phydev->advertising = phydev->supported; + priv->phydev = phydev; + pr_info("%s: attached PHY [%s] (phy_addr=%s, irq=%d)\n", +-- +1.7.11.7 + |