refresh patches
[openwrt/openwrt.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 --- a/drivers/net/ethernet/lantiq_etop.c
11 +++ b/drivers/net/ethernet/lantiq_etop.c
12 @@ -550,6 +550,13 @@ ltq_etop_mdio_probe(struct net_device *d
13 {
14 struct ltq_etop_priv *priv = netdev_priv(dev);
15 struct phy_device *phydev = NULL;
16 + u32 phy_supported = (SUPPORTED_10baseT_Half
17 + | SUPPORTED_10baseT_Full
18 + | SUPPORTED_100baseT_Half
19 + | SUPPORTED_100baseT_Full
20 + | SUPPORTED_Autoneg
21 + | SUPPORTED_MII
22 + | SUPPORTED_TP);
23
24 if (of_machine_is_compatible("lantiq,ase"))
25 phydev = priv->mii_bus->phy_map[8];
26 @@ -569,17 +576,11 @@ ltq_etop_mdio_probe(struct net_device *d
27 return PTR_ERR(phydev);
28 }
29
30 - phydev->supported &= (SUPPORTED_10baseT_Half
31 - | SUPPORTED_10baseT_Full
32 - | SUPPORTED_100baseT_Half
33 - | SUPPORTED_100baseT_Full
34 - | SUPPORTED_Autoneg
35 - | SUPPORTED_MII
36 - | SUPPORTED_TP);
37 if (of_machine_is_compatible("lantiq,ar9"))
38 - phydev->supported &= SUPPORTED_1000baseT_Half
39 - | SUPPORTED_1000baseT_Full;
40 + phy_supported |= SUPPORTED_1000baseT_Half
41 + | SUPPORTED_1000baseT_Full;
42
43 + phydev->supported &= phy_supported;
44 phydev->advertising = phydev->supported;
45 priv->phydev = phydev;
46 pr_info("%s: attached PHY [%s] (phy_addr=%s, irq=%d)\n",