lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190321182319.10664-1-marek.behun@nic.cz>
Date:   Thu, 21 Mar 2019 19:23:19 +0100
From:   Marek Behún <marek.behun@....cz>
To:     netdev@...r.kernel.org
Cc:     Marek Behún <marek.behun@....cz>,
        Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Michal Vokáč <vokac.m@...il.com>,
        John Crispin <john@...ozen.org>,
        Wei Yongjun <weiyongjun1@...wei.com>
Subject: [PATCH net-next 1/1] net: dsa: qca8k: Fix internal PHY MDIO address

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@....cz>
Cc: Andrew Lunn <andrew@...n.ch>
Cc: Florian Fainelli <f.fainelli@...il.com>
Cc: Michal Vokáč <vokac.m@...il.com>
Cc: John Crispin <john@...ozen.org>
Cc: Wei Yongjun <weiyongjun1@...wei.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ