lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 11 Aug 2019 03:46:50 +0200
From:   Marek Behún <>
Cc:     Marek Behún <>,
        Heiner Kallweit <>,
        Sebastian Reichel <>,
        Vivien Didelot <>,
        Andrew Lunn <>,
        Florian Fainelli <>,
        "David S . Miller" <>
Subject: [PATCH net-next 1/1] net: dsa: fix fixed-link port registration

Commit 88d6272acaaa ("net: phy: avoid unneeded MDIO reads in
genphy_read_status") broke fixed link DSA port registration in
dsa_port_fixed_link_register_of: the genphy_read_status does not do what
it is supposed to and the following adjust_link is given wrong

This causes a regression on Turris Omnia, where the mvneta driver for
the interface connected to the switch reports crc errors, for some

I realize this fix is not ideal, something else could change in genphy
functions which could cause DSA fixed-link port to break again.
Hopefully DSA fixed-link port functionality will be converted to phylink
API soon.

Signed-off-by: Marek Behún <>
Cc: Heiner Kallweit <>
Cc: Sebastian Reichel <>
Cc: Vivien Didelot <>
Cc: Andrew Lunn <>
Cc: Florian Fainelli <>
Cc: David S. Miller <>
 net/dsa/port.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/net/dsa/port.c b/net/dsa/port.c
index 363eab6df51b..c424ebb373e1 100644
--- a/net/dsa/port.c
+++ b/net/dsa/port.c
@@ -485,6 +485,17 @@ static int dsa_port_fixed_link_register_of(struct dsa_port *dp)
 	phydev->interface = mode;
+	/*
+	 * Commit 88d6272acaaa caused genphy_read_status not to do it's work if
+	 * autonegotiation is enabled and link status did not change. This is
+	 * the case for fixed_phy. By setting phydev->link = 0 before the call
+	 * to genphy_read_status we force it to read and fill in the parameters.
+	 *
+	 * Hopefully this dirty hack will be removed soon by converting DSA
+	 * fixed link ports to phylink API.
+	 */
+	phydev->link = 0;
 	if (ds->ops->adjust_link)

Powered by blists - more mailing lists