Deleted Added
full compact
efx_intr.c (293814) efx_intr.c (299320)
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>
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_intr.c 293814 2016-01-13 07:25:51Z arybchik $");
32__FBSDID("$FreeBSD: head/sys/dev/sfxge/common/efx_intr.c 299320 2016-05-10 07:01:06Z arybchik $");
33
34#include "efx.h"
35#include "efx_impl.h"
36
37
33
34#include "efx.h"
35#include "efx_impl.h"
36
37
38#if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA
38#if EFSYS_OPT_SIENA
39
40static __checkReturn efx_rc_t
41falconsiena_intr_init(
42 __in efx_nic_t *enp,
43 __in efx_intr_type_t type,
44 __in efsys_mem_t *esmp);
45
46static void

--- 33 unchanged lines hidden (view full) ---

80falconsiena_intr_fatal(
81 __in efx_nic_t *enp);
82
83static __checkReturn boolean_t
84falconsiena_intr_check_fatal(
85 __in efx_nic_t *enp);
86
87
39
40static __checkReturn efx_rc_t
41falconsiena_intr_init(
42 __in efx_nic_t *enp,
43 __in efx_intr_type_t type,
44 __in efsys_mem_t *esmp);
45
46static void

--- 33 unchanged lines hidden (view full) ---

80falconsiena_intr_fatal(
81 __in efx_nic_t *enp);
82
83static __checkReturn boolean_t
84falconsiena_intr_check_fatal(
85 __in efx_nic_t *enp);
86
87
88#endif /* EFSYS_OPT_FALCON || EFSYS_OPT_SIENA */
88#endif /* EFSYS_OPT_SIENA */
89
90
89
90
91#if EFSYS_OPT_FALCON
92static efx_intr_ops_t __efx_intr_falcon_ops = {
93 falconsiena_intr_init, /* eio_init */
94 falconsiena_intr_enable, /* eio_enable */
95 falconsiena_intr_disable, /* eio_disable */
96 falconsiena_intr_disable_unlocked, /* eio_disable_unlocked */
97 falconsiena_intr_trigger, /* eio_trigger */
98 falconsiena_intr_status_line, /* eio_status_line */
99 falconsiena_intr_status_message, /* eio_status_message */
100 falconsiena_intr_fatal, /* eio_fatal */
101 falconsiena_intr_fini, /* eio_fini */
102};
103#endif /* EFSYS_OPT_FALCON */
104
105#if EFSYS_OPT_SIENA
106static efx_intr_ops_t __efx_intr_siena_ops = {
107 falconsiena_intr_init, /* eio_init */
108 falconsiena_intr_enable, /* eio_enable */
109 falconsiena_intr_disable, /* eio_disable */
110 falconsiena_intr_disable_unlocked, /* eio_disable_unlocked */
111 falconsiena_intr_trigger, /* eio_trigger */
112 falconsiena_intr_status_line, /* eio_status_line */

--- 37 unchanged lines hidden (view full) ---

150
151 eip->ei_esmp = esmp;
152 eip->ei_type = type;
153 eip->ei_level = 0;
154
155 enp->en_mod_flags |= EFX_MOD_INTR;
156
157 switch (enp->en_family) {
91#if EFSYS_OPT_SIENA
92static efx_intr_ops_t __efx_intr_siena_ops = {
93 falconsiena_intr_init, /* eio_init */
94 falconsiena_intr_enable, /* eio_enable */
95 falconsiena_intr_disable, /* eio_disable */
96 falconsiena_intr_disable_unlocked, /* eio_disable_unlocked */
97 falconsiena_intr_trigger, /* eio_trigger */
98 falconsiena_intr_status_line, /* eio_status_line */

--- 37 unchanged lines hidden (view full) ---

136
137 eip->ei_esmp = esmp;
138 eip->ei_type = type;
139 eip->ei_level = 0;
140
141 enp->en_mod_flags |= EFX_MOD_INTR;
142
143 switch (enp->en_family) {
158#if EFSYS_OPT_FALCON
159 case EFX_FAMILY_FALCON:
160 eiop = (efx_intr_ops_t *)&__efx_intr_falcon_ops;
161 break;
162#endif /* EFSYS_OPT_FALCON */
163
164#if EFSYS_OPT_SIENA
165 case EFX_FAMILY_SIENA:
166 eiop = (efx_intr_ops_t *)&__efx_intr_siena_ops;
167 break;
168#endif /* EFSYS_OPT_SIENA */
169
170#if EFSYS_OPT_HUNTINGTON
171 case EFX_FAMILY_HUNTINGTON:

--- 143 unchanged lines hidden (view full) ---

315 eiop->eio_fatal(enp);
316}
317
318
319/* ************************************************************************* */
320/* ************************************************************************* */
321/* ************************************************************************* */
322
144#if EFSYS_OPT_SIENA
145 case EFX_FAMILY_SIENA:
146 eiop = (efx_intr_ops_t *)&__efx_intr_siena_ops;
147 break;
148#endif /* EFSYS_OPT_SIENA */
149
150#if EFSYS_OPT_HUNTINGTON
151 case EFX_FAMILY_HUNTINGTON:

--- 143 unchanged lines hidden (view full) ---

295 eiop->eio_fatal(enp);
296}
297
298
299/* ************************************************************************* */
300/* ************************************************************************* */
301/* ************************************************************************* */
302
323#if EFSYS_OPT_FALCON || EFSYS_OPT_SIENA
303#if EFSYS_OPT_SIENA
324
325static __checkReturn efx_rc_t
326falconsiena_intr_init(
327 __in efx_nic_t *enp,
328 __in efx_intr_type_t type,
329 __in efsys_mem_t *esmp)
330{
331 efx_intr_t *eip = &(enp->en_intr);

--- 270 unchanged lines hidden (view full) ---

602{
603 efx_oword_t oword;
604
605 /* Clear the interrupt address register */
606 EFX_ZERO_OWORD(oword);
607 EFX_BAR_WRITEO(enp, FR_AZ_INT_ADR_REG_KER, &oword);
608}
609
304
305static __checkReturn efx_rc_t
306falconsiena_intr_init(
307 __in efx_nic_t *enp,
308 __in efx_intr_type_t type,
309 __in efsys_mem_t *esmp)
310{
311 efx_intr_t *eip = &(enp->en_intr);

--- 270 unchanged lines hidden (view full) ---

582{
583 efx_oword_t oword;
584
585 /* Clear the interrupt address register */
586 EFX_ZERO_OWORD(oword);
587 EFX_BAR_WRITEO(enp, FR_AZ_INT_ADR_REG_KER, &oword);
588}
589
610#endif /* EFSYS_OPT_FALCON || EFSYS_OPT_SIENA */
590#endif /* EFSYS_OPT_SIENA */