提交 cec8abba 编写于 作者: Y Yonglong Liu 提交者: David S. Miller

net: hns: Fix wrong read accesses via Clause 45 MDIO protocol

When reading phy registers via Clause 45 MDIO protocol, after write
address operation, the driver use another write address operation, so
can not read the right value of any phy registers. This patch fixes it.
Signed-off-by: NYonglong Liu <liuyonglong@huawei.com>
Signed-off-by: NPeng Li <lipeng321@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ed29ca8b
...@@ -321,7 +321,7 @@ static int hns_mdio_read(struct mii_bus *bus, int phy_id, int regnum) ...@@ -321,7 +321,7 @@ static int hns_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
} }
hns_mdio_cmd_write(mdio_dev, is_c45, hns_mdio_cmd_write(mdio_dev, is_c45,
MDIO_C45_WRITE_ADDR, phy_id, devad); MDIO_C45_READ, phy_id, devad);
} }
/* Step 5: waitting for MDIO_COMMAND_REG 's mdio_start==0,*/ /* Step 5: waitting for MDIO_COMMAND_REG 's mdio_start==0,*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册