Commit ebe8d359 authored by Yunsheng Lin's avatar Yunsheng Lin Committed by David S. Miller

net: hns: Fix a wrong op phy C45 code

As the user manual described, the second step to write to C45 phy
by mdio should be data, but not address. Here we should fix this
issue.

Fixes: 5b904d39 ("net: add Hisilicon Network Subsystem MDIO support")
Signed-off-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
Reviewed-by: default avatarlipeng <lipeng321@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 233a1587
...@@ -261,7 +261,7 @@ static int hns_mdio_write(struct mii_bus *bus, ...@@ -261,7 +261,7 @@ static int hns_mdio_write(struct mii_bus *bus,
/* config the data needed writing */ /* config the data needed writing */
cmd_reg_cfg = devad; cmd_reg_cfg = devad;
op = MDIO_C45_WRITE_ADDR; op = MDIO_C45_WRITE_DATA;
} }
MDIO_SET_REG_FIELD(mdio_dev, MDIO_WDATA_REG, MDIO_WDATA_DATA_M, MDIO_SET_REG_FIELD(mdio_dev, MDIO_WDATA_REG, MDIO_WDATA_DATA_M,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment