]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: dsa: do not call phy_start_aneg
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 3 Oct 2014 01:56:03 +0000 (18:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Oct 2014 00:44:44 +0000 (20:44 -0400)
Commit f7f1de51edbd ("net: dsa: start and stop the PHY state machine")
add calls to phy_start() in dsa_slave_open() respectively phy_stop() in
dsa_slave_close().

We also call phy_start_aneg() in dsa_slave_create(), and this call is
messing up with the PHY state machine, since we basically start the
auto-negotiation, and later on restart it when calling phy_start().
phy_start() does not currently handle the PHY_FORCING or PHY_AN states
properly, but such a fix would be too invasive for this window.

Fixes: f7f1de51edbd ("net: dsa: start and stop the PHY state machine")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c

index 36953c84ff2d44e488ba79fd3125cf7df2abdda6..8030489d9cbe84f73cfd5ebbae82f60383f707b1 100644 (file)
@@ -608,7 +608,6 @@ dsa_slave_create(struct dsa_switch *ds, struct device *parent,
                p->phy->speed = 0;
                p->phy->duplex = 0;
                p->phy->advertising = p->phy->supported | ADVERTISED_Autoneg;
-               phy_start_aneg(p->phy);
        }
 
        return slave_dev;