Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fc_ms.h
Go to the documentation of this file.
1 /* * Copyright(c) 2011 Intel Corporation. All rights reserved.
2  *
3  * This program is free software; you can redistribute it and/or modify it
4  * under the terms and conditions of the GNU General Public License,
5  * version 2, as published by the Free Software Foundation.
6  *
7  * This program is distributed in the hope it will be useful, but WITHOUT
8  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
10  * more details.
11  *
12  * You should have received a copy of the GNU General Public License along with
13  * this program; if not, write to the Free Software Foundation, Inc.,
14  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
15  *
16  * Maintained at www.Open-FCoE.org
17  */
18 
19 #ifndef _FC_MS_H_
20 #define _FC_MS_H_
21 
22 #include <linux/types.h>
23 
24 /*
25  * Fibre Channel Services - Management Service (MS)
26  * From T11.org FC-GS-4 Rev 7.91 February 4, 2004
27  */
28 
29 /*
30  * Fabric Device Management Interface
31  */
32 
33 /*
34  * Common-transport sub-type for FDMI
35  */
36 #define FC_FDMI_SUBTYPE 0x10 /* fs_ct_hdr.ct_fs_subtype */
37 
38 /*
39  * Management server FDMI Requests.
40  */
42  FC_FDMI_GRHL = 0x0100, /* Get Registered HBA List */
43  FC_FDMI_GHAT = 0x0101, /* Get HBA Attributes */
44  FC_FDMI_GRPL = 0x0102, /* Get Registered Port List */
45  FC_FDMI_GPAT = 0x0110, /* Get Port Attributes */
46  FC_FDMI_RHBA = 0x0200, /* Register HBA */
47  FC_FDMI_RHAT = 0x0201, /* Register HBA Attributes */
48  FC_FDMI_RPRT = 0x0210, /* Register Port */
49  FC_FDMI_RPA = 0x0211, /* Register Port Attributes */
50  FC_FDMI_DHBA = 0x0300, /* Deregister HBA */
51  FC_FDMI_DHAT = 0x0301, /* Deregister HBA Attributes */
52  FC_FDMI_DPRT = 0x0310, /* Deregister Port */
53  FC_FDMI_DPA = 0x0311, /* Deregister Port Attributes */
54 };
55 
56 /*
57  * HBA Attribute Entry Type
58  */
71 };
72 
73 /*
74  * HBA Attribute Length
75  */
76 #define FC_FDMI_HBA_ATTR_NODENAME_LEN 8
77 #define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN 64
78 #define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN 64
79 #define FC_FDMI_HBA_ATTR_MODEL_LEN 256
80 #define FC_FDMI_HBA_ATTR_MODELDESCR_LEN 256
81 #define FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN 256
82 #define FC_FDMI_HBA_ATTR_DRIVERVERSION_LEN 256
83 #define FC_FDMI_HBA_ATTR_OPTIONROMVERSION_LEN 256
84 #define FC_FDMI_HBA_ATTR_FIRMWAREVERSION_LEN 256
85 #define FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN 256
86 #define FC_FDMI_HBA_ATTR_MAXCTPAYLOAD_LEN 4
87 
88 /*
89  * Port Attribute Type
90  */
98 };
99 
100 /*
101  * Port Attribute Length
102  */
103 #define FC_FDMI_PORT_ATTR_FC4TYPES_LEN 32
104 #define FC_FDMI_PORT_ATTR_SUPPORTEDSPEED_LEN 4
105 #define FC_FDMI_PORT_ATTR_CURRENTPORTSPEED_LEN 4
106 #define FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN 4
107 #define FC_FDMI_PORT_ATTR_OSDEVICENAME_LEN 256
108 #define FC_FDMI_PORT_ATTR_HOSTNAME_LEN 256
109 
110 /*
111  * HBA Attribute ID
112  */
115 };
116 
117 /*
118  * Port Name
119  */
122 };
123 
124 /*
125  * Attribute Entry Block for HBA/Port Attributes
126  */
127 #define FC_FDMI_ATTR_ENTRY_HEADER_LEN 4
132 } __attribute__((__packed__));
134 /*
135  * Common for HBA/Port Attributes
136  */
140 } __attribute__((__packed__));
142 /*
143  * Registered Port List
144  */
145 struct fc_fdmi_rpl {
148 } __attribute__((__packed__));
150 /*
151  * Register HBA (RHBA)
152  */
153 struct fc_fdmi_rhba {
157 } __attribute__((__packed__));
159 /*
160  * Register HBA Attributes (RHAT)
161  */
162 struct fc_fdmi_rhat {
165 } __attribute__((__packed__));
166 
167 /*
168  * Register Port (RPRT)
169  */
170 struct fc_fdmi_rprt {
174 } __attribute__((__packed__));
175 
176 /*
177  * Register Port Attributes (RPA)
178  */
179 struct fc_fdmi_rpa {
182 } __attribute__((__packed__));
183 
184 /*
185  * Deregister Port (DPRT)
186  */
187 struct fc_fdmi_dprt {
189 } __attribute__((__packed__));
190 
191 /*
192  * Deregister Port Attributes (DPA)
193  */
194 struct fc_fdmi_dpa {
197 } __attribute__((__packed__));
198 
199 /*
200  * Deregister HBA Attributes (DHAT)
201  */
202 struct fc_fdmi_dhat {
204 } __attribute__((__packed__));
205 
206 /*
207  * Deregister HBA (DHBA)
208  */
209 struct fc_fdmi_dhba {
211 } __attribute__((__packed__));
212 
213 #endif /* _FC_MS_H_ */