aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2018-09-21 16:43:58 -0700
committerDavid S. Miller <davem@davemloft.net>2018-09-21 20:01:19 -0700
commit2cae8c07cb8c03a98aecbb8c7fb14c1922772adb (patch)
treeb39e4b70f8127be4c776b3648b03196b91d4aaba /drivers/net/dsa
parentnet: dsa: b53: Don't assign autonegotiation enabled (diff)
downloadlinux-dev-2cae8c07cb8c03a98aecbb8c7fb14c1922772adb.tar.xz
linux-dev-2cae8c07cb8c03a98aecbb8c7fb14c1922772adb.zip
net: dsa: b53: Fix B53_SERDES_DIGITAL_CONTROL offset
Maths went wrong, to get 0x20, we need to do 0x1e + (x) * 2, not 0x18, fix that offset so we access the correct registers. This would make us not access the correct SerDes Digital control words, status would be fine and so we would not be correctly flipping between Fiber and SGMII modes resulting in incorrect status words being pulled into the SerDes digital status register. Fixes: 0e01491de646 ("net: dsa: b53: Add SerDes support") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r--drivers/net/dsa/b53/b53_serdes.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/b53/b53_serdes.h b/drivers/net/dsa/b53/b53_serdes.h
index eed7c9357091..3bb4f91aec9e 100644
--- a/drivers/net/dsa/b53/b53_serdes.h
+++ b/drivers/net/dsa/b53/b53_serdes.h
@@ -20,7 +20,7 @@
#define SERDES_ID0_REV_LETTER_SHIFT 14
#define B53_SERDES_MII_REG(x) (0x20 + (x) * 2)
-#define B53_SERDES_DIGITAL_CONTROL(x) (0x18 + (x) * 2)
+#define B53_SERDES_DIGITAL_CONTROL(x) (0x1e + (x) * 2)
#define B53_SERDES_DIGITAL_STATUS 0x28
/* SERDES_DIGITAL_CONTROL1 */