[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190411230139.13160-1-olteanv@gmail.com>
Date: Fri, 12 Apr 2019 02:01:39 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: f.fainelli@...il.com, andrew@...n.ch, hkallweit1@...il.com,
davem@...emloft.net
Cc: netdev@...r.kernel.org, Vladimir Oltean <olteanv@...il.com>
Subject: [PATCH] net: dsa: fixed-link interface is reporting SPEED_UNKNOWN
With Heiner's recent patch "b6163f194c69 net: phy: improve
genphy_read_status", the phydev->speed is now initialized by default to
SPEED_UNKNOWN even for fixed PHYs. This is not necessarily bad, since it
is not correct to call genphy_config_init() and genphy_read_status() for
a fixed PHY.
This dates back all the way to "39b0c705195e net: dsa: Allow
configuration of CPU & DSA port speeds/duplex" (discussion thread:
https://www.spinics.net/lists/netdev/msg340862.html).
I don't seem to understand why these calls were necessary back then, but
removing these calls seemingly has no impact now apart from preventing
the phydev->speed that was set in of_phy_register_fixed_link() from
getting overwritten.
Signed-off-by: Vladimir Oltean <olteanv@...il.com>
---
net/dsa/port.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/net/dsa/port.c b/net/dsa/port.c
index 87769cb38c31..481412c892a7 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -485,9 +485,6 @@ static int dsa_port_fixed_link_register_of(struct dsa_port *dp)
mode = PHY_INTERFACE_MODE_NA;
phydev->interface = mode;
- genphy_config_init(phydev);
- genphy_read_status(phydev);
-
if (ds->ops->adjust_link)
ds->ops->adjust_link(ds, port, phydev);
--
2.17.1
Powered by blists - more mailing lists