diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2017-07-06 05:21:59 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-08 13:05:21 +0300 |
commit | ebe8d359c90d6e237527f4d0544b62bdcc0ff286 (patch) | |
tree | e59c14cd9f6d505a8fc905a7f349a7c07ea8232f /drivers/net/ethernet/hisilicon/hns_mdio.c | |
parent | 233a15875396fd88203644fd9fba8d179aa40119 (diff) | |
download | linux-ebe8d359c90d6e237527f4d0544b62bdcc0ff286.tar.xz |
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: 5b904d39406a ("net: add Hisilicon Network Subsystem MDIO support")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Reviewed-by: lipeng <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns_mdio.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns_mdio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns_mdio.c b/drivers/net/ethernet/hisilicon/hns_mdio.c index e5221d95afe1..017e08452d8c 100644 --- a/drivers/net/ethernet/hisilicon/hns_mdio.c +++ b/drivers/net/ethernet/hisilicon/hns_mdio.c @@ -261,7 +261,7 @@ static int hns_mdio_write(struct mii_bus *bus, /* config the data needed writing */ 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, |