svn commit: r279078 - head/sys/dev/sfxge/common
Andrew Rybchenko
arybchik at FreeBSD.org
Fri Feb 20 19:42:06 UTC 2015
Author: arybchik
Date: Fri Feb 20 19:42:05 2015
New Revision: 279078
URL: https://svnweb.freebsd.org/changeset/base/279078
Log:
sfxge: add assertions that required event handlers are implemented
efx_ev_mcdi() does not assert or check that all event handlers it
calls are non-null. Add assertions at the top for all required
event handlers, as some events (in the case of this bug, monitor
events) are rare.
Submitted by: Ben Hutchings
Sponsored by: Solarflare Communications, Inc.
Approved by: gnn (mentor)
Modified:
head/sys/dev/sfxge/common/efx_ev.c
Modified: head/sys/dev/sfxge/common/efx_ev.c
==============================================================================
--- head/sys/dev/sfxge/common/efx_ev.c Fri Feb 20 19:39:40 2015 (r279077)
+++ head/sys/dev/sfxge/common/efx_ev.c Fri Feb 20 19:42:05 2015 (r279078)
@@ -567,6 +567,12 @@ efx_ev_mcdi(
if (enp->en_family != EFX_FAMILY_SIENA)
goto out;
+ EFSYS_ASSERT(eecp->eec_link_change != NULL);
+ EFSYS_ASSERT(eecp->eec_exception != NULL);
+#if EFSYS_OPT_MON_STATS
+ EFSYS_ASSERT(eecp->eec_monitor != NULL);
+#endif
+
EFX_EV_QSTAT_INCR(eep, EV_MCDI_RESPONSE);
code = EFX_QWORD_FIELD(*eqp, MCDI_EVENT_CODE);
More information about the svn-src-all
mailing list