From: Vijay Srivastava Date: Mon, 10 Sep 2018 09:33:11 +0000 (+0100) Subject: net/sfc/base: add check for TUNNEL module in NIC reset API X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=f933b46a0a95dd3a7fd5d206a24649d847fffbb6;p=dpdk.git net/sfc/base: add check for TUNNEL module in NIC reset API Fixes: 17551f6dffcc ("net/sfc/base: add API to control UDP tunnel ports") Cc: stable@dpdk.org Signed-off-by: Vijay Srivastava Signed-off-by: Andrew Rybchenko --- diff --git a/drivers/net/sfc/base/efx_nic.c b/drivers/net/sfc/base/efx_nic.c index 6314ae2ff2..0e8ed9c2a4 100644 --- a/drivers/net/sfc/base/efx_nic.c +++ b/drivers/net/sfc/base/efx_nic.c @@ -549,7 +549,7 @@ efx_nic_reset( EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT(enp->en_mod_flags & EFX_MOD_PROBE); /* - * All modules except the MCDI, PROBE, NVRAM, VPD, MON + * All modules except the MCDI, PROBE, NVRAM, VPD, MON, TUNNEL * (which we do not reset here) must have been shut down or never * initialized. * @@ -560,6 +560,9 @@ efx_nic_reset( mod_flags = enp->en_mod_flags; mod_flags &= ~(EFX_MOD_MCDI | EFX_MOD_PROBE | EFX_MOD_NVRAM | EFX_MOD_VPD | EFX_MOD_MON); +#if EFSYS_OPT_TUNNEL + mod_flags &= ~EFX_MOD_TUNNEL; +#endif /* EFSYS_OPT_TUNNEL */ EFSYS_ASSERT3U(mod_flags, ==, 0); if (mod_flags != 0) { rc = EINVAL;