* [PATCH] dsa: slave: eee: Allow ports to use phylink
@ 2018-08-08 18:56 Andrew Lunn
2018-08-08 19:00 ` Florian Fainelli
2018-08-09 2:19 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Andrew Lunn @ 2018-08-08 18:56 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Florian Fainelli, Andrew Lunn
For a port to be able to use EEE, both the MAC and the PHY must
support EEE. A phy can be provided by both a phydev or phylink. Verify
at least one of these exist, not just phydev.
Fixes: aab9c4067d23 ("net: dsa: Plug in PHYLINK support")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
net/dsa/slave.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 80b71bab3e59..973e99aa4107 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -640,7 +640,7 @@ static int dsa_slave_set_eee(struct net_device *dev, struct ethtool_eee *e)
int ret;
/* Port's PHY and MAC both need to be EEE capable */
- if (!dev->phydev)
+ if (!dev->phydev && !dp->pl)
return -ENODEV;
if (!ds->ops->set_mac_eee)
@@ -660,7 +660,7 @@ static int dsa_slave_get_eee(struct net_device *dev, struct ethtool_eee *e)
int ret;
/* Port's PHY and MAC both need to be EEE capable */
- if (!dev->phydev)
+ if (!dev->phydev && !dp->pl)
return -ENODEV;
if (!ds->ops->get_mac_eee)
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dsa: slave: eee: Allow ports to use phylink
2018-08-08 18:56 [PATCH] dsa: slave: eee: Allow ports to use phylink Andrew Lunn
@ 2018-08-08 19:00 ` Florian Fainelli
2018-08-09 2:19 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2018-08-08 19:00 UTC (permalink / raw)
To: Andrew Lunn, David Miller; +Cc: netdev
On 08/08/2018 11:56 AM, Andrew Lunn wrote:
> For a port to be able to use EEE, both the MAC and the PHY must
> support EEE. A phy can be provided by both a phydev or phylink. Verify
> at least one of these exist, not just phydev.
>
> Fixes: aab9c4067d23 ("net: dsa: Plug in PHYLINK support")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dsa: slave: eee: Allow ports to use phylink
2018-08-08 18:56 [PATCH] dsa: slave: eee: Allow ports to use phylink Andrew Lunn
2018-08-08 19:00 ` Florian Fainelli
@ 2018-08-09 2:19 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-08-09 2:19 UTC (permalink / raw)
To: andrew; +Cc: netdev, f.fainelli
From: Andrew Lunn <andrew@lunn.ch>
Date: Wed, 8 Aug 2018 20:56:40 +0200
> For a port to be able to use EEE, both the MAC and the PHY must
> support EEE. A phy can be provided by both a phydev or phylink. Verify
> at least one of these exist, not just phydev.
>
> Fixes: aab9c4067d23 ("net: dsa: Plug in PHYLINK support")
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Applied, thanks Andrew.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-09 4:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-08 18:56 [PATCH] dsa: slave: eee: Allow ports to use phylink Andrew Lunn
2018-08-08 19:00 ` Florian Fainelli
2018-08-09 2:19 ` David Miller
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).