提交 2cae8c07 编写于 作者: F Florian Fainelli 提交者: David S. Miller

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: 0e01491d ("net: dsa: b53: Add SerDes support")
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e24cf6b3
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册