All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 1/1] net: dsa: qca8k: Fix internal PHY MDIO address
@ 2019-03-21 18:23 Marek Behún
  2019-03-21 18:26 ` Florian Fainelli
  0 siblings, 1 reply; 9+ messages in thread
From: Marek Behún @ 2019-03-21 18:23 UTC (permalink / raw)
  To: netdev
  Cc: Marek Behún, Andrew Lunn, Florian Fainelli,
	Michal Vokáč,
	John Crispin, Wei Yongjun

The MDIO addresses of the internal PHYs on this switch for ports 1-5
have addresses 0-4, not 1-5.

Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Michal Vokáč <vokac.m@gmail.com>
Cc: John Crispin <john@phrozen.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/dsa/qca8k.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index cdcde7f8e0b2..eb199193cc3b 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -625,7 +625,7 @@ qca8k_phy_read(struct dsa_switch *ds, int phy, int regnum)
 {
 	struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
 
-	return mdiobus_read(priv->bus, phy, regnum);
+	return mdiobus_read(priv->bus, phy - 1, regnum);
 }
 
 static int
@@ -633,7 +633,7 @@ qca8k_phy_write(struct dsa_switch *ds, int phy, int regnum, u16 val)
 {
 	struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
 
-	return mdiobus_write(priv->bus, phy, regnum, val);
+	return mdiobus_write(priv->bus, phy - 1, regnum, val);
 }
 
 static void
-- 
2.19.2


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-25 19:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 18:23 [PATCH net-next 1/1] net: dsa: qca8k: Fix internal PHY MDIO address Marek Behún
2019-03-21 18:26 ` Florian Fainelli
2019-03-21 19:55   ` Marek Behun
2019-03-21 22:24     ` Christian Lamparter
2019-03-21 23:01       ` Marek Behun
2019-03-22  0:05         ` Christian Lamparter
2019-03-25 17:51           ` Christian Lamparter
2019-03-25 19:34             ` Marek Behun
2019-03-21 19:56   ` Christian Lamparter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.