Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1700433 > unrolled thread

[PATCH net-next 07/11] net: dsa: mv88e6xxx: call phy_init_eee

Started byVivien Didelot <vivien.didelot@savoirfairelinux.com>
First post2017-08-01 00:30 +0200
Last post2017-08-01 00:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH net-next 07/11] net: dsa: mv88e6xxx: call phy_init_eee Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-08-01 00:30 +0200

#1700433 — [PATCH net-next 07/11] net: dsa: mv88e6xxx: call phy_init_eee

FromVivien Didelot <vivien.didelot@savoirfairelinux.com>
Date2017-08-01 00:30 +0200
Subject[PATCH net-next 07/11] net: dsa: mv88e6xxx: call phy_init_eee
Message-ID<u9rmh-3wp-5@gated-at.bofh.it>
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 <vivien.didelot@savoirfairelinux.com>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 647d5d45c1d6..b531d4a3bab5 100644
--- 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);
-- 
2.13.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web