aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sfxge/common
diff options
context:
space:
mode:
authorAndrew Rybchenko <arybchik@FreeBSD.org>2018-11-30 07:06:24 +0000
committerAndrew Rybchenko <arybchik@FreeBSD.org>2018-11-30 07:06:24 +0000
commitaea82ebf8a236e5e94af50841c140b2757c31618 (patch)
treee8ac7652852dc2fd2d728d2083643c28b6d23a87 /sys/dev/sfxge/common
parent39e58a98ba0fd1545721aec8c844158ed9ba757c (diff)
sfxge(4): prevent access to the NIC config before probe
NIC config is initialized during NIC probe. Submitted by: Mark Spender <mspender at solarflare.com> Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18263
Notes
Notes: svn path=/head/; revision=341301
Diffstat (limited to 'sys/dev/sfxge/common')
-rw-r--r--sys/dev/sfxge/common/efx_nic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/sfxge/common/efx_nic.c b/sys/dev/sfxge/common/efx_nic.c
index 906bd2169b52..cd1efe5e8881 100644
--- a/sys/dev/sfxge/common/efx_nic.c
+++ b/sys/dev/sfxge/common/efx_nic.c
@@ -624,6 +624,7 @@ efx_nic_cfg_get(
__in efx_nic_t *enp)
{
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
+ EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
return (&(enp->en_nic_cfg));
}