projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b11af0c
)
net: dsa: mv88e6xxx: call phy_init_eee
author
Vivien Didelot
<
[email protected]
>
Tue, 1 Aug 2017 20:32:37 +0000
(16:32 -0400)
committer
David S. Miller
<
[email protected]
>
Wed, 2 Aug 2017 03:09:10 +0000
(20:09 -0700)
It is safer to init the EEE before the DSA layer call
phy_ethtool_set_eee, as sf2 and qca8k are doing.
Signed-off-by: Vivien Didelot <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/dsa/mv88e6xxx/chip.c
patch
|
blob
|
history
diff --git
a/drivers/net/dsa/mv88e6xxx/chip.c
b/drivers/net/dsa/mv88e6xxx/chip.c
index 647d5d45c1d6cdf4603248b7b560eb9434de561c..b531d4a3bab5b1b75d353005459ec4732994e47f 100644
(file)
--- a/
drivers/net/dsa/mv88e6xxx/chip.c
+++ b/
drivers/net/dsa/mv88e6xxx/chip.c
@@
-855,6
+855,12
@@
static int mv88e6xxx_set_eee(struct dsa_switch *ds, int port,
struct mv88e6xxx_chip *chip = ds->priv;
int err;
+ if (e->eee_enabled) {
+ err = phy_init_eee(phydev, 0);
+ if (err)
+ return err;
+ }
+
mutex_lock(&chip->reg_lock);
err = mv88e6xxx_energy_detect_write(chip, port, e);
mutex_unlock(&chip->reg_lock);