mm: make wait_on_page_writeback() wait for multiple pending writebacks
[linux/fpc-iii.git] / include / scsi / fc / fc_ms.h
blob9e273fed0a85fccfefac6bb8460d0b76396763ba
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright(c) 2011 Intel Corporation. All rights reserved.
5 * Maintained at www.Open-FCoE.org
6 */
8 #ifndef _FC_MS_H_
9 #define _FC_MS_H_
11 #include <linux/types.h>
14 * Fibre Channel Services - Management Service (MS)
15 * From T11.org FC-GS-4 Rev 7.91 February 4, 2004
19 * Fabric Device Management Interface
23 * Common-transport sub-type for FDMI
25 #define FC_FDMI_SUBTYPE 0x10 /* fs_ct_hdr.ct_fs_subtype */
28 * Management server FDMI Requests.
30 enum fc_fdmi_req {
31 FC_FDMI_GRHL = 0x0100, /* Get Registered HBA List */
32 FC_FDMI_GHAT = 0x0101, /* Get HBA Attributes */
33 FC_FDMI_GRPL = 0x0102, /* Get Registered Port List */
34 FC_FDMI_GPAT = 0x0110, /* Get Port Attributes */
35 FC_FDMI_RHBA = 0x0200, /* Register HBA */
36 FC_FDMI_RHAT = 0x0201, /* Register HBA Attributes */
37 FC_FDMI_RPRT = 0x0210, /* Register Port */
38 FC_FDMI_RPA = 0x0211, /* Register Port Attributes */
39 FC_FDMI_DHBA = 0x0300, /* Deregister HBA */
40 FC_FDMI_DHAT = 0x0301, /* Deregister HBA Attributes */
41 FC_FDMI_DPRT = 0x0310, /* Deregister Port */
42 FC_FDMI_DPA = 0x0311, /* Deregister Port Attributes */
46 * HBA Attribute Entry Type
48 enum fc_fdmi_hba_attr_type {
49 FC_FDMI_HBA_ATTR_NODENAME = 0x0001,
50 FC_FDMI_HBA_ATTR_MANUFACTURER = 0x0002,
51 FC_FDMI_HBA_ATTR_SERIALNUMBER = 0x0003,
52 FC_FDMI_HBA_ATTR_MODEL = 0x0004,
53 FC_FDMI_HBA_ATTR_MODELDESCRIPTION = 0x0005,
54 FC_FDMI_HBA_ATTR_HARDWAREVERSION = 0x0006,
55 FC_FDMI_HBA_ATTR_DRIVERVERSION = 0x0007,
56 FC_FDMI_HBA_ATTR_OPTIONROMVERSION = 0x0008,
57 FC_FDMI_HBA_ATTR_FIRMWAREVERSION = 0x0009,
58 FC_FDMI_HBA_ATTR_OSNAMEVERSION = 0x000A,
59 FC_FDMI_HBA_ATTR_MAXCTPAYLOAD = 0x000B,
63 * HBA Attribute Length
65 #define FC_FDMI_HBA_ATTR_NODENAME_LEN 8
66 #define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN 80
67 #define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN 80
68 #define FC_FDMI_HBA_ATTR_MODEL_LEN 256
69 #define FC_FDMI_HBA_ATTR_MODELDESCR_LEN 256
70 #define FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN 256
71 #define FC_FDMI_HBA_ATTR_DRIVERVERSION_LEN 256
72 #define FC_FDMI_HBA_ATTR_OPTIONROMVERSION_LEN 256
73 #define FC_FDMI_HBA_ATTR_FIRMWAREVERSION_LEN 256
74 #define FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN 256
75 #define FC_FDMI_HBA_ATTR_MAXCTPAYLOAD_LEN 4
78 * Port Attribute Type
80 enum fc_fdmi_port_attr_type {
81 FC_FDMI_PORT_ATTR_FC4TYPES = 0x0001,
82 FC_FDMI_PORT_ATTR_SUPPORTEDSPEED = 0x0002,
83 FC_FDMI_PORT_ATTR_CURRENTPORTSPEED = 0x0003,
84 FC_FDMI_PORT_ATTR_MAXFRAMESIZE = 0x0004,
85 FC_FDMI_PORT_ATTR_OSDEVICENAME = 0x0005,
86 FC_FDMI_PORT_ATTR_HOSTNAME = 0x0006,
90 * Port Attribute Length
92 #define FC_FDMI_PORT_ATTR_FC4TYPES_LEN 32
93 #define FC_FDMI_PORT_ATTR_SUPPORTEDSPEED_LEN 4
94 #define FC_FDMI_PORT_ATTR_CURRENTPORTSPEED_LEN 4
95 #define FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN 4
96 #define FC_FDMI_PORT_ATTR_OSDEVICENAME_LEN 256
97 #define FC_FDMI_PORT_ATTR_HOSTNAME_LEN 256
100 * HBA Attribute ID
102 struct fc_fdmi_hba_identifier {
103 __be64 id;
107 * Port Name
109 struct fc_fdmi_port_name {
110 __be64 portname;
114 * Attribute Entry Block for HBA/Port Attributes
116 #define FC_FDMI_ATTR_ENTRY_HEADER_LEN 4
117 struct fc_fdmi_attr_entry {
118 __be16 type;
119 __be16 len;
120 __u8 value[1];
121 } __attribute__((__packed__));
124 * Common for HBA/Port Attributes
126 struct fs_fdmi_attrs {
127 __be32 numattrs;
128 struct fc_fdmi_attr_entry attr[1];
129 } __attribute__((__packed__));
132 * Registered Port List
134 struct fc_fdmi_rpl {
135 __be32 numport;
136 struct fc_fdmi_port_name port[1];
137 } __attribute__((__packed__));
140 * Register HBA (RHBA)
142 struct fc_fdmi_rhba {
143 struct fc_fdmi_hba_identifier hbaid;
144 struct fc_fdmi_rpl port;
145 struct fs_fdmi_attrs hba_attrs;
146 } __attribute__((__packed__));
149 * Register HBA Attributes (RHAT)
151 struct fc_fdmi_rhat {
152 struct fc_fdmi_hba_identifier hbaid;
153 struct fs_fdmi_attrs hba_attrs;
154 } __attribute__((__packed__));
157 * Register Port (RPRT)
159 struct fc_fdmi_rprt {
160 struct fc_fdmi_hba_identifier hbaid;
161 struct fc_fdmi_port_name port;
162 struct fs_fdmi_attrs hba_attrs;
163 } __attribute__((__packed__));
166 * Register Port Attributes (RPA)
168 struct fc_fdmi_rpa {
169 struct fc_fdmi_port_name port;
170 struct fs_fdmi_attrs hba_attrs;
171 } __attribute__((__packed__));
174 * Deregister Port (DPRT)
176 struct fc_fdmi_dprt {
177 struct fc_fdmi_port_name port;
178 } __attribute__((__packed__));
181 * Deregister Port Attributes (DPA)
183 struct fc_fdmi_dpa {
184 struct fc_fdmi_port_name port;
185 struct fs_fdmi_attrs hba_attrs;
186 } __attribute__((__packed__));
189 * Deregister HBA Attributes (DHAT)
191 struct fc_fdmi_dhat {
192 struct fc_fdmi_hba_identifier hbaid;
193 } __attribute__((__packed__));
196 * Deregister HBA (DHBA)
198 struct fc_fdmi_dhba {
199 struct fc_fdmi_hba_identifier hbaid;
200 } __attribute__((__packed__));
202 #endif /* _FC_MS_H_ */