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

net: phy: Fix the mdix_ctrl changes

PHY drivers to have an eth_tp_mdix_ctrl to indicate what is the configured
MDI setting, and read eth_tp_mdi to indicate what is the current status,

Add new parameter mdix_ctrl in phy_device structure and fix driver.

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
4e26c5c3 233275ec

+3 -3
+2 -2
drivers/net/phy/marvell.c
··· 268 268 if (err < 0) 269 269 return err; 270 270 271 - err = marvell_set_polarity(phydev, phydev->mdix); 271 + err = marvell_set_polarity(phydev, phydev->mdix_ctrl); 272 272 if (err < 0) 273 273 return err; 274 274 ··· 311 311 */ 312 312 err = phy_write(phydev, MII_BMCR, BMCR_RESET); 313 313 314 - err = marvell_set_polarity(phydev, phydev->mdix); 314 + err = marvell_set_polarity(phydev, phydev->mdix_ctrl); 315 315 if (err < 0) 316 316 return err; 317 317
+1 -1
drivers/net/phy/microchip.c
··· 111 111 int buf; 112 112 int val; 113 113 114 - switch (phydev->mdix) { 114 + switch (phydev->mdix_ctrl) { 115 115 case ETH_TP_MDI: 116 116 val = LAN88XX_EXT_MODE_CTRL_MDI_; 117 117 break;