[lantiq] Setting the MDC clock to 2.5MHz and changing the mii mode to rgmii seems...
[openwrt/svn-archive/archive.git] / target / linux / lantiq / patches-3.7 / 0127-lantiq_etop-Fix-supported-modes-flag.patch
1 From 4de6a250878c9ce5605838b65acbddf338a7254a Mon Sep 17 00:00:00 2001
2 From: Sebastian Mayr <sebastian.mayr@student.uibk.ac.at>
3 Date: Thu, 20 Dec 2012 18:52:10 +0100
4 Subject: [PATCH 2/2] lantiq_etop: Fix supported modes flag
5
6 ---
7 drivers/net/ethernet/lantiq_etop.c | 19 ++++++++++---------
8 1 file changed, 10 insertions(+), 9 deletions(-)
9
10 diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
11 index fc963f6..b50b91e 100644
12 --- a/drivers/net/ethernet/lantiq_etop.c
13 +++ b/drivers/net/ethernet/lantiq_etop.c
14 @@ -551,6 +551,13 @@ ltq_etop_mdio_probe(struct net_device *dev)
15 {
16 struct ltq_etop_priv *priv = netdev_priv(dev);
17 struct phy_device *phydev = NULL;
18 + u32 phy_supported = (SUPPORTED_10baseT_Half
19 + | SUPPORTED_10baseT_Full
20 + | SUPPORTED_100baseT_Half
21 + | SUPPORTED_100baseT_Full
22 + | SUPPORTED_Autoneg
23 + | SUPPORTED_MII
24 + | SUPPORTED_TP);
25
26 if (of_machine_is_compatible("lantiq,ase"))
27 phydev = priv->mii_bus->phy_map[8];
28 @@ -570,17 +577,11 @@ ltq_etop_mdio_probe(struct net_device *dev)
29 return PTR_ERR(phydev);
30 }
31
32 - phydev->supported &= (SUPPORTED_10baseT_Half
33 - | SUPPORTED_10baseT_Full
34 - | SUPPORTED_100baseT_Half
35 - | SUPPORTED_100baseT_Full
36 - | SUPPORTED_Autoneg
37 - | SUPPORTED_MII
38 - | SUPPORTED_TP);
39 if (of_machine_is_compatible("lantiq,ar9"))
40 - phydev->supported &= SUPPORTED_1000baseT_Half
41 - | SUPPORTED_1000baseT_Full;
42 + phy_supported |= SUPPORTED_1000baseT_Half
43 + | SUPPORTED_1000baseT_Full;
44
45 + phydev->supported &= phy_supported;
46 phydev->advertising = phydev->supported;
47 priv->phydev = phydev;
48 pr_info("%s: attached PHY [%s] (phy_addr=%s, irq=%d)\n",
49 --
50 1.7.11.7
51