lkml.org 
[lkml]   [2018]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] net: phy: dp83640: Read strapped configuration settings
Date
From: Esben Haabendal <eha@deif.com>

Read configration settings, to allow automatic forced speed/duplex setup
by hardware strapping.

Signed-off-by: Esben Haabendal <eha@deif.com>
Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
drivers/net/phy/dp83640.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c
index 654f42d00092..01e21b4998ad 100644
--- a/drivers/net/phy/dp83640.c
+++ b/drivers/net/phy/dp83640.c
@@ -1134,6 +1134,10 @@ static int dp83640_probe(struct phy_device *phydev)
if (!dp83640)
goto no_memory;

+ err = genphy_read_config(phydev);
+ if (err)
+ goto no_config;
+
dp83640->phydev = phydev;
INIT_DELAYED_WORK(&dp83640->ts_work, rx_timestamp_work);

@@ -1166,6 +1170,7 @@ static int dp83640_probe(struct phy_device *phydev)

no_register:
clock->chosen = NULL;
+no_config:
kfree(dp83640);
no_memory:
dp83640_clock_put(clock);
--
2.16.3
\
 
 \ /
  Last update: 2018-04-05 13:45    [W:0.045 / U:3.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site