sfc: Move PHY software state initialisation from init() into probe()
This prevents efx->link_advertising from being blatted during a reset. The phy_short_reach sysfs node is now destroyed later in the port shutdown process, so check for STATE_RUNNING after acquiring the rtnl_lock (just like in set_phy_flash_cfg). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
ed4b2019a6
commit
ff3b00a0fc
@@ -741,14 +741,14 @@ static int efx_probe_port(struct efx_nic *efx)
|
||||
|
||||
EFX_LOG(efx, "create port\n");
|
||||
|
||||
if (phy_flash_cfg)
|
||||
efx->phy_mode = PHY_MODE_SPECIAL;
|
||||
|
||||
/* Connect up MAC/PHY operations table */
|
||||
rc = efx->type->probe_port(efx);
|
||||
if (rc)
|
||||
goto err;
|
||||
|
||||
if (phy_flash_cfg)
|
||||
efx->phy_mode = PHY_MODE_SPECIAL;
|
||||
|
||||
/* Sanity check MAC address */
|
||||
if (is_valid_ether_addr(efx->mac_address)) {
|
||||
memcpy(efx->net_dev->dev_addr, efx->mac_address, ETH_ALEN);
|
||||
|
Reference in New Issue
Block a user