2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 #ifndef _FC_TYPES_H
27 #define _FC_TYPES_H
28
29
30
31 /*
32 * Types for FC Transport subsystems.
33 *
34 * This file picks up specific as well as generic type
35 * defines, and also serves as a wrapper for many common
36 * includes.
37 */
38
39 #include <sys/types.h>
40 #include <sys/param.h>
41
43 extern "C" {
44 #endif
45
46 #if !defined(_BIT_FIELDS_LTOH) && !defined(_BIT_FIELDS_HTOL)
47 #error One of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL must be defined
48 #endif /* _BIT_FIELDS_LTOH */
49
50 #ifdef _KERNEL
51 #include <sys/systm.h>
52 #include <sys/cmn_err.h>
53 #include <sys/debug.h>
54 #include <sys/devops.h>
55 #include <sys/callb.h>
56 #include <sys/disp.h>
57 #include <sys/taskq.h>
58 #endif /* _KERNEL */
59
60 #ifndef _SYS_SCSI_SCSI_TYPES_H
61
62
63 #ifdef __STDC__
64 typedef void *opaque_t;
65 #else /* __STDC__ */
66 typedef char *opaque_t;
67 #endif /* __STDC__ */
68
69 #endif /* _SYS_SCSI_SCSI_TYPES_H */
70
71 /* Sysevent defs */
72 #define EC_SUNFC "EC_sunfc"
73 #define ESC_SUNFC_PORT_ATTACH "ESC_sunfc_port_attach"
74 #define ESC_SUNFC_PORT_DETACH "ESC_sunfc_port_detach"
75 #define ESC_SUNFC_PORT_ONLINE "ESC_sunfc_port_online"
76 #define ESC_SUNFC_PORT_OFFLINE "ESC_sunfc_port_offline"
77 #define ESC_SUNFC_PORT_RSCN "ESC_sunfc_port_rscn"
78 #define ESC_SUNFC_TARGET_ADD "ESC_sunfc_target_add"
79 #define ESC_SUNFC_TARGET_REMOVE "ESC_sunfc_target_remove"
80 #define ESC_SUNFC_DEVICE_ONLINE "ESC_sunfc_device_online"
81 #define ESC_SUNFC_DEVICE_OFFLINE "ESC_sunfc_device_offline"
82
83 /* T11 FC-HBA state change tracking */
84 typedef uint64_t fc_hba_state_change_t;
85
86 typedef struct port_id {
87 #if defined(_BIT_FIELDS_LTOH)
|
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 /*
22 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
23 *
24 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
25 * Use is subject to license terms.
26 */
27
28 #ifndef _FC_TYPES_H
29 #define _FC_TYPES_H
30
31
32
33 /*
34 * Types for FC Transport subsystems.
35 *
36 * This file picks up specific as well as generic type
37 * defines, and also serves as a wrapper for many common
38 * includes.
39 */
40
41 #include <sys/types.h>
42 #include <sys/param.h>
43
45 extern "C" {
46 #endif
47
48 #if !defined(_BIT_FIELDS_LTOH) && !defined(_BIT_FIELDS_HTOL)
49 #error One of _BIT_FIELDS_LTOH or _BIT_FIELDS_HTOL must be defined
50 #endif /* _BIT_FIELDS_LTOH */
51
52 #ifdef _KERNEL
53 #include <sys/systm.h>
54 #include <sys/cmn_err.h>
55 #include <sys/debug.h>
56 #include <sys/devops.h>
57 #include <sys/callb.h>
58 #include <sys/disp.h>
59 #include <sys/taskq.h>
60 #endif /* _KERNEL */
61
62 #ifndef _SYS_SCSI_SCSI_TYPES_H
63
64
65 typedef void *opaque_t;
66
67 #endif /* _SYS_SCSI_SCSI_TYPES_H */
68
69 /* Sysevent defs */
70 #define EC_SUNFC "EC_sunfc"
71 #define ESC_SUNFC_PORT_ATTACH "ESC_sunfc_port_attach"
72 #define ESC_SUNFC_PORT_DETACH "ESC_sunfc_port_detach"
73 #define ESC_SUNFC_PORT_ONLINE "ESC_sunfc_port_online"
74 #define ESC_SUNFC_PORT_OFFLINE "ESC_sunfc_port_offline"
75 #define ESC_SUNFC_PORT_RSCN "ESC_sunfc_port_rscn"
76 #define ESC_SUNFC_TARGET_ADD "ESC_sunfc_target_add"
77 #define ESC_SUNFC_TARGET_REMOVE "ESC_sunfc_target_remove"
78 #define ESC_SUNFC_DEVICE_ONLINE "ESC_sunfc_device_online"
79 #define ESC_SUNFC_DEVICE_OFFLINE "ESC_sunfc_device_offline"
80
81 /* T11 FC-HBA state change tracking */
82 typedef uint64_t fc_hba_state_change_t;
83
84 typedef struct port_id {
85 #if defined(_BIT_FIELDS_LTOH)
|