projects
/
openwrt
/
staging
/
chunkeey.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kernel: bump 3.18 to 3.18.128
[openwrt/staging/chunkeey.git]
/
target
/
linux
/
generic
/
pending-3.18
/
002-phy_drivers_backport.patch
diff --git
a/target/linux/generic/pending-3.18/002-phy_drivers_backport.patch
b/target/linux/generic/pending-3.18/002-phy_drivers_backport.patch
index c97c759e7ee82ac1002c0ac5f7c7b3f6ca63edad..e2ca05384a5f375baec93604158efd4951b94d5b 100644
(file)
--- a/
target/linux/generic/pending-3.18/002-phy_drivers_backport.patch
+++ b/
target/linux/generic/pending-3.18/002-phy_drivers_backport.patch
@@
-1,6
+1,6
@@
--- a/drivers/net/phy/adm6996.c
+++ b/drivers/net/phy/adm6996.c
--- a/drivers/net/phy/adm6996.c
+++ b/drivers/net/phy/adm6996.c
-@@ -28
7,7 +287
,7 @@ static u16
+@@ -28
9,7 +289
,7 @@ static u16
adm6996_read_mii_reg(struct adm6996_priv *priv, enum admreg reg)
{
struct phy_device *phydev = priv->priv;
adm6996_read_mii_reg(struct adm6996_priv *priv, enum admreg reg)
{
struct phy_device *phydev = priv->priv;
@@
-9,7
+9,7
@@
return bus->read(bus, PHYADDR(reg));
}
return bus->read(bus, PHYADDR(reg));
}
-@@ -29
6,7 +296
,7 @@ static void
+@@ -29
8,7 +298
,7 @@ static void
adm6996_write_mii_reg(struct adm6996_priv *priv, enum admreg reg, u16 val)
{
struct phy_device *phydev = priv->priv;
adm6996_write_mii_reg(struct adm6996_priv *priv, enum admreg reg, u16 val)
{
struct phy_device *phydev = priv->priv;
@@
-18,7
+18,7
@@
bus->write(bus, PHYADDR(reg), val);
}
bus->write(bus, PHYADDR(reg), val);
}
-@@ -10
19,13 +1019
,13 @@ static int adm6996_config_init(struct ph
+@@ -10
50,13 +1050
,13 @@ static int adm6996_config_init(struct ph
pdev->supported = ADVERTISED_100baseT_Full;
pdev->advertising = ADVERTISED_100baseT_Full;
pdev->supported = ADVERTISED_100baseT_Full;
pdev->advertising = ADVERTISED_100baseT_Full;
@@
-35,7
+35,7
@@
if (!priv)
return -ENOMEM;
if (!priv)
return -ENOMEM;
-@@ -10
45,7 +1045
,7 @@ static int adm6996_config_init(struct ph
+@@ -10
76,7 +1076
,7 @@ static int adm6996_config_init(struct ph
}
/*
}
/*
@@
-44,7
+44,7
@@
*/
static int adm6996_read_status(struct phy_device *phydev)
{
*/
static int adm6996_read_status(struct phy_device *phydev)
{
-@@ -10
61,7 +1061
,7 @@ static int adm6996_read_status(struct ph
+@@ -10
92,7 +1092
,7 @@ static int adm6996_read_status(struct ph
}
/*
}
/*
@@
-53,7
+53,7
@@
*/
static int adm6996_config_aneg(struct phy_device *phydev)
{
*/
static int adm6996_config_aneg(struct phy_device *phydev)
{
-@@ -1
070,11 +1070
,11 @@ static int adm6996_config_aneg(struct ph
+@@ -1
101,11 +1101
,11 @@ static int adm6996_config_aneg(struct ph
static int adm6996_fixup(struct phy_device *dev)
{
static int adm6996_fixup(struct phy_device *dev)
{
@@
-67,7
+67,7
@@
return 0;
/* look for the switch on the bus */
return 0;
/* look for the switch on the bus */
-@@ -11
21,6 +1121
,7 @@ static struct phy_driver adm6996_phy_dri
+@@ -11
52,6 +1152
,7 @@ static struct phy_driver adm6996_phy_dri
.config_aneg = &adm6996_config_aneg,
.read_status = &adm6996_read_status,
.soft_reset = adm6996_soft_reset,
.config_aneg = &adm6996_config_aneg,
.read_status = &adm6996_read_status,
.soft_reset = adm6996_soft_reset,
@@
-75,7
+75,7
@@
};
static int adm6996_gpio_probe(struct platform_device *pdev)
};
static int adm6996_gpio_probe(struct platform_device *pdev)
-@@ -1
193,7 +1194
,7 @@ static int __init adm6996_init(void)
+@@ -1
220,7 +1221
,7 @@ static int __init adm6996_init(void)
int err;
phy_register_fixup_for_id(PHY_ANY_ID, adm6996_fixup);
int err;
phy_register_fixup_for_id(PHY_ANY_ID, adm6996_fixup);
@@
-95,7
+95,7
@@
ret |= BMCR_ANENABLE | BMCR_ANRESTART;
return phy_write(phydev, MII_BMCR, ret);
}
ret |= BMCR_ANENABLE | BMCR_ANRESTART;
return phy_write(phydev, MII_BMCR, ret);
}
-@@ -
1996,7 +1996
,7 @@ ar8xxx_phy_config_init(struct phy_device
+@@ -
2021,7 +2021
,7 @@ ar8xxx_phy_config_init(struct phy_device
priv->phy = phydev;
priv->phy = phydev;
@@
-104,7
+104,7
@@
if (chip_is_ar8316(priv)) {
/* switch device has been initialized, reinit */
priv->dev.ports = (AR8216_NUM_PORTS - 1);
if (chip_is_ar8316(priv)) {
/* switch device has been initialized, reinit */
priv->dev.ports = (AR8216_NUM_PORTS - 1);
-@@ -20
44,7 +2044
,7 @@ ar8xxx_check_link_states(struct ar8xxx_p
+@@ -20
69,7 +2069
,7 @@ ar8xxx_check_link_states(struct ar8xxx_p
/* flush ARL entries for this port if it went down*/
if (!link_new)
priv->chip->atu_flush_port(priv, i);
/* flush ARL entries for this port if it went down*/
if (!link_new)
priv->chip->atu_flush_port(priv, i);
@@
-113,7
+113,7
@@
i, link_new ? "up" : "down");
}
i, link_new ? "up" : "down");
}
-@@ -20
63,10 +2063
,10 @@ ar8xxx_phy_read_status(struct phy_device
+@@ -20
88,10 +2088
,10 @@ ar8xxx_phy_read_status(struct phy_device
if (phydev->state == PHY_CHANGELINK)
ar8xxx_check_link_states(priv);
if (phydev->state == PHY_CHANGELINK)
ar8xxx_check_link_states(priv);
@@
-126,7
+126,7
@@
phydev->link = !!link.link;
if (!phydev->link)
return 0;
phydev->link = !!link.link;
if (!phydev->link)
return 0;
-@@ -2
096,7 +2096
,7 @@ ar8xxx_phy_read_status(struct phy_device
+@@ -2
122,7 +2122
,7 @@ ar8xxx_phy_read_status(struct phy_device
static int
ar8xxx_phy_config_aneg(struct phy_device *phydev)
{
static int
ar8xxx_phy_config_aneg(struct phy_device *phydev)
{
@@
-135,12
+135,12
@@
return 0;
return genphy_config_aneg(phydev);
return 0;
return genphy_config_aneg(phydev);
-@@ -21
51,15 +2151
,15 @@ ar8xxx_phy_probe(struct phy_device *phyd
+@@ -21
77,15 +2177
,15 @@ ar8xxx_phy_probe(struct phy_device *phyd
int ret;
/* skip PHYs at unused adresses */
int ret;
/* skip PHYs at unused adresses */
-- if (phydev->mdio.addr != 0 && phydev->mdio.addr != 4)
-+ if (phydev->addr != 0 && phydev->addr != 4)
+- if (phydev->mdio.addr != 0 && phydev->mdio.addr !=
3 && phydev->mdio.addr !=
4)
++ if (phydev->addr != 0 && phydev->addr !=
3 && phydev->addr !=
4)
return -ENODEV;
- if (!ar8xxx_is_possible(phydev->mdio.bus))
return -ENODEV;
- if (!ar8xxx_is_possible(phydev->mdio.bus))
@@
-154,7
+154,7
@@
goto found;
priv = ar8xxx_create();
goto found;
priv = ar8xxx_create();
-@@ -21
68,7 +2168
,7 @@ ar8xxx_phy_probe(struct phy_device *phyd
+@@ -21
94,7 +2194
,7 @@ ar8xxx_phy_probe(struct phy_device *phyd
goto unlock;
}
goto unlock;
}
@@
-163,7
+163,7
@@
ret = ar8xxx_probe_switch(priv);
if (ret)
ret = ar8xxx_probe_switch(priv);
if (ret)
-@@ -2
189,7 +2189
,7 @@ ar8xxx_phy_probe(struct phy_device *phyd
+@@ -2
215,7 +2215
,7 @@ ar8xxx_phy_probe(struct phy_device *phyd
found:
priv->use_count++;
found:
priv->use_count++;
@@
-172,7
+172,7
@@
if (ar8xxx_has_gige(priv)) {
phydev->supported = SUPPORTED_1000baseT_Full;
phydev->advertising = ADVERTISED_1000baseT_Full;
if (ar8xxx_has_gige(priv)) {
phydev->supported = SUPPORTED_1000baseT_Full;
phydev->advertising = ADVERTISED_1000baseT_Full;
-@@ -2
277,21 +2277
,33 @@ ar8xxx_phy_soft_reset(struct phy_device
+@@ -2
305,21 +2305
,33 @@ ar8xxx_phy_soft_reset(struct phy_device
return 0;
}
return 0;
}
@@
-223,7
+223,7
@@
MODULE_LICENSE("GPL");
--- a/drivers/net/phy/ar8327.c
+++ b/drivers/net/phy/ar8327.c
MODULE_LICENSE("GPL");
--- a/drivers/net/phy/ar8327.c
+++ b/drivers/net/phy/ar8327.c
-@@ -6
19,11 +619
,11 @@ ar8327_hw_init(struct ar8xxx_priv *priv)
+@@ -6
62,11 +662
,11 @@ ar8327_hw_init(struct ar8xxx_priv *priv)
if (!priv->chip_data)
return -ENOMEM;
if (!priv->chip_data)
return -ENOMEM;
@@
-363,7
+363,7
@@
}
}
-@@ -39
2,13 +388
,12 @@ mvswitch_probe(struct phy_device *pdev)
+@@ -39
8,13 +394
,12 @@ mvswitch_probe(struct phy_device *pdev)
static int
mvswitch_fixup(struct phy_device *dev)
{
static int
mvswitch_fixup(struct phy_device *dev)
{
@@
-379,9
+379,9
@@
if (reg != MV_IDENT_VALUE)
return 0;
if (reg != MV_IDENT_VALUE)
return 0;
-@@ -418,13 +413,14 @@ static struct phy_driver mvswitch_driver
- .config_init = &mvswitch_config_init,
+@@ -425,13 +420,14 @@ static struct phy_driver mvswitch_driver
.config_aneg = &mvswitch_config_aneg,
.config_aneg = &mvswitch_config_aneg,
+ .aneg_done = &mvswitch_aneg_done,
.read_status = &mvswitch_read_status,
+ .driver = { .owner = THIS_MODULE,},
};
.read_status = &mvswitch_read_status,
+ .driver = { .owner = THIS_MODULE,},
};
@@
-464,7
+464,7
@@
module_init(psb6970_init);
--- a/drivers/net/phy/rtl8306.c
+++ b/drivers/net/phy/rtl8306.c
module_init(psb6970_init);
--- a/drivers/net/phy/rtl8306.c
+++ b/drivers/net/phy/rtl8306.c
-@@ -87
2,7 +872
,7 @@ rtl8306_config_init(struct phy_device *p
+@@ -87
7,7 +877
,7 @@ rtl8306_config_init(struct phy_device *p
int err;
/* Only init the switch for the primary PHY */
int err;
/* Only init the switch for the primary PHY */
@@
-473,7
+473,7
@@
return 0;
val.value.i = 1;
return 0;
val.value.i = 1;
-@@ -88
2,7 +882
,7 @@ rtl8306_config_init(struct phy_device *p
+@@ -88
7,7 +887
,7 @@ rtl8306_config_init(struct phy_device *p
priv->dev.ops = &rtl8306_ops;
priv->do_cpu = 0;
priv->page = -1;
priv->dev.ops = &rtl8306_ops;
priv->do_cpu = 0;
priv->page = -1;
@@
-482,7
+482,7
@@
chipid = rtl_get(dev, RTL_REG_CHIPID);
chipver = rtl_get(dev, RTL_REG_CHIPVER);
chipid = rtl_get(dev, RTL_REG_CHIPID);
chipver = rtl_get(dev, RTL_REG_CHIPVER);
-@@ -9
28,13 +928
,13 @@ rtl8306_fixup(struct phy_device *pdev)
+@@ -9
33,13 +933
,13 @@ rtl8306_fixup(struct phy_device *pdev)
u16 chipid;
/* Attach to primary LAN port and WAN port */
u16 chipid;
/* Attach to primary LAN port and WAN port */
@@
-498,7
+498,7
@@
chipid = rtl_get(&priv.dev, RTL_REG_CHIPID);
if (chipid == 0x5988)
pdev->phy_id = RTL8306_MAGIC;
chipid = rtl_get(&priv.dev, RTL_REG_CHIPID);
if (chipid == 0x5988)
pdev->phy_id = RTL8306_MAGIC;
-@@ -95
2,14 +952
,14 @@ rtl8306_probe(struct phy_device *pdev)
+@@ -95
7,14 +957
,14 @@ rtl8306_probe(struct phy_device *pdev)
* share one rtl_priv instance between virtual phy
* devices on the same bus
*/
* share one rtl_priv instance between virtual phy
* devices on the same bus
*/
@@
-515,7
+515,7
@@
found:
pdev->priv = priv;
found:
pdev->priv = priv;
-@@ -98
0,7 +980
,7 @@ rtl8306_config_aneg(struct phy_device *p
+@@ -98
5,7 +985
,7 @@ rtl8306_config_aneg(struct phy_device *p
struct rtl_priv *priv = pdev->priv;
/* Only for WAN */
struct rtl_priv *priv = pdev->priv;
/* Only for WAN */
@@
-524,7
+524,7
@@
return 0;
/* Restart autonegotiation */
return 0;
/* Restart autonegotiation */
-@@ -
996,7 +996
,7 @@ rtl8306_read_status(struct phy_device *p
+@@ -
1001,7 +1001
,7 @@ rtl8306_read_status(struct phy_device *p
struct rtl_priv *priv = pdev->priv;
struct switch_dev *dev = &priv->dev;
struct rtl_priv *priv = pdev->priv;
struct switch_dev *dev = &priv->dev;
@@
-533,7
+533,7
@@
/* WAN */
pdev->speed = rtl_get(dev, RTL_PORT_REG(4, SPEED)) ? SPEED_100 : SPEED_10;
pdev->duplex = rtl_get(dev, RTL_PORT_REG(4, DUPLEX)) ? DUPLEX_FULL : DUPLEX_HALF;
/* WAN */
pdev->speed = rtl_get(dev, RTL_PORT_REG(4, SPEED)) ? SPEED_100 : SPEED_10;
pdev->duplex = rtl_get(dev, RTL_PORT_REG(4, DUPLEX)) ? DUPLEX_FULL : DUPLEX_HALF;
-@@ -10
37,6 +1037
,7 @@ static struct phy_driver rtl8306_driver
+@@ -10
44,6 +1044
,7 @@ static struct phy_driver rtl8306_driver
.config_init = &rtl8306_config_init,
.config_aneg = &rtl8306_config_aneg,
.read_status = &rtl8306_read_status,
.config_init = &rtl8306_config_init,
.config_aneg = &rtl8306_config_aneg,
.read_status = &rtl8306_read_status,
@@
-541,7
+541,7
@@
};
};
-@@ -10
44,7 +1045
,7 @@ static int __init
+@@ -10
51,7 +1052
,7 @@ static int __init
rtl_init(void)
{
phy_register_fixup_for_id(PHY_ANY_ID, rtl8306_fixup);
rtl_init(void)
{
phy_register_fixup_for_id(PHY_ANY_ID, rtl8306_fixup);