aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns_mdio.c
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2017-07-06 10:21:59 +0800
committerDavid S. Miller <davem@davemloft.net>2017-07-08 11:05:21 +0100
commitebe8d359c90d6e237527f4d0544b62bdcc0ff286 (patch)
treee59c14cd9f6d505a8fc905a7f349a7c07ea8232f /drivers/net/ethernet/hisilicon/hns_mdio.c
parentnet: macb: Adding Support for Jumbo Frames up to 10240 Bytes in SAMA5D3 (diff)
downloadlinux-dev-ebe8d359c90d6e237527f4d0544b62bdcc0ff286.tar.xz
linux-dev-ebe8d359c90d6e237527f4d0544b62bdcc0ff286.zip
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.c2
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,