Commit 9794ef5a authored by Ivan Bornyakov's avatar Ivan Bornyakov Committed by David S. Miller

net: phy: marvell-88x2222: set proper phydev->port

phydev->port was not set and always reported as PORT_TP.
Set phydev->port according to inserted SFP module.
Signed-off-by: default avatarIvan Bornyakov <i.bornyakov@metrotek.ru>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3a51e969
...@@ -490,6 +490,7 @@ static int mv2222_sfp_insert(void *upstream, const struct sfp_eeprom_id *id) ...@@ -490,6 +490,7 @@ static int mv2222_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
dev = &phydev->mdio.dev; dev = &phydev->mdio.dev;
sfp_parse_support(phydev->sfp_bus, id, sfp_supported); sfp_parse_support(phydev->sfp_bus, id, sfp_supported);
phydev->port = sfp_parse_port(phydev->sfp_bus, id, sfp_supported);
sfp_interface = sfp_select_interface(phydev->sfp_bus, sfp_supported); sfp_interface = sfp_select_interface(phydev->sfp_bus, sfp_supported);
dev_info(dev, "%s SFP module inserted\n", phy_modes(sfp_interface)); dev_info(dev, "%s SFP module inserted\n", phy_modes(sfp_interface));
...@@ -526,6 +527,7 @@ static void mv2222_sfp_remove(void *upstream) ...@@ -526,6 +527,7 @@ static void mv2222_sfp_remove(void *upstream)
priv->line_interface = PHY_INTERFACE_MODE_NA; priv->line_interface = PHY_INTERFACE_MODE_NA;
linkmode_zero(priv->supported); linkmode_zero(priv->supported);
phydev->port = PORT_NONE;
} }
static void mv2222_sfp_link_up(void *upstream) static void mv2222_sfp_link_up(void *upstream)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment