* [PATCH net-next] net: dsa: PHY state machine usage fix
@ 2014-10-03 1:56 Florian Fainelli
2014-10-03 1:56 ` [PATCH net-next] net: dsa: do not call phy_start_aneg Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2014-10-03 1:56 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
Hi David,
This is a one-liner fixing long auto-negotiation with DSA devices, as I
mention in the commit message, the PHY state machine will need to be
fixed at some point to handle a phy_start_aneg() then phy_start() call,
but that looks too invasive for this merge window.
Thanks!
Florian Fainelli (1):
net: dsa: do not call phy_start_aneg
net/dsa/slave.c | 1 -
1 file changed, 1 deletion(-)
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH net-next] net: dsa: do not call phy_start_aneg
2014-10-03 1:56 [PATCH net-next] net: dsa: PHY state machine usage fix Florian Fainelli
@ 2014-10-03 1:56 ` Florian Fainelli
2014-10-05 0:45 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2014-10-03 1:56 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
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>
---
net/dsa/slave.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 36953c84ff2d..8030489d9cbe 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -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;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: dsa: do not call phy_start_aneg
2014-10-03 1:56 ` [PATCH net-next] net: dsa: do not call phy_start_aneg Florian Fainelli
@ 2014-10-05 0:45 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2014-10-05 0:45 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu, 2 Oct 2014 18:56:03 -0700
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-05 0:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-03 1:56 [PATCH net-next] net: dsa: PHY state machine usage fix Florian Fainelli
2014-10-03 1:56 ` [PATCH net-next] net: dsa: do not call phy_start_aneg Florian Fainelli
2014-10-05 0:45 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).