summaryrefslogtreecommitdiff
path: root/target/linux/generic-2.6/files
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-06-08 20:18:47 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-06-08 20:18:47 +0000
commitd48ba78aa49bb20e27cf3bc6bf3c4f9a57d194b3 (patch)
tree3844dc7f16e87652e6a0da1cd65641645338fcc0 /target/linux/generic-2.6/files
parenta7301c57a4fc20a783e481ec2f8523da118acc45 (diff)
downloadmtk-20170518-d48ba78aa49bb20e27cf3bc6bf3c4f9a57d194b3.zip
mtk-20170518-d48ba78aa49bb20e27cf3bc6bf3c4f9a57d194b3.tar.gz
mtk-20170518-d48ba78aa49bb20e27cf3bc6bf3c4f9a57d194b3.tar.bz2
ip17xx: Avoid auto-negotiation
Let ip175c_config_init() initialize the link state of the PHY and set the PHY state machine directly to the PHY_RUNNING state in order to skip the auto-negotiation phase. Previously, auto-negotiation on PHY 0 (switch port 0) influenced the ethernet driver connected to the CPU port, causing all sorts of weird effects. Signed-off-by: Martin Mares <mj@ucw.cz> Signed-off-by: Patrick Horn <patrick.horn@gmail.com> SVN-Revision: 21720
Diffstat (limited to 'target/linux/generic-2.6/files')
-rw-r--r--target/linux/generic-2.6/files/drivers/net/phy/ip175c.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c b/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c
index ede5d51..ef4b4d9 100644
--- a/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c
+++ b/target/linux/generic-2.6/files/drivers/net/phy/ip175c.c
@@ -1344,6 +1344,11 @@ static int ip175c_config_init(struct phy_device *pdev)
ip175c_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);
return 0;
@@ -1365,9 +1370,6 @@ static int ip175c_config_aneg(struct phy_device *pdev)
static int ip175c_read_status(struct phy_device *pdev)
{
- pdev->speed = SPEED_100;
- pdev->duplex = DUPLEX_FULL;
- pdev->pause = pdev->asym_pause = 0;
return 0;
}