aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/files/drivers/net
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-06-08 20:19:14 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-06-08 20:19:14 +0000
commit1b6346478e195245424e2199756d0dfa8548a7f3 (patch)
treedb00389350351c82cbcd21a2f3b9a8028416f0db /target/linux/generic-2.6/files/drivers/net
parent078d21f8471020cd554ce428c86970d86f154657 (diff)
downloadmaster-187ad058-1b6346478e195245424e2199756d0dfa8548a7f3.tar.gz
master-187ad058-1b6346478e195245424e2199756d0dfa8548a7f3.tar.bz2
master-187ad058-1b6346478e195245424e2199756d0dfa8548a7f3.zip
ip17xx: fix autonegotioation issues
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21727 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic-2.6/files/drivers/net')
-rw-r--r--target/linux/generic-2.6/files/drivers/net/phy/ip17xx.c31
1 files changed, 21 insertions, 10 deletions
diff --git a/target/linux/generic-2.6/files/drivers/net/phy/ip17xx.c b/target/linux/generic-2.6/files/drivers/net/phy/ip17xx.c
index 92a5046636..262123a57f 100644
--- a/target/linux/generic-2.6/files/drivers/net/phy/ip17xx.c
+++ b/target/linux/generic-2.6/files/drivers/net/phy/ip17xx.c
@@ -1298,21 +1298,12 @@ static int ip17xx_config_init(struct phy_device *pdev)
struct net_device *dev = pdev->attached_dev;
int err;
- pdev->irq = PHY_IGNORE_INTERRUPT;
err = register_switch(&state->dev, dev);
if (err < 0)
return err;
- ip17xx_reset(&state->dev);
-
state->registered = true;
-
- pdev->state = PHY_RUNNING;
- pdev->speed = SPEED_100;
- pdev->duplex = DUPLEX_FULL;
- pdev->pause = pdev->asym_pause = 0;
- netif_carrier_on(pdev->attached_dev);
-
+ ip17xx_reset(&state->dev);
return 0;
}
@@ -1330,8 +1321,24 @@ static int ip17xx_config_aneg(struct phy_device *pdev)
return 0;
}
+static int ip17xx_aneg_done(struct phy_device *pdev)
+{
+ return BMSR_ANEGCOMPLETE;
+}
+
+static int ip17xx_update_link(struct phy_device *pdev)
+{
+ pdev->link = 1;
+ return 0;
+}
+
static int ip17xx_read_status(struct phy_device *pdev)
{
+ pdev->speed = SPEED_100;
+ pdev->duplex = DUPLEX_FULL;
+ pdev->pause = pdev->asym_pause = 0;
+ pdev->link = 1;
+
return 0;
}
@@ -1344,6 +1351,8 @@ static struct phy_driver ip17xx_driver = {
.remove = ip17xx_remove,
.config_init = ip17xx_config_init,
.config_aneg = ip17xx_config_aneg,
+ .aneg_done = ip17xx_aneg_done,
+ .update_link = ip17xx_update_link,
.read_status = ip17xx_read_status,
.driver = { .owner = THIS_MODULE },
};
@@ -1357,6 +1366,8 @@ static struct phy_driver ip175a_driver = {
.remove = ip17xx_remove,
.config_init = ip17xx_config_init,
.config_aneg = ip17xx_config_aneg,
+ .aneg_done = ip17xx_aneg_done,
+ .update_link = ip17xx_update_link,
.read_status = ip17xx_read_status,
.driver = { .owner = THIS_MODULE },
};