net/mlx5: fix DevX Rx queue memory alignment
[dpdk.git] / drivers / net / sfc / base / efx_ev.c
index 69224cb..b9fc5ca 100644 (file)
 #include "mcdi_mon.h"
 #endif
 
-#if EFSYS_OPT_QSTATS
-#define        EFX_EV_QSTAT_INCR(_eep, _stat)                                  \
-       do {                                                            \
-               (_eep)->ee_stat[_stat]++;                               \
-       _NOTE(CONSTANTCONDITION)                                        \
-       } while (B_FALSE)
-#else
-#define        EFX_EV_QSTAT_INCR(_eep, _stat)
-#endif
-
 #define        EFX_EV_PRESENT(_qword)                                          \
        (EFX_QWORD_FIELD((_qword), EFX_DWORD_0) != 0xffffffff &&        \
        EFX_QWORD_FIELD((_qword), EFX_DWORD_1) != 0xffffffff)
@@ -566,6 +556,12 @@ efx_ev_usecs_to_ticks(
 {
        efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
        unsigned int ticks;
+       efx_rc_t rc;
+
+       if (encp->enc_evq_timer_quantum_ns == 0) {
+               rc = ENOTSUP;
+               goto fail1;
+       }
 
        /* Convert microseconds to a timer tick count */
        if (us == 0)
@@ -577,6 +573,10 @@ efx_ev_usecs_to_ticks(
 
        *ticksp = ticks;
        return (0);
+
+fail1:
+       EFSYS_PROBE1(fail1, efx_rc_t, rc);
+       return (rc);
 }
 
        __checkReturn   efx_rc_t