LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: esben.haabendal@gmail.com
To: Richard Cochran <richardcochran@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
netdev@vger.kernel.org (open list:PTP HARDWARE CLOCK SUPPORT),
linux-kernel@vger.kernel.org (open list)
Cc: Esben Haabendal <eha@deif.com>,
Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Subject: [PATCH 2/2] net: phy: dp83640: Read strapped configuration settings
Date: Thu, 5 Apr 2018 13:44:24 +0200 [thread overview]
Message-ID: <20180405114424.8519-2-esben.haabendal@gmail.com> (raw)
In-Reply-To: <20180405114424.8519-1-esben.haabendal@gmail.com>
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
next prev parent reply other threads:[~2018-04-05 11:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-05 11:44 [PATCH 1/2] net: phy: Helper function for reading strapped configuration values esben.haabendal
2018-04-05 11:44 ` esben.haabendal [this message]
2018-04-05 16:02 ` [PATCH 2/2] net: phy: dp83640: Read strapped configuration settings Florian Fainelli
2018-04-05 20:30 ` Esben Haabendal
2018-04-05 20:40 ` Andrew Lunn
2018-04-06 2:24 ` David Miller
2018-04-06 11:05 ` Esben Haabendal
2018-04-05 20:34 ` Esben Haabendal
2018-04-05 16:00 ` [PATCH 1/2] net: phy: Helper function for reading strapped configuration values Florian Fainelli
2018-04-05 20:18 ` Esben Haabendal
2018-04-05 20:34 ` Esben Haabendal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180405114424.8519-2-esben.haabendal@gmail.com \
--to=esben.haabendal@gmail.com \
--cc=andrew@lunn.ch \
--cc=eha@deif.com \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rasmus.villemoes@prevas.dk \
--cc=richardcochran@gmail.com \
--subject='Re: [PATCH 2/2] net: phy: dp83640: Read strapped configuration settings' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).