• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _FC_ELS_H_
20 #define _FC_ELS_H_
21 #include <linux/types.h>
22 #include <asm/byteorder.h>
23 enum fc_els_cmd {
24   ELS_LS_RJT = 0x01,
25   ELS_LS_ACC = 0x02,
26   ELS_PLOGI = 0x03,
27   ELS_FLOGI = 0x04,
28   ELS_LOGO = 0x05,
29   ELS_ABTX = 0x06,
30   ELS_RCS = 0x07,
31   ELS_RES = 0x08,
32   ELS_RSS = 0x09,
33   ELS_RSI = 0x0a,
34   ELS_ESTS = 0x0b,
35   ELS_ESTC = 0x0c,
36   ELS_ADVC = 0x0d,
37   ELS_RTV = 0x0e,
38   ELS_RLS = 0x0f,
39   ELS_ECHO = 0x10,
40   ELS_TEST = 0x11,
41   ELS_RRQ = 0x12,
42   ELS_REC = 0x13,
43   ELS_SRR = 0x14,
44   ELS_FPIN = 0x16,
45   ELS_RDP = 0x18,
46   ELS_RDF = 0x19,
47   ELS_PRLI = 0x20,
48   ELS_PRLO = 0x21,
49   ELS_SCN = 0x22,
50   ELS_TPLS = 0x23,
51   ELS_TPRLO = 0x24,
52   ELS_LCLM = 0x25,
53   ELS_GAID = 0x30,
54   ELS_FACT = 0x31,
55   ELS_FDACDT = 0x32,
56   ELS_NACT = 0x33,
57   ELS_NDACT = 0x34,
58   ELS_QOSR = 0x40,
59   ELS_RVCS = 0x41,
60   ELS_PDISC = 0x50,
61   ELS_FDISC = 0x51,
62   ELS_ADISC = 0x52,
63   ELS_RNC = 0x53,
64   ELS_FARP_REQ = 0x54,
65   ELS_FARP_REPL = 0x55,
66   ELS_RPS = 0x56,
67   ELS_RPL = 0x57,
68   ELS_RPBC = 0x58,
69   ELS_FAN = 0x60,
70   ELS_RSCN = 0x61,
71   ELS_SCR = 0x62,
72   ELS_RNFT = 0x63,
73   ELS_CSR = 0x68,
74   ELS_CSU = 0x69,
75   ELS_LINIT = 0x70,
76   ELS_LSTS = 0x72,
77   ELS_RNID = 0x78,
78   ELS_RLIR = 0x79,
79   ELS_LIRR = 0x7a,
80   ELS_SRL = 0x7b,
81   ELS_SBRP = 0x7c,
82   ELS_RPSC = 0x7d,
83   ELS_QSA = 0x7e,
84   ELS_EVFP = 0x7f,
85   ELS_LKA = 0x80,
86   ELS_AUTH_ELS = 0x90,
87 };
88 #define FC_ELS_CMDS_INIT {[ELS_LS_RJT] = "LS_RJT",[ELS_LS_ACC] = "LS_ACC",[ELS_PLOGI] = "PLOGI",[ELS_FLOGI] = "FLOGI",[ELS_LOGO] = "LOGO",[ELS_ABTX] = "ABTX",[ELS_RCS] = "RCS",[ELS_RES] = "RES",[ELS_RSS] = "RSS",[ELS_RSI] = "RSI",[ELS_ESTS] = "ESTS",[ELS_ESTC] = "ESTC",[ELS_ADVC] = "ADVC",[ELS_RTV] = "RTV",[ELS_RLS] = "RLS",[ELS_ECHO] = "ECHO",[ELS_TEST] = "TEST",[ELS_RRQ] = "RRQ",[ELS_REC] = "REC",[ELS_SRR] = "SRR",[ELS_FPIN] = "FPIN",[ELS_RDP] = "RDP",[ELS_RDF] = "RDF",[ELS_PRLI] = "PRLI",[ELS_PRLO] = "PRLO",[ELS_SCN] = "SCN",[ELS_TPLS] = "TPLS",[ELS_TPRLO] = "TPRLO",[ELS_LCLM] = "LCLM",[ELS_GAID] = "GAID",[ELS_FACT] = "FACT",[ELS_FDACDT] = "FDACDT",[ELS_NACT] = "NACT",[ELS_NDACT] = "NDACT",[ELS_QOSR] = "QOSR",[ELS_RVCS] = "RVCS",[ELS_PDISC] = "PDISC",[ELS_FDISC] = "FDISC",[ELS_ADISC] = "ADISC",[ELS_RNC] = "RNC",[ELS_FARP_REQ] = "FARP_REQ",[ELS_FARP_REPL] = "FARP_REPL",[ELS_RPS] = "RPS",[ELS_RPL] = "RPL",[ELS_RPBC] = "RPBC",[ELS_FAN] = "FAN",[ELS_RSCN] = "RSCN",[ELS_SCR] = "SCR",[ELS_RNFT] = "RNFT",[ELS_CSR] = "CSR",[ELS_CSU] = "CSU",[ELS_LINIT] = "LINIT",[ELS_LSTS] = "LSTS",[ELS_RNID] = "RNID",[ELS_RLIR] = "RLIR",[ELS_LIRR] = "LIRR",[ELS_SRL] = "SRL",[ELS_SBRP] = "SBRP",[ELS_RPSC] = "RPSC",[ELS_QSA] = "QSA",[ELS_EVFP] = "EVFP",[ELS_LKA] = "LKA",[ELS_AUTH_ELS] = "AUTH_ELS", \
89 }
90 struct fc_els_ls_acc {
91   __u8 la_cmd;
92   __u8 la_resv[3];
93 };
94 struct fc_els_ls_rjt {
95   __u8 er_cmd;
96   __u8 er_resv[4];
97   __u8 er_reason;
98   __u8 er_explan;
99   __u8 er_vendor;
100 };
101 enum fc_els_rjt_reason {
102   ELS_RJT_NONE = 0,
103   ELS_RJT_INVAL = 0x01,
104   ELS_RJT_LOGIC = 0x03,
105   ELS_RJT_BUSY = 0x05,
106   ELS_RJT_PROT = 0x07,
107   ELS_RJT_UNAB = 0x09,
108   ELS_RJT_UNSUP = 0x0b,
109   ELS_RJT_INPROG = 0x0e,
110   ELS_RJT_FIP = 0x20,
111   ELS_RJT_VENDOR = 0xff,
112 };
113 enum fc_els_rjt_explan {
114   ELS_EXPL_NONE = 0x00,
115   ELS_EXPL_SPP_OPT_ERR = 0x01,
116   ELS_EXPL_SPP_ICTL_ERR = 0x03,
117   ELS_EXPL_AH = 0x11,
118   ELS_EXPL_AH_REQ = 0x13,
119   ELS_EXPL_SID = 0x15,
120   ELS_EXPL_OXID_RXID = 0x17,
121   ELS_EXPL_INPROG = 0x19,
122   ELS_EXPL_PLOGI_REQD = 0x1e,
123   ELS_EXPL_INSUF_RES = 0x29,
124   ELS_EXPL_UNAB_DATA = 0x2a,
125   ELS_EXPL_UNSUPR = 0x2c,
126   ELS_EXPL_INV_LEN = 0x2d,
127   ELS_EXPL_NOT_NEIGHBOR = 0x62,
128 };
129 enum fc_ls_tlv_dtag {
130   ELS_DTAG_LS_REQ_INFO = 0x00000001,
131   ELS_DTAG_LNK_INTEGRITY = 0x00020001,
132   ELS_DTAG_DELIVERY = 0x00020002,
133   ELS_DTAG_PEER_CONGEST = 0x00020003,
134   ELS_DTAG_CONGESTION = 0x00020004,
135   ELS_DTAG_FPIN_REGISTER = 0x00030001,
136 };
137 #define FC_LS_TLV_DTAG_INIT { { ELS_DTAG_LS_REQ_INFO, "Link Service Request Information" }, { ELS_DTAG_LNK_INTEGRITY, "Link Integrity Notification" }, { ELS_DTAG_DELIVERY, "Delivery Notification Present" }, { ELS_DTAG_PEER_CONGEST, "Peer Congestion Notification" }, { ELS_DTAG_CONGESTION, "Congestion Notification" }, { ELS_DTAG_FPIN_REGISTER, "FPIN Registration" }, \
138 }
139 struct fc_tlv_desc {
140   __be32 desc_tag;
141   __be32 desc_len;
142   __u8 desc_value[0];
143 };
144 #define FC_TLV_DESC_HDR_SZ sizeof(struct fc_tlv_desc)
145 #define FC_TLV_DESC_LENGTH_FROM_SZ(desc) (sizeof(desc) - FC_TLV_DESC_HDR_SZ)
146 #define FC_TLV_DESC_SZ_FROM_LENGTH(tlv) (__be32_to_cpu((tlv)->desc_len) + FC_TLV_DESC_HDR_SZ)
147 struct fc_els_lsri_desc {
148   __be32 desc_tag;
149   __be32 desc_len;
150   struct {
151     __u8 cmd;
152     __u8 bytes[3];
153   } rqst_w0;
154 };
155 struct fc_els_csp {
156   __u8 sp_hi_ver;
157   __u8 sp_lo_ver;
158   __be16 sp_bb_cred;
159   __be16 sp_features;
160   __be16 sp_bb_data;
161   union {
162     struct {
163       __be16 _sp_tot_seq;
164       __be16 _sp_rel_off;
165     } sp_plogi;
166     struct {
167       __be32 _sp_r_a_tov;
168     } sp_flogi_acc;
169   } sp_u;
170   __be32 sp_e_d_tov;
171 };
172 #define sp_tot_seq sp_u.sp_plogi._sp_tot_seq
173 #define sp_rel_off sp_u.sp_plogi._sp_rel_off
174 #define sp_r_a_tov sp_u.sp_flogi_acc._sp_r_a_tov
175 #define FC_SP_BB_DATA_MASK 0xfff
176 #define FC_SP_MIN_MAX_PAYLOAD FC_MIN_MAX_PAYLOAD
177 #define FC_SP_MAX_MAX_PAYLOAD FC_MAX_PAYLOAD
178 #define FC_SP_FT_NPIV 0x8000
179 #define FC_SP_FT_CIRO 0x8000
180 #define FC_SP_FT_CLAD 0x8000
181 #define FC_SP_FT_RAND 0x4000
182 #define FC_SP_FT_VAL 0x2000
183 #define FC_SP_FT_NPIV_ACC 0x2000
184 #define FC_SP_FT_FPORT 0x1000
185 #define FC_SP_FT_ABB 0x0800
186 #define FC_SP_FT_EDTR 0x0400
187 #define FC_SP_FT_MCAST 0x0200
188 #define FC_SP_FT_BCAST 0x0100
189 #define FC_SP_FT_HUNT 0x0080
190 #define FC_SP_FT_SIMP 0x0040
191 #define FC_SP_FT_SEC 0x0020
192 #define FC_SP_FT_CSYN 0x0010
193 #define FC_SP_FT_RTTOV 0x0008
194 #define FC_SP_FT_HALF 0x0004
195 #define FC_SP_FT_SEQC 0x0002
196 #define FC_SP_FT_PAYL 0x0001
197 struct fc_els_cssp {
198   __be16 cp_class;
199   __be16 cp_init;
200   __be16 cp_recip;
201   __be16 cp_rdfs;
202   __be16 cp_con_seq;
203   __be16 cp_ee_cred;
204   __u8 cp_resv1;
205   __u8 cp_open_seq;
206   __u8 _cp_resv2[2];
207 };
208 #define FC_CPC_VALID 0x8000
209 #define FC_CPC_IMIX 0x4000
210 #define FC_CPC_SEQ 0x0800
211 #define FC_CPC_CAMP 0x0200
212 #define FC_CPC_PRI 0x0080
213 #define FC_CPI_CSYN 0x0010
214 #define FC_CPR_CSYN 0x0008
215 struct fc_els_flogi {
216   __u8 fl_cmd;
217   __u8 _fl_resvd[3];
218   struct fc_els_csp fl_csp;
219   __be64 fl_wwpn;
220   __be64 fl_wwnn;
221   struct fc_els_cssp fl_cssp[4];
222   __u8 fl_vend[16];
223 } __attribute__((__packed__));
224 struct fc_els_spp {
225   __u8 spp_type;
226   __u8 spp_type_ext;
227   __u8 spp_flags;
228   __u8 _spp_resvd;
229   __be32 spp_orig_pa;
230   __be32 spp_resp_pa;
231   __be32 spp_params;
232 };
233 #define FC_SPP_OPA_VAL 0x80
234 #define FC_SPP_RPA_VAL 0x40
235 #define FC_SPP_EST_IMG_PAIR 0x20
236 #define FC_SPP_RESP_MASK 0x0f
237 enum fc_els_spp_resp {
238   FC_SPP_RESP_ACK = 1,
239   FC_SPP_RESP_RES = 2,
240   FC_SPP_RESP_INIT = 3,
241   FC_SPP_RESP_NO_PA = 4,
242   FC_SPP_RESP_CONF = 5,
243   FC_SPP_RESP_COND = 6,
244   FC_SPP_RESP_MULT = 7,
245   FC_SPP_RESP_INVL = 8,
246 };
247 struct fc_els_rrq {
248   __u8 rrq_cmd;
249   __u8 rrq_zero[3];
250   __u8 rrq_resvd;
251   __u8 rrq_s_id[3];
252   __be16 rrq_ox_id;
253   __be16 rrq_rx_id;
254 };
255 struct fc_els_rec {
256   __u8 rec_cmd;
257   __u8 rec_zero[3];
258   __u8 rec_resvd;
259   __u8 rec_s_id[3];
260   __be16 rec_ox_id;
261   __be16 rec_rx_id;
262 };
263 struct fc_els_rec_acc {
264   __u8 reca_cmd;
265   __u8 reca_zero[3];
266   __be16 reca_ox_id;
267   __be16 reca_rx_id;
268   __u8 reca_resvd1;
269   __u8 reca_ofid[3];
270   __u8 reca_resvd2;
271   __u8 reca_rfid[3];
272   __be32 reca_fc4value;
273   __be32 reca_e_stat;
274 };
275 struct fc_els_prli {
276   __u8 prli_cmd;
277   __u8 prli_spp_len;
278   __be16 prli_len;
279 };
280 struct fc_els_prlo {
281   __u8 prlo_cmd;
282   __u8 prlo_obs;
283   __be16 prlo_len;
284 };
285 struct fc_els_adisc {
286   __u8 adisc_cmd;
287   __u8 adisc_resv[3];
288   __u8 adisc_resv1;
289   __u8 adisc_hard_addr[3];
290   __be64 adisc_wwpn;
291   __be64 adisc_wwnn;
292   __u8 adisc_resv2;
293   __u8 adisc_port_id[3];
294 } __attribute__((__packed__));
295 struct fc_els_logo {
296   __u8 fl_cmd;
297   __u8 fl_zero[3];
298   __u8 fl_resvd;
299   __u8 fl_n_port_id[3];
300   __be64 fl_n_port_wwn;
301 };
302 struct fc_els_rtv {
303   __u8 rtv_cmd;
304   __u8 rtv_zero[3];
305 };
306 struct fc_els_rtv_acc {
307   __u8 rtv_cmd;
308   __u8 rtv_zero[3];
309   __be32 rtv_r_a_tov;
310   __be32 rtv_e_d_tov;
311   __be32 rtv_toq;
312 };
313 #define FC_ELS_RTV_EDRES (1 << 26)
314 #define FC_ELS_RTV_RTTOV (1 << 19)
315 struct fc_els_scr {
316   __u8 scr_cmd;
317   __u8 scr_resv[6];
318   __u8 scr_reg_func;
319 };
320 enum fc_els_scr_func {
321   ELS_SCRF_FAB = 1,
322   ELS_SCRF_NPORT = 2,
323   ELS_SCRF_FULL = 3,
324   ELS_SCRF_CLEAR = 255,
325 };
326 struct fc_els_rscn {
327   __u8 rscn_cmd;
328   __u8 rscn_page_len;
329   __be16 rscn_plen;
330 };
331 struct fc_els_rscn_page {
332   __u8 rscn_page_flags;
333   __u8 rscn_fid[3];
334 };
335 #define ELS_RSCN_EV_QUAL_BIT 2
336 #define ELS_RSCN_EV_QUAL_MASK 0xf
337 #define ELS_RSCN_ADDR_FMT_BIT 0
338 #define ELS_RSCN_ADDR_FMT_MASK 0x3
339 enum fc_els_rscn_ev_qual {
340   ELS_EV_QUAL_NONE = 0,
341   ELS_EV_QUAL_NS_OBJ = 1,
342   ELS_EV_QUAL_PORT_ATTR = 2,
343   ELS_EV_QUAL_SERV_OBJ = 3,
344   ELS_EV_QUAL_SW_CONFIG = 4,
345   ELS_EV_QUAL_REM_OBJ = 5,
346 };
347 enum fc_els_rscn_addr_fmt {
348   ELS_ADDR_FMT_PORT = 0,
349   ELS_ADDR_FMT_AREA = 1,
350   ELS_ADDR_FMT_DOM = 2,
351   ELS_ADDR_FMT_FAB = 3,
352 };
353 struct fc_els_rnid {
354   __u8 rnid_cmd;
355   __u8 rnid_resv[3];
356   __u8 rnid_fmt;
357   __u8 rnid_resv2[3];
358 };
359 enum fc_els_rnid_fmt {
360   ELS_RNIDF_NONE = 0,
361   ELS_RNIDF_GEN = 0xdf,
362 };
363 struct fc_els_rnid_resp {
364   __u8 rnid_cmd;
365   __u8 rnid_resv[3];
366   __u8 rnid_fmt;
367   __u8 rnid_cid_len;
368   __u8 rnid_resv2;
369   __u8 rnid_sid_len;
370 };
371 struct fc_els_rnid_cid {
372   __be64 rnid_wwpn;
373   __be64 rnid_wwnn;
374 };
375 struct fc_els_rnid_gen {
376   __u8 rnid_vend_id[16];
377   __be32 rnid_atype;
378   __be32 rnid_phys_port;
379   __be32 rnid_att_nodes;
380   __u8 rnid_node_mgmt;
381   __u8 rnid_ip_ver;
382   __be16 rnid_prot_port;
383   __be32 rnid_ip_addr[4];
384   __u8 rnid_resvd[2];
385   __be16 rnid_vend_spec;
386 };
387 enum fc_els_rnid_atype {
388   ELS_RNIDA_UNK = 0x01,
389   ELS_RNIDA_OTHER = 0x02,
390   ELS_RNIDA_HUB = 0x03,
391   ELS_RNIDA_SWITCH = 0x04,
392   ELS_RNIDA_GATEWAY = 0x05,
393   ELS_RNIDA_CONV = 0x06,
394   ELS_RNIDA_HBA = 0x07,
395   ELS_RNIDA_PROXY = 0x08,
396   ELS_RNIDA_STORAGE = 0x09,
397   ELS_RNIDA_HOST = 0x0a,
398   ELS_RNIDA_SUBSYS = 0x0b,
399   ELS_RNIDA_ACCESS = 0x0e,
400   ELS_RNIDA_NAS = 0x11,
401   ELS_RNIDA_BRIDGE = 0x12,
402   ELS_RNIDA_VIRT = 0x13,
403   ELS_RNIDA_MF = 0xff,
404   ELS_RNIDA_MF_HUB = 1UL << 31,
405   ELS_RNIDA_MF_SW = 1UL << 30,
406   ELS_RNIDA_MF_GW = 1UL << 29,
407   ELS_RNIDA_MF_ST = 1UL << 28,
408   ELS_RNIDA_MF_HOST = 1UL << 27,
409   ELS_RNIDA_MF_SUB = 1UL << 26,
410   ELS_RNIDA_MF_ACC = 1UL << 25,
411   ELS_RNIDA_MF_WDM = 1UL << 24,
412   ELS_RNIDA_MF_NAS = 1UL << 23,
413   ELS_RNIDA_MF_BR = 1UL << 22,
414   ELS_RNIDA_MF_VIRT = 1UL << 21,
415 };
416 enum fc_els_rnid_mgmt {
417   ELS_RNIDM_SNMP = 0,
418   ELS_RNIDM_TELNET = 1,
419   ELS_RNIDM_HTTP = 2,
420   ELS_RNIDM_HTTPS = 3,
421   ELS_RNIDM_XML = 4,
422 };
423 enum fc_els_rnid_ipver {
424   ELS_RNIDIP_NONE = 0,
425   ELS_RNIDIP_V4 = 1,
426   ELS_RNIDIP_V6 = 2,
427 };
428 struct fc_els_rpl {
429   __u8 rpl_cmd;
430   __u8 rpl_resv[5];
431   __be16 rpl_max_size;
432   __u8 rpl_resv1;
433   __u8 rpl_index[3];
434 };
435 struct fc_els_pnb {
436   __be32 pnb_phys_pn;
437   __u8 pnb_resv;
438   __u8 pnb_port_id[3];
439   __be64 pnb_wwpn;
440 };
441 struct fc_els_rpl_resp {
442   __u8 rpl_cmd;
443   __u8 rpl_resv1;
444   __be16 rpl_plen;
445   __u8 rpl_resv2;
446   __u8 rpl_llen[3];
447   __u8 rpl_resv3;
448   __u8 rpl_index[3];
449   struct fc_els_pnb rpl_pnb[1];
450 };
451 struct fc_els_lesb {
452   __be32 lesb_link_fail;
453   __be32 lesb_sync_loss;
454   __be32 lesb_sig_loss;
455   __be32 lesb_prim_err;
456   __be32 lesb_inv_word;
457   __be32 lesb_inv_crc;
458 };
459 struct fc_els_rps {
460   __u8 rps_cmd;
461   __u8 rps_resv[2];
462   __u8 rps_flag;
463   __be64 rps_port_spec;
464 };
465 enum fc_els_rps_flag {
466   FC_ELS_RPS_DID = 0x00,
467   FC_ELS_RPS_PPN = 0x01,
468   FC_ELS_RPS_WWPN = 0x02,
469 };
470 struct fc_els_rps_resp {
471   __u8 rps_cmd;
472   __u8 rps_resv[2];
473   __u8 rps_flag;
474   __u8 rps_resv2[2];
475   __be16 rps_status;
476   struct fc_els_lesb rps_lesb;
477 };
478 enum fc_els_rps_resp_flag {
479   FC_ELS_RPS_LPEV = 0x01,
480 };
481 enum fc_els_rps_resp_status {
482   FC_ELS_RPS_PTP = 1 << 5,
483   FC_ELS_RPS_LOOP = 1 << 4,
484   FC_ELS_RPS_FAB = 1 << 3,
485   FC_ELS_RPS_NO_SIG = 1 << 2,
486   FC_ELS_RPS_NO_SYNC = 1 << 1,
487   FC_ELS_RPS_RESET = 1 << 0,
488 };
489 struct fc_els_lirr {
490   __u8 lirr_cmd;
491   __u8 lirr_resv[3];
492   __u8 lirr_func;
493   __u8 lirr_fmt;
494   __u8 lirr_resv2[2];
495 };
496 enum fc_els_lirr_func {
497   ELS_LIRR_SET_COND = 0x01,
498   ELS_LIRR_SET_UNCOND = 0x02,
499   ELS_LIRR_CLEAR = 0xff
500 };
501 struct fc_els_srl {
502   __u8 srl_cmd;
503   __u8 srl_resv[3];
504   __u8 srl_flag;
505   __u8 srl_flag_param[3];
506 };
507 enum fc_els_srl_flag {
508   FC_ELS_SRL_ALL = 0x00,
509   FC_ELS_SRL_ONE = 0x01,
510   FC_ELS_SRL_EN_PER = 0x02,
511   FC_ELS_SRL_DIS_PER = 0x03,
512 };
513 struct fc_els_rls {
514   __u8 rls_cmd;
515   __u8 rls_resv[4];
516   __u8 rls_port_id[3];
517 };
518 struct fc_els_rls_resp {
519   __u8 rls_cmd;
520   __u8 rls_resv[3];
521   struct fc_els_lesb rls_lesb;
522 };
523 struct fc_els_rlir {
524   __u8 rlir_cmd;
525   __u8 rlir_resv[3];
526   __u8 rlir_fmt;
527   __u8 rlir_clr_len;
528   __u8 rlir_cld_len;
529   __u8 rlir_slr_len;
530 };
531 struct fc_els_clir {
532   __be64 clir_wwpn;
533   __be64 clir_wwnn;
534   __u8 clir_port_type;
535   __u8 clir_port_id[3];
536   __be64 clir_conn_wwpn;
537   __be64 clir_conn_wwnn;
538   __be64 clir_fab_name;
539   __be32 clir_phys_port;
540   __be32 clir_trans_id;
541   __u8 clir_resv[3];
542   __u8 clir_ts_fmt;
543   __be64 clir_timestamp;
544 };
545 enum fc_els_clir_ts_fmt {
546   ELS_CLIR_TS_UNKNOWN = 0,
547   ELS_CLIR_TS_SEC_FRAC = 1,
548   ELS_CLIR_TS_CSU = 2,
549 };
550 struct fc_els_clid {
551   __u8 clid_iq;
552   __u8 clid_ic;
553   __be16 clid_epai;
554 };
555 enum fc_els_clid_iq {
556   ELS_CLID_SWITCH = 0x20,
557   ELS_CLID_E_PORT = 0x10,
558   ELS_CLID_SEV_MASK = 0x0c,
559   ELS_CLID_SEV_INFO = 0x00,
560   ELS_CLID_SEV_INOP = 0x08,
561   ELS_CLID_SEV_DEG = 0x04,
562   ELS_CLID_LASER = 0x02,
563   ELS_CLID_FRU = 0x01,
564 };
565 enum fc_els_clid_ic {
566   ELS_CLID_IC_IMPL = 1,
567   ELS_CLID_IC_BER = 2,
568   ELS_CLID_IC_LOS = 3,
569   ELS_CLID_IC_NOS = 4,
570   ELS_CLID_IC_PST = 5,
571   ELS_CLID_IC_INVAL = 6,
572   ELS_CLID_IC_LOOP_TO = 7,
573   ELS_CLID_IC_LIP = 8,
574 };
575 enum fc_fpin_li_event_types {
576   FPIN_LI_UNKNOWN = 0x0,
577   FPIN_LI_LINK_FAILURE = 0x1,
578   FPIN_LI_LOSS_OF_SYNC = 0x2,
579   FPIN_LI_LOSS_OF_SIG = 0x3,
580   FPIN_LI_PRIM_SEQ_ERR = 0x4,
581   FPIN_LI_INVALID_TX_WD = 0x5,
582   FPIN_LI_INVALID_CRC = 0x6,
583   FPIN_LI_DEVICE_SPEC = 0xF,
584 };
585 #define FC_FPIN_LI_EVT_TYPES_INIT { { FPIN_LI_UNKNOWN, "Unknown" }, { FPIN_LI_LINK_FAILURE, "Link Failure" }, { FPIN_LI_LOSS_OF_SYNC, "Loss of Synchronization" }, { FPIN_LI_LOSS_OF_SIG, "Loss of Signal" }, { FPIN_LI_PRIM_SEQ_ERR, "Primitive Sequence Protocol Error" }, { FPIN_LI_INVALID_TX_WD, "Invalid Transmission Word" }, { FPIN_LI_INVALID_CRC, "Invalid CRC" }, { FPIN_LI_DEVICE_SPEC, "Device Specific" }, \
586 }
587 struct fc_fn_li_desc {
588   __be32 desc_tag;
589   __be32 desc_len;
590   __be64 detecting_wwpn;
591   __be64 attached_wwpn;
592   __be16 event_type;
593   __be16 event_modifier;
594   __be32 event_threshold;
595   __be32 event_count;
596   __be32 pname_count;
597   __be64 pname_list[0];
598 };
599 struct fc_els_fpin {
600   __u8 fpin_cmd;
601   __u8 fpin_zero[3];
602   __be32 desc_len;
603   struct fc_tlv_desc fpin_desc[0];
604 };
605 struct fc_df_desc_fpin_reg {
606   __be32 desc_tag;
607   __be32 desc_len;
608   __be32 count;
609   __be32 desc_tags[0];
610 };
611 struct fc_els_rdf {
612   __u8 fpin_cmd;
613   __u8 fpin_zero[3];
614   __be32 desc_len;
615   struct fc_tlv_desc desc[0];
616 };
617 struct fc_els_rdf_resp {
618   struct fc_els_ls_acc acc_hdr;
619   __be32 desc_list_len;
620   struct fc_els_lsri_desc lsri;
621   struct fc_tlv_desc desc[0];
622 };
623 #endif
624