lkml.org 
[lkml]   [2017]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] gianfar: Use the same initial values as the phy layer
Date
From: Thomas Graziadei <thomas.graziadei@omicronenergy.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@omicronenergy.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
\
 
 \ /
  Last update: 2017-02-13 14:10    [W:0.133 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site