diff options
author | Jonathan Cooper <jonathan.s.cooper@amd.com> | 2022-06-28 14:58:55 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-06-29 13:40:46 +0100 |
commit | 813cf9d1e753e1e0a247d3d685212a06141b483e (patch) | |
tree | 108c23698e4a65d42fedf23a66dab167f1dbec6c /drivers/net/ethernet/sfc/ef100_netdev.c | |
parent | da8ff2a278b94088f501e55f543644f88b3ffe37 (diff) |
sfc: Split STATE_READY in to STATE_NET_DOWN and STATE_NET_UP.
This patch splits the READY state in to NET_UP and NET_DOWN. This
is to prepare for future work to delay resource allocation until
interface up so that we can use resources more efficiently in
SRIOV environments, and also to lay the ground work for an extra
PROBED state where we don't create a network interface,
for VDPA operation.
Signed-off-by: Jonathan Cooper <jonathan.s.cooper@amd.com>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/ef100_netdev.c')
-rw-r--r-- | drivers/net/ethernet/sfc/ef100_netdev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/ef100_netdev.c b/drivers/net/ethernet/sfc/ef100_netdev.c index 67fe44db6b61..b9106ce678d9 100644 --- a/drivers/net/ethernet/sfc/ef100_netdev.c +++ b/drivers/net/ethernet/sfc/ef100_netdev.c @@ -96,6 +96,8 @@ static int ef100_net_stop(struct net_device *net_dev) efx_mcdi_free_vis(efx); efx_remove_interrupts(efx); + efx->state = STATE_NET_DOWN; + return 0; } @@ -172,6 +174,8 @@ static int ef100_net_open(struct net_device *net_dev) efx_link_status_changed(efx); mutex_unlock(&efx->mac_lock); + efx->state = STATE_NET_UP; + return 0; fail: @@ -271,7 +275,7 @@ int ef100_register_netdev(struct efx_nic *efx) /* Always start with carrier off; PHY events will detect the link */ netif_carrier_off(net_dev); - efx->state = STATE_READY; + efx->state = STATE_NET_DOWN; rtnl_unlock(); efx_init_mcdi_logging(efx); |