Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: update the mdix_ctrl with correct value.

Update the mdix and mdix_ctrl with corresponding ethtool configuration
parameters.

Signed-off-by: Raju Lakkaraju <Raju.Lakkaraju@microsemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Raju Lakkaraju and committed by
David S. Miller
1004ee61 f4ed2fe3

+6 -4
+6 -4
drivers/net/phy/phy.c
··· 389 389 390 390 phydev->duplex = cmd->duplex; 391 391 392 - phydev->mdix = cmd->eth_tp_mdix_ctrl; 392 + phydev->mdix_ctrl = cmd->eth_tp_mdix_ctrl; 393 393 394 394 /* Restart the PHY */ 395 395 phy_start_aneg(phydev); ··· 443 443 444 444 phydev->duplex = duplex; 445 445 446 - phydev->mdix = cmd->base.eth_tp_mdix_ctrl; 446 + phydev->mdix_ctrl = cmd->base.eth_tp_mdix_ctrl; 447 447 448 448 /* Restart the PHY */ 449 449 phy_start_aneg(phydev); ··· 469 469 cmd->transceiver = phy_is_internal(phydev) ? 470 470 XCVR_INTERNAL : XCVR_EXTERNAL; 471 471 cmd->autoneg = phydev->autoneg; 472 - cmd->eth_tp_mdix_ctrl = phydev->mdix; 472 + cmd->eth_tp_mdix_ctrl = phydev->mdix_ctrl; 473 + cmd->eth_tp_mdix = phydev->mdix; 473 474 474 475 return 0; 475 476 } ··· 497 496 498 497 cmd->base.phy_address = phydev->mdio.addr; 499 498 cmd->base.autoneg = phydev->autoneg; 500 - cmd->base.eth_tp_mdix_ctrl = phydev->mdix; 499 + cmd->base.eth_tp_mdix_ctrl = phydev->mdix_ctrl; 500 + cmd->base.eth_tp_mdix = phydev->mdix; 501 501 502 502 return 0; 503 503 }