lists.openwall.net   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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 13 Feb 2017 13:22:09 +0100
From:   Thomas Graziadei <thomas.graziadei@...cronenergy.com>
To:     <claudiu.manoil@...escale.com>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
CC:     Thomas Graziadei <thomas.graziadei@...cronenergy.com>
Subject: [PATCH 2/2] gianfar: Use the same initial values as the phy layer

From: Thomas Graziadei <thomas.graziadei@...cronenergy.com>

The phy layer sets the link status initially to 1 to also support phyless
systems, therefore we set the gianfar drivers initial link status also to
1. This prevents the gfar_update_link_state() method to be called when the
driver and phy have just been initialized but no link state change was
detected yet.

Signed-off-by: Thomas Graziadei <thomas.graziadei@...cronenergy.com>
---
 drivers/net/ethernet/freescale/gianfar.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index b3b5c43..be0d23e 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -1705,7 +1705,7 @@ static int gfar_restore(struct device *dev)
 
 	gfar_start(priv);
 
-	priv->oldlink = 0;
+	priv->oldlink = 1;
 	priv->oldspeed = 0;
 	priv->oldduplex = -1;
 
@@ -1791,7 +1791,7 @@ static int init_phy(struct net_device *dev)
 	phy_interface_t interface;
 	struct phy_device *phydev;
 
-	priv->oldlink = 0;
+	priv->oldlink = 1;
 	priv->oldspeed = 0;
 	priv->oldduplex = -1;
 
@@ -2212,7 +2212,7 @@ int startup_gfar(struct net_device *ndev)
 	gfar_start(priv);
 
 	/* force link state update after mac reset */
-	priv->oldlink = 0;
+	priv->oldlink = 1;
 	priv->oldspeed = 0;
 	priv->oldduplex = -1;
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ