drivers: net: phy: xgene: Fix mdio write
authorQuan Nguyen <qnguyen@apm.com>
Wed, 15 Mar 2017 20:27:15 +0000 (13:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Mar 2017 04:52:51 +0000 (21:52 -0700)
This patches fixes a typo in the argument to xgene_enet_wr_mdio_csr().

Signed-off-by: Quan Nguyen <qnguyen@apm.com>
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio-xgene.c

index f095051beb549133db52cf3acd41ad9e3dbed29c..3e2ac07b6e372322c53125014cbac8b40ea1434f 100644 (file)
@@ -229,7 +229,7 @@ static int xgene_xfi_mdio_write(struct mii_bus *bus, int phy_id,
 
        val = SET_VAL(HSTPHYADX, phy_id) | SET_VAL(HSTREGADX, reg) |
              SET_VAL(HSTMIIMWRDAT, data);
-       xgene_enet_wr_mdio_csr(addr, MIIM_FIELD_ADDR, data);
+       xgene_enet_wr_mdio_csr(addr, MIIM_FIELD_ADDR, val);
 
        val = HSTLDCMD | SET_VAL(HSTMIIMCMD, MIIM_CMD_LEGACY_WRITE);
        xgene_enet_wr_mdio_csr(addr, MIIM_COMMAND_ADDR, val);