__in const efx_ev_callbacks_t *eecp,
__in_opt void *arg);
-static __checkReturn boolean_t
-ef10_ev_mcdi(
- __in efx_evq_t *eep,
- __in efx_qword_t *eqp,
- __in const efx_ev_callbacks_t *eecp,
- __in_opt void *arg);
-
static __checkReturn efx_rc_t
efx_mcdi_set_evq_tmr(
return (should_abort);
}
-static __checkReturn boolean_t
+#endif /* EFX_OPTS_EF10() */
+
+#if EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10()
+
+ __checkReturn boolean_t
ef10_ev_mcdi(
__in efx_evq_t *eep,
__in efx_qword_t *eqp,
return (should_abort);
}
+#endif /* EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10() */
+
+#if EFX_OPTS_EF10()
+
void
ef10_ev_rxlabel_init(
__in efx_evq_t *eep,
#define EFX_RHEAD_ALWAYS_INTERRUPTING_EVQ_INDEX (0)
+static __checkReturn boolean_t
+rhead_ev_mcdi(
+ __in efx_evq_t *eep,
+ __in efx_qword_t *eqp,
+ __in const efx_ev_callbacks_t *eecp,
+ __in_opt void *arg);
+
+
__checkReturn efx_rc_t
rhead_ev_init(
__in efx_nic_t *enp)
eep->ee_tx = NULL; /* FIXME */
eep->ee_driver = NULL; /* FIXME */
eep->ee_drv_gen = NULL; /* FIXME */
- eep->ee_mcdi = NULL; /* FIXME */
+ eep->ee_mcdi = rhead_ev_mcdi;
/* Set up the event queue */
/* INIT_EVQ expects function-relative vector number */
code = EFX_QWORD_FIELD(ev[index], ESF_GZ_E_TYPE);
switch (code) {
+ case ESE_GZ_EF100_EV_MCDI:
+ should_abort = eep->ee_mcdi(eep,
+ &(ev[index]), eecp, arg);
+ break;
default:
EFSYS_PROBE3(bad_event,
unsigned int, eep->ee_index,
}
#endif /* EFSYS_OPT_QSTATS */
+static __checkReturn boolean_t
+rhead_ev_mcdi(
+ __in efx_evq_t *eep,
+ __in efx_qword_t *eqp,
+ __in const efx_ev_callbacks_t *eecp,
+ __in_opt void *arg)
+{
+ boolean_t ret;
+
+ /*
+ * Event format was changed post Riverhead R1 and now
+ * MCDI event layout on EF100 is exactly the same as on EF10
+ * except added QDMA phase bit which is unused on EF10.
+ */
+ ret = ef10_ev_mcdi(eep, eqp, eecp, arg);
+
+ return (ret);
+}
+
#endif /* EFSYS_OPT_RIVERHEAD */