Skip to content

Commit

Permalink
net: dsa: b53: Fix B53_SERDES_DIGITAL_CONTROL offset
Browse files Browse the repository at this point in the history
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: 0e01491 ("net: dsa: b53: Add SerDes support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Sep 22, 2018
1 parent e24cf6b commit 2cae8c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/dsa/b53/b53_serdes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 2cae8c0

Please sign in to comment.