]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: hns: Fix a wrong op phy C45 code
authorYunsheng Lin <linyunsheng@huawei.com>
Thu, 6 Jul 2017 02:21:59 +0000 (10:21 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Jul 2017 10:05:21 +0000 (11:05 +0100)
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>
drivers/net/ethernet/hisilicon/hns_mdio.c

index e5221d95afe195583b7496130cf1a544d1b1f97f..017e08452d8c0b2ae9b1117e182b099aa36c0447 100644 (file)
@@ -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,