Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6032fb56 authored by Ben Hutchings's avatar Ben Hutchings
Browse files

sfc: Keep disabled NICs quiescent during suspend/resume



Currently we ignore and clear the disabled state.

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
parent 61da026d
Loading
Loading
Loading
Loading
+16 −12
Original line number Diff line number Diff line
@@ -2729,12 +2729,14 @@ static int efx_pm_freeze(struct device *dev)

	rtnl_lock();

	if (efx->state != STATE_DISABLED) {
		efx->state = STATE_UNINIT;

		netif_device_detach(efx->net_dev);

		efx_stop_all(efx);
		efx_stop_interrupts(efx, false);
	}

	rtnl_unlock();

@@ -2747,6 +2749,7 @@ static int efx_pm_thaw(struct device *dev)

	rtnl_lock();

	if (efx->state != STATE_DISABLED) {
		efx_start_interrupts(efx, false);

		mutex_lock(&efx->mac_lock);
@@ -2760,6 +2763,7 @@ static int efx_pm_thaw(struct device *dev)
		efx->state = STATE_READY;

		efx->type->resume_wol(efx);
	}

	rtnl_unlock();