0001
0002
0003
0004
0005
0006
0007
0008 #ifndef _FC_MS_H_
0009 #define _FC_MS_H_
0010
0011 #include <linux/types.h>
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #define FC_FDMI_SUBTYPE 0x10
0026
0027
0028
0029
0030 #define FDMI_V1 1
0031 #define FDMI_V2 2
0032
0033
0034
0035
0036 enum fc_fdmi_req {
0037 FC_FDMI_GRHL = 0x0100,
0038 FC_FDMI_GHAT = 0x0101,
0039 FC_FDMI_GRPL = 0x0102,
0040 FC_FDMI_GPAT = 0x0110,
0041 FC_FDMI_RHBA = 0x0200,
0042 FC_FDMI_RHAT = 0x0201,
0043 FC_FDMI_RPRT = 0x0210,
0044 FC_FDMI_RPA = 0x0211,
0045 FC_FDMI_DHBA = 0x0300,
0046 FC_FDMI_DHAT = 0x0301,
0047 FC_FDMI_DPRT = 0x0310,
0048 FC_FDMI_DPA = 0x0311,
0049 };
0050
0051
0052
0053
0054 enum fc_fdmi_hba_attr_type {
0055 FC_FDMI_HBA_ATTR_NODENAME = 0x0001,
0056 FC_FDMI_HBA_ATTR_MANUFACTURER = 0x0002,
0057 FC_FDMI_HBA_ATTR_SERIALNUMBER = 0x0003,
0058 FC_FDMI_HBA_ATTR_MODEL = 0x0004,
0059 FC_FDMI_HBA_ATTR_MODELDESCRIPTION = 0x0005,
0060 FC_FDMI_HBA_ATTR_HARDWAREVERSION = 0x0006,
0061 FC_FDMI_HBA_ATTR_DRIVERVERSION = 0x0007,
0062 FC_FDMI_HBA_ATTR_OPTIONROMVERSION = 0x0008,
0063 FC_FDMI_HBA_ATTR_FIRMWAREVERSION = 0x0009,
0064 FC_FDMI_HBA_ATTR_OSNAMEVERSION = 0x000A,
0065 FC_FDMI_HBA_ATTR_MAXCTPAYLOAD = 0x000B,
0066 FC_FDMI_HBA_ATTR_NODESYMBLNAME = 0x000C,
0067 FC_FDMI_HBA_ATTR_VENDORSPECIFICINFO = 0x000D,
0068 FC_FDMI_HBA_ATTR_NUMBEROFPORTS = 0x000E,
0069 FC_FDMI_HBA_ATTR_FABRICNAME = 0x000F,
0070 FC_FDMI_HBA_ATTR_BIOSVERSION = 0x0010,
0071 FC_FDMI_HBA_ATTR_BIOSSTATE = 0x0011,
0072 FC_FDMI_HBA_ATTR_VENDORIDENTIFIER = 0x00E0,
0073 };
0074
0075
0076
0077
0078 #define FC_FDMI_HBA_ATTR_NODENAME_LEN 8
0079 #define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN 64
0080 #define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN 64
0081 #define FC_FDMI_HBA_ATTR_MODEL_LEN 64
0082 #define FC_FDMI_HBA_ATTR_MODELDESCR_LEN 64
0083 #define FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN 64
0084 #define FC_FDMI_HBA_ATTR_DRIVERVERSION_LEN 64
0085 #define FC_FDMI_HBA_ATTR_OPTIONROMVERSION_LEN 64
0086 #define FC_FDMI_HBA_ATTR_FIRMWAREVERSION_LEN 64
0087 #define FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN 128
0088 #define FC_FDMI_HBA_ATTR_MAXCTPAYLOAD_LEN 4
0089 #define FC_FDMI_HBA_ATTR_NODESYMBLNAME_LEN 64
0090 #define FC_FDMI_HBA_ATTR_VENDORSPECIFICINFO_LEN 4
0091 #define FC_FDMI_HBA_ATTR_NUMBEROFPORTS_LEN 4
0092 #define FC_FDMI_HBA_ATTR_FABRICNAME_LEN 8
0093 #define FC_FDMI_HBA_ATTR_BIOSVERSION_LEN 64
0094 #define FC_FDMI_HBA_ATTR_BIOSSTATE_LEN 4
0095 #define FC_FDMI_HBA_ATTR_VENDORIDENTIFIER_LEN 8
0096
0097
0098
0099
0100 enum fc_fdmi_port_attr_type {
0101 FC_FDMI_PORT_ATTR_FC4TYPES = 0x0001,
0102 FC_FDMI_PORT_ATTR_SUPPORTEDSPEED = 0x0002,
0103 FC_FDMI_PORT_ATTR_CURRENTPORTSPEED = 0x0003,
0104 FC_FDMI_PORT_ATTR_MAXFRAMESIZE = 0x0004,
0105 FC_FDMI_PORT_ATTR_OSDEVICENAME = 0x0005,
0106 FC_FDMI_PORT_ATTR_HOSTNAME = 0x0006,
0107 FC_FDMI_PORT_ATTR_NODENAME = 0x0007,
0108 FC_FDMI_PORT_ATTR_PORTNAME = 0x0008,
0109 FC_FDMI_PORT_ATTR_SYMBOLICNAME = 0x0009,
0110 FC_FDMI_PORT_ATTR_PORTTYPE = 0x000A,
0111 FC_FDMI_PORT_ATTR_SUPPORTEDCLASSSRVC = 0x000B,
0112 FC_FDMI_PORT_ATTR_FABRICNAME = 0x000C,
0113 FC_FDMI_PORT_ATTR_CURRENTFC4TYPE = 0x000D,
0114 FC_FDMI_PORT_ATTR_PORTSTATE = 0x101,
0115 FC_FDMI_PORT_ATTR_DISCOVEREDPORTS = 0x102,
0116 FC_FDMI_PORT_ATTR_PORTID = 0x103,
0117 };
0118
0119
0120
0121
0122 #define FC_FDMI_PORT_ATTR_FC4TYPES_LEN 32
0123 #define FC_FDMI_PORT_ATTR_SUPPORTEDSPEED_LEN 4
0124 #define FC_FDMI_PORT_ATTR_CURRENTPORTSPEED_LEN 4
0125 #define FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN 4
0126 #define FC_FDMI_PORT_ATTR_OSDEVICENAME_LEN 256
0127 #define FC_FDMI_PORT_ATTR_HOSTNAME_LEN 256
0128 #define FC_FDMI_PORT_ATTR_NODENAME_LEN 8
0129 #define FC_FDMI_PORT_ATTR_PORTNAME_LEN 8
0130 #define FC_FDMI_PORT_ATTR_SYMBOLICNAME_LEN 256
0131 #define FC_FDMI_PORT_ATTR_PORTTYPE_LEN 4
0132 #define FC_FDMI_PORT_ATTR_SUPPORTEDCLASSSRVC_LEN 4
0133 #define FC_FDMI_PORT_ATTR_FABRICNAME_LEN 8
0134 #define FC_FDMI_PORT_ATTR_CURRENTFC4TYPE_LEN 32
0135 #define FC_FDMI_PORT_ATTR_PORTSTATE_LEN 4
0136 #define FC_FDMI_PORT_ATTR_DISCOVEREDPORTS_LEN 4
0137 #define FC_FDMI_PORT_ATTR_PORTID_LEN 4
0138
0139
0140
0141
0142
0143 struct fc_fdmi_hba_identifier {
0144 __be64 id;
0145 };
0146
0147
0148
0149
0150 struct fc_fdmi_port_name {
0151 __be64 portname;
0152 };
0153
0154
0155
0156
0157 #define FC_FDMI_ATTR_ENTRY_HEADER_LEN 4
0158 struct fc_fdmi_attr_entry {
0159 __be16 type;
0160 __be16 len;
0161 __u8 value[];
0162 } __attribute__((__packed__));
0163
0164
0165
0166
0167 struct fs_fdmi_attrs {
0168 __be32 numattrs;
0169 struct fc_fdmi_attr_entry attr[];
0170 } __attribute__((__packed__));
0171
0172
0173
0174
0175 struct fc_fdmi_rpl {
0176 __be32 numport;
0177 struct fc_fdmi_port_name port[1];
0178 } __attribute__((__packed__));
0179
0180
0181
0182
0183 struct fc_fdmi_rhba {
0184 struct fc_fdmi_hba_identifier hbaid;
0185 struct fc_fdmi_rpl port;
0186 struct fs_fdmi_attrs hba_attrs;
0187 } __attribute__((__packed__));
0188
0189
0190
0191
0192 struct fc_fdmi_rhat {
0193 struct fc_fdmi_hba_identifier hbaid;
0194 struct fs_fdmi_attrs hba_attrs;
0195 } __attribute__((__packed__));
0196
0197
0198
0199
0200 struct fc_fdmi_rprt {
0201 struct fc_fdmi_hba_identifier hbaid;
0202 struct fc_fdmi_port_name port;
0203 struct fs_fdmi_attrs hba_attrs;
0204 } __attribute__((__packed__));
0205
0206
0207
0208
0209 struct fc_fdmi_rpa {
0210 struct fc_fdmi_port_name port;
0211 struct fs_fdmi_attrs hba_attrs;
0212 } __attribute__((__packed__));
0213
0214
0215
0216
0217 struct fc_fdmi_dprt {
0218 struct fc_fdmi_port_name port;
0219 } __attribute__((__packed__));
0220
0221
0222
0223
0224 struct fc_fdmi_dpa {
0225 struct fc_fdmi_port_name port;
0226 struct fs_fdmi_attrs hba_attrs;
0227 } __attribute__((__packed__));
0228
0229
0230
0231
0232 struct fc_fdmi_dhat {
0233 struct fc_fdmi_hba_identifier hbaid;
0234 } __attribute__((__packed__));
0235
0236
0237
0238
0239 struct fc_fdmi_dhba {
0240 struct fc_fdmi_hba_identifier hbaid;
0241 } __attribute__((__packed__));
0242
0243 #endif