1/*- 2 * Copyright (c) 2007-2015 Solarflare Communications Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, --- 15 unchanged lines hidden (view full) --- 24 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * 26 * The views and conclusions contained in the software and documentation are 27 * those of the authors and should not be interpreted as representing official 28 * policies, either expressed or implied, of the FreeBSD Project. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/efx_ev.c 299320 2016-05-10 07:01:06Z arybchik $"); |
33 34#include "efx.h" 35#include "efx_impl.h" 36#if EFSYS_OPT_MON_MCDI 37#include "mcdi_mon.h" 38#endif 39 40#if EFSYS_OPT_QSTATS --- 7 unchanged lines hidden (view full) --- 48#endif 49 50#define EFX_EV_PRESENT(_qword) \ 51 (EFX_QWORD_FIELD((_qword), EFX_DWORD_0) != 0xffffffff && \ 52 EFX_QWORD_FIELD((_qword), EFX_DWORD_1) != 0xffffffff) 53 54 55 |
56#if EFSYS_OPT_SIENA |
57 58static __checkReturn efx_rc_t 59falconsiena_ev_init( 60 __in efx_nic_t *enp); 61 62static void 63falconsiena_ev_fini( 64 __in efx_nic_t *enp); --- 36 unchanged lines hidden (view full) --- 101#if EFSYS_OPT_QSTATS 102static void 103falconsiena_ev_qstats_update( 104 __in efx_evq_t *eep, 105 __inout_ecount(EV_NQSTATS) efsys_stat_t *stat); 106 107#endif 108 |
109#endif /* EFSYS_OPT_SIENA */ |
110 |
111#if EFSYS_OPT_SIENA 112static efx_ev_ops_t __efx_ev_siena_ops = { 113 falconsiena_ev_init, /* eevo_init */ 114 falconsiena_ev_fini, /* eevo_fini */ 115 falconsiena_ev_qcreate, /* eevo_qcreate */ 116 falconsiena_ev_qdestroy, /* eevo_qdestroy */ 117 falconsiena_ev_qprime, /* eevo_qprime */ 118 falconsiena_ev_qpost, /* eevo_qpost */ --- 31 unchanged lines hidden (view full) --- 150 EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR); 151 152 if (enp->en_mod_flags & EFX_MOD_EV) { 153 rc = EINVAL; 154 goto fail1; 155 } 156 157 switch (enp->en_family) { |
158#if EFSYS_OPT_SIENA 159 case EFX_FAMILY_SIENA: 160 eevop = (efx_ev_ops_t *)&__efx_ev_siena_ops; 161 break; 162#endif /* EFSYS_OPT_SIENA */ 163 164#if EFSYS_OPT_HUNTINGTON 165 case EFX_FAMILY_HUNTINGTON: --- 259 unchanged lines hidden (view full) --- 425 426 EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); 427 428 eevop->eevo_qstats_update(eep, stat); 429} 430 431#endif /* EFSYS_OPT_QSTATS */ 432 |
433#if EFSYS_OPT_SIENA |
434 435static __checkReturn efx_rc_t 436falconsiena_ev_init( 437 __in efx_nic_t *enp) 438{ 439 efx_oword_t oword; 440 441 /* --- 894 unchanged lines hidden (view full) --- 1336fail2: 1337 EFSYS_PROBE(fail2); 1338fail1: 1339 EFSYS_PROBE1(fail1, efx_rc_t, rc); 1340 1341 return (rc); 1342} 1343 |
1344#endif /* EFSYS_OPT_SIENA */ |
1345 1346#if EFSYS_OPT_QSTATS 1347#if EFSYS_OPT_NAMES 1348/* START MKCONFIG GENERATED EfxEventQueueStatNamesBlock b693ddf85aee1bfd */ 1349static const char *__efx_ev_qstat_name[] = { 1350 "all", 1351 "rx", 1352 "rx_ok", --- 42 unchanged lines hidden (view full) --- 1395 EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); 1396 EFSYS_ASSERT3U(id, <, EV_NQSTATS); 1397 1398 return (__efx_ev_qstat_name[id]); 1399} 1400#endif /* EFSYS_OPT_NAMES */ 1401#endif /* EFSYS_OPT_QSTATS */ 1402 |
1403#if EFSYS_OPT_SIENA |
1404 1405#if EFSYS_OPT_QSTATS 1406static void 1407falconsiena_ev_qstats_update( 1408 __in efx_evq_t *eep, 1409 __inout_ecount(EV_NQSTATS) efsys_stat_t *stat) 1410{ 1411 unsigned int id; --- 29 unchanged lines hidden (view full) --- 1441 1442static void 1443falconsiena_ev_fini( 1444 __in efx_nic_t *enp) 1445{ 1446 _NOTE(ARGUNUSED(enp)) 1447} 1448 |
1449#endif /* EFSYS_OPT_SIENA */ |