From: juhosg Date: Tue, 8 Jun 2010 20:18:47 +0000 (+0000) Subject: ip17xx: Avoid auto-negotiation X-Git-Tag: fast2504n-3.10.28-merged~11845 X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=714e378fed66a8aaa76b935f1039522cfdb99771;p=openwrt.git 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 Signed-off-by: Patrick Horn git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21720 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- 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 ede5d51341..ef4b4d9092 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; }