[PATCH net 2/3] net: hns: Fix a wrong op phy C45 code
From: Lin Yun Sheng
Date: Tue Jul 04 2017 - 06:17:02 EST
From: Yunsheng Lin <linyunsheng@xxxxxxxxxx>
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.
Signed-off-by: Yankejian <yankejian@xxxxxxxxxx>
Reviewed-by: lipeng <lipeng321@xxxxxxxxxx>
Reviewed-by: Yunsheng Lin <linyunsheng@xxxxxxxxxx>
---
drivers/net/ethernet/hisilicon/hns_mdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns_mdio.c b/drivers/net/ethernet/hisilicon/hns_mdio.c
index e5221d9..017e084 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,
--
1.9.1