summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/efx_common.h
diff options
context:
space:
mode:
authorJonathan Cooper <jonathan.s.cooper@amd.com>2022-06-28 14:58:55 +0100
committerDavid S. Miller <davem@davemloft.net>2022-06-29 13:40:46 +0100
commit813cf9d1e753e1e0a247d3d685212a06141b483e (patch)
tree108c23698e4a65d42fedf23a66dab167f1dbec6c /drivers/net/ethernet/sfc/efx_common.h
parentda8ff2a278b94088f501e55f543644f88b3ffe37 (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/efx_common.h')
-rw-r--r--drivers/net/ethernet/sfc/efx_common.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sfc/efx_common.h b/drivers/net/ethernet/sfc/efx_common.h
index 65513fd0cf6c..c72e819da8fd 100644
--- a/drivers/net/ethernet/sfc/efx_common.h
+++ b/drivers/net/ethernet/sfc/efx_common.h
@@ -45,9 +45,7 @@ int efx_reconfigure_port(struct efx_nic *efx);
#define EFX_ASSERT_RESET_SERIALISED(efx) \
do { \
- if ((efx->state == STATE_READY) || \
- (efx->state == STATE_RECOVERY) || \
- (efx->state == STATE_DISABLED)) \
+ if (efx->state != STATE_UNINIT) \
ASSERT_RTNL(); \
} while (0)
@@ -64,7 +62,7 @@ void efx_port_dummy_op_void(struct efx_nic *efx);
static inline int efx_check_disabled(struct efx_nic *efx)
{
- if (efx->state == STATE_DISABLED || efx->state == STATE_RECOVERY) {
+ if (efx->state == STATE_DISABLED || efx_recovering(efx->state)) {
netif_err(efx, drv, efx->net_dev,
"device is disabled due to earlier errors\n");
return -EIO;