1
2
3
4
5
6
7
8 #ifndef _FC_ELS_H_
9 #define _FC_ELS_H_
10
11 #include <linux/types.h>
12
13
14
15
16
17
18
19
20
21 enum fc_els_cmd {
22 ELS_LS_RJT = 0x01,
23 ELS_LS_ACC = 0x02,
24 ELS_PLOGI = 0x03,
25 ELS_FLOGI = 0x04,
26 ELS_LOGO = 0x05,
27 ELS_ABTX = 0x06,
28 ELS_RCS = 0x07,
29 ELS_RES = 0x08,
30 ELS_RSS = 0x09,
31 ELS_RSI = 0x0a,
32 ELS_ESTS = 0x0b,
33 ELS_ESTC = 0x0c,
34 ELS_ADVC = 0x0d,
35 ELS_RTV = 0x0e,
36 ELS_RLS = 0x0f,
37 ELS_ECHO = 0x10,
38 ELS_TEST = 0x11,
39 ELS_RRQ = 0x12,
40 ELS_REC = 0x13,
41 ELS_SRR = 0x14,
42 ELS_FPIN = 0x16,
43 ELS_PRLI = 0x20,
44 ELS_PRLO = 0x21,
45 ELS_SCN = 0x22,
46 ELS_TPLS = 0x23,
47 ELS_TPRLO = 0x24,
48 ELS_LCLM = 0x25,
49 ELS_GAID = 0x30,
50 ELS_FACT = 0x31,
51 ELS_FDACDT = 0x32,
52 ELS_NACT = 0x33,
53 ELS_NDACT = 0x34,
54 ELS_QOSR = 0x40,
55 ELS_RVCS = 0x41,
56 ELS_PDISC = 0x50,
57 ELS_FDISC = 0x51,
58 ELS_ADISC = 0x52,
59 ELS_RNC = 0x53,
60 ELS_FARP_REQ = 0x54,
61 ELS_FARP_REPL = 0x55,
62 ELS_RPS = 0x56,
63 ELS_RPL = 0x57,
64 ELS_RPBC = 0x58,
65 ELS_FAN = 0x60,
66 ELS_RSCN = 0x61,
67 ELS_SCR = 0x62,
68 ELS_RNFT = 0x63,
69 ELS_CSR = 0x68,
70 ELS_CSU = 0x69,
71 ELS_LINIT = 0x70,
72 ELS_LSTS = 0x72,
73 ELS_RNID = 0x78,
74 ELS_RLIR = 0x79,
75 ELS_LIRR = 0x7a,
76 ELS_SRL = 0x7b,
77 ELS_SBRP = 0x7c,
78 ELS_RPSC = 0x7d,
79 ELS_QSA = 0x7e,
80 ELS_EVFP = 0x7f,
81 ELS_LKA = 0x80,
82 ELS_AUTH_ELS = 0x90,
83 };
84
85
86
87
88
89 #define FC_ELS_CMDS_INIT { \
90 [ELS_LS_RJT] = "LS_RJT", \
91 [ELS_LS_ACC] = "LS_ACC", \
92 [ELS_PLOGI] = "PLOGI", \
93 [ELS_FLOGI] = "FLOGI", \
94 [ELS_LOGO] = "LOGO", \
95 [ELS_ABTX] = "ABTX", \
96 [ELS_RCS] = "RCS", \
97 [ELS_RES] = "RES", \
98 [ELS_RSS] = "RSS", \
99 [ELS_RSI] = "RSI", \
100 [ELS_ESTS] = "ESTS", \
101 [ELS_ESTC] = "ESTC", \
102 [ELS_ADVC] = "ADVC", \
103 [ELS_RTV] = "RTV", \
104 [ELS_RLS] = "RLS", \
105 [ELS_ECHO] = "ECHO", \
106 [ELS_TEST] = "TEST", \
107 [ELS_RRQ] = "RRQ", \
108 [ELS_REC] = "REC", \
109 [ELS_SRR] = "SRR", \
110 [ELS_FPIN] = "FPIN", \
111 [ELS_PRLI] = "PRLI", \
112 [ELS_PRLO] = "PRLO", \
113 [ELS_SCN] = "SCN", \
114 [ELS_TPLS] = "TPLS", \
115 [ELS_TPRLO] = "TPRLO", \
116 [ELS_LCLM] = "LCLM", \
117 [ELS_GAID] = "GAID", \
118 [ELS_FACT] = "FACT", \
119 [ELS_FDACDT] = "FDACDT", \
120 [ELS_NACT] = "NACT", \
121 [ELS_NDACT] = "NDACT", \
122 [ELS_QOSR] = "QOSR", \
123 [ELS_RVCS] = "RVCS", \
124 [ELS_PDISC] = "PDISC", \
125 [ELS_FDISC] = "FDISC", \
126 [ELS_ADISC] = "ADISC", \
127 [ELS_RNC] = "RNC", \
128 [ELS_FARP_REQ] = "FARP_REQ", \
129 [ELS_FARP_REPL] = "FARP_REPL", \
130 [ELS_RPS] = "RPS", \
131 [ELS_RPL] = "RPL", \
132 [ELS_RPBC] = "RPBC", \
133 [ELS_FAN] = "FAN", \
134 [ELS_RSCN] = "RSCN", \
135 [ELS_SCR] = "SCR", \
136 [ELS_RNFT] = "RNFT", \
137 [ELS_CSR] = "CSR", \
138 [ELS_CSU] = "CSU", \
139 [ELS_LINIT] = "LINIT", \
140 [ELS_LSTS] = "LSTS", \
141 [ELS_RNID] = "RNID", \
142 [ELS_RLIR] = "RLIR", \
143 [ELS_LIRR] = "LIRR", \
144 [ELS_SRL] = "SRL", \
145 [ELS_SBRP] = "SBRP", \
146 [ELS_RPSC] = "RPSC", \
147 [ELS_QSA] = "QSA", \
148 [ELS_EVFP] = "EVFP", \
149 [ELS_LKA] = "LKA", \
150 [ELS_AUTH_ELS] = "AUTH_ELS", \
151 }
152
153
154
155
156 struct fc_els_ls_acc {
157 __u8 la_cmd;
158 __u8 la_resv[3];
159 };
160
161
162
163
164 struct fc_els_ls_rjt {
165 __u8 er_cmd;
166 __u8 er_resv[4];
167 __u8 er_reason;
168 __u8 er_explan;
169 __u8 er_vendor;
170 };
171
172
173
174
175 enum fc_els_rjt_reason {
176 ELS_RJT_NONE = 0,
177 ELS_RJT_INVAL = 0x01,
178 ELS_RJT_LOGIC = 0x03,
179 ELS_RJT_BUSY = 0x05,
180 ELS_RJT_PROT = 0x07,
181 ELS_RJT_UNAB = 0x09,
182 ELS_RJT_UNSUP = 0x0b,
183 ELS_RJT_INPROG = 0x0e,
184 ELS_RJT_FIP = 0x20,
185 ELS_RJT_VENDOR = 0xff,
186 };
187
188
189
190
191
192 enum fc_els_rjt_explan {
193 ELS_EXPL_NONE = 0x00,
194 ELS_EXPL_SPP_OPT_ERR = 0x01,
195 ELS_EXPL_SPP_ICTL_ERR = 0x03,
196 ELS_EXPL_AH = 0x11,
197 ELS_EXPL_AH_REQ = 0x13,
198 ELS_EXPL_SID = 0x15,
199 ELS_EXPL_OXID_RXID = 0x17,
200 ELS_EXPL_INPROG = 0x19,
201 ELS_EXPL_PLOGI_REQD = 0x1e,
202 ELS_EXPL_INSUF_RES = 0x29,
203 ELS_EXPL_UNAB_DATA = 0x2a,
204 ELS_EXPL_UNSUPR = 0x2c,
205 ELS_EXPL_INV_LEN = 0x2d,
206 ELS_EXPL_NOT_NEIGHBOR = 0x62,
207
208 };
209
210
211
212
213 struct fc_els_csp {
214 __u8 sp_hi_ver;
215 __u8 sp_lo_ver;
216 __be16 sp_bb_cred;
217 __be16 sp_features;
218 __be16 sp_bb_data;
219 union {
220 struct {
221 __be16 _sp_tot_seq;
222 __be16 _sp_rel_off;
223 } sp_plogi;
224 struct {
225 __be32 _sp_r_a_tov;
226 } sp_flogi_acc;
227 } sp_u;
228 __be32 sp_e_d_tov;
229 };
230 #define sp_tot_seq sp_u.sp_plogi._sp_tot_seq
231 #define sp_rel_off sp_u.sp_plogi._sp_rel_off
232 #define sp_r_a_tov sp_u.sp_flogi_acc._sp_r_a_tov
233
234 #define FC_SP_BB_DATA_MASK 0xfff
235
236
237
238
239 #define FC_SP_MIN_MAX_PAYLOAD FC_MIN_MAX_PAYLOAD
240 #define FC_SP_MAX_MAX_PAYLOAD FC_MAX_PAYLOAD
241
242
243
244
245 #define FC_SP_FT_NPIV 0x8000
246 #define FC_SP_FT_CIRO 0x8000
247 #define FC_SP_FT_CLAD 0x8000
248 #define FC_SP_FT_RAND 0x4000
249 #define FC_SP_FT_VAL 0x2000
250 #define FC_SP_FT_NPIV_ACC 0x2000
251 #define FC_SP_FT_FPORT 0x1000
252 #define FC_SP_FT_ABB 0x0800
253 #define FC_SP_FT_EDTR 0x0400
254 #define FC_SP_FT_MCAST 0x0200
255 #define FC_SP_FT_BCAST 0x0100
256 #define FC_SP_FT_HUNT 0x0080
257 #define FC_SP_FT_SIMP 0x0040
258 #define FC_SP_FT_SEC 0x0020
259 #define FC_SP_FT_CSYN 0x0010
260 #define FC_SP_FT_RTTOV 0x0008
261 #define FC_SP_FT_HALF 0x0004
262 #define FC_SP_FT_SEQC 0x0002
263 #define FC_SP_FT_PAYL 0x0001
264
265
266
267
268 struct fc_els_cssp {
269 __be16 cp_class;
270 __be16 cp_init;
271 __be16 cp_recip;
272 __be16 cp_rdfs;
273 __be16 cp_con_seq;
274 __be16 cp_ee_cred;
275 __u8 cp_resv1;
276 __u8 cp_open_seq;
277 __u8 _cp_resv2[2];
278 };
279
280
281
282
283 #define FC_CPC_VALID 0x8000
284 #define FC_CPC_IMIX 0x4000
285 #define FC_CPC_SEQ 0x0800
286 #define FC_CPC_CAMP 0x0200
287 #define FC_CPC_PRI 0x0080
288
289
290
291
292
293 #define FC_CPI_CSYN 0x0010
294
295
296
297
298 #define FC_CPR_CSYN 0x0008
299
300
301
302
303
304 struct fc_els_flogi {
305 __u8 fl_cmd;
306 __u8 _fl_resvd[3];
307 struct fc_els_csp fl_csp;
308 __be64 fl_wwpn;
309 __be64 fl_wwnn;
310 struct fc_els_cssp fl_cssp[4];
311 __u8 fl_vend[16];
312 } __attribute__((__packed__));
313
314
315
316
317 struct fc_els_spp {
318 __u8 spp_type;
319 __u8 spp_type_ext;
320 __u8 spp_flags;
321 __u8 _spp_resvd;
322 __be32 spp_orig_pa;
323 __be32 spp_resp_pa;
324 __be32 spp_params;
325 };
326
327
328
329
330 #define FC_SPP_OPA_VAL 0x80
331 #define FC_SPP_RPA_VAL 0x40
332 #define FC_SPP_EST_IMG_PAIR 0x20
333 #define FC_SPP_RESP_MASK 0x0f
334
335
336
337
338 enum fc_els_spp_resp {
339 FC_SPP_RESP_ACK = 1,
340 FC_SPP_RESP_RES = 2,
341 FC_SPP_RESP_INIT = 3,
342 FC_SPP_RESP_NO_PA = 4,
343 FC_SPP_RESP_CONF = 5,
344 FC_SPP_RESP_COND = 6,
345 FC_SPP_RESP_MULT = 7,
346 FC_SPP_RESP_INVL = 8,
347 };
348
349
350
351
352 struct fc_els_rrq {
353 __u8 rrq_cmd;
354 __u8 rrq_zero[3];
355 __u8 rrq_resvd;
356 __u8 rrq_s_id[3];
357 __be16 rrq_ox_id;
358 __be16 rrq_rx_id;
359 };
360
361
362
363
364 struct fc_els_rec {
365 __u8 rec_cmd;
366 __u8 rec_zero[3];
367 __u8 rec_resvd;
368 __u8 rec_s_id[3];
369 __be16 rec_ox_id;
370 __be16 rec_rx_id;
371 };
372
373
374
375
376 struct fc_els_rec_acc {
377 __u8 reca_cmd;
378 __u8 reca_zero[3];
379 __be16 reca_ox_id;
380 __be16 reca_rx_id;
381 __u8 reca_resvd1;
382 __u8 reca_ofid[3];
383 __u8 reca_resvd2;
384 __u8 reca_rfid[3];
385 __be32 reca_fc4value;
386 __be32 reca_e_stat;
387 };
388
389
390
391
392 struct fc_els_prli {
393 __u8 prli_cmd;
394 __u8 prli_spp_len;
395 __be16 prli_len;
396
397 };
398
399
400
401
402 struct fc_els_prlo {
403 __u8 prlo_cmd;
404 __u8 prlo_obs;
405 __be16 prlo_len;
406 };
407
408
409
410
411 struct fc_els_adisc {
412 __u8 adisc_cmd;
413 __u8 adisc_resv[3];
414 __u8 adisc_resv1;
415 __u8 adisc_hard_addr[3];
416 __be64 adisc_wwpn;
417 __be64 adisc_wwnn;
418 __u8 adisc_resv2;
419 __u8 adisc_port_id[3];
420 } __attribute__((__packed__));
421
422
423
424
425 struct fc_els_logo {
426 __u8 fl_cmd;
427 __u8 fl_zero[3];
428 __u8 fl_resvd;
429 __u8 fl_n_port_id[3];
430 __be64 fl_n_port_wwn;
431 };
432
433
434
435
436 struct fc_els_rtv {
437 __u8 rtv_cmd;
438 __u8 rtv_zero[3];
439 };
440
441
442
443
444 struct fc_els_rtv_acc {
445 __u8 rtv_cmd;
446 __u8 rtv_zero[3];
447 __be32 rtv_r_a_tov;
448 __be32 rtv_e_d_tov;
449 __be32 rtv_toq;
450 };
451
452
453
454
455 #define FC_ELS_RTV_EDRES (1 << 26)
456 #define FC_ELS_RTV_RTTOV (1 << 19)
457
458
459
460
461 struct fc_els_scr {
462 __u8 scr_cmd;
463 __u8 scr_resv[6];
464 __u8 scr_reg_func;
465 };
466
467 enum fc_els_scr_func {
468 ELS_SCRF_FAB = 1,
469 ELS_SCRF_NPORT = 2,
470 ELS_SCRF_FULL = 3,
471 ELS_SCRF_CLEAR = 255,
472 };
473
474
475
476
477 struct fc_els_rscn {
478 __u8 rscn_cmd;
479 __u8 rscn_page_len;
480 __be16 rscn_plen;
481
482
483 };
484
485 struct fc_els_rscn_page {
486 __u8 rscn_page_flags;
487 __u8 rscn_fid[3];
488 };
489
490 #define ELS_RSCN_EV_QUAL_BIT 2
491 #define ELS_RSCN_EV_QUAL_MASK 0xf
492 #define ELS_RSCN_ADDR_FMT_BIT 0
493 #define ELS_RSCN_ADDR_FMT_MASK 0x3
494
495 enum fc_els_rscn_ev_qual {
496 ELS_EV_QUAL_NONE = 0,
497 ELS_EV_QUAL_NS_OBJ = 1,
498 ELS_EV_QUAL_PORT_ATTR = 2,
499 ELS_EV_QUAL_SERV_OBJ = 3,
500 ELS_EV_QUAL_SW_CONFIG = 4,
501 ELS_EV_QUAL_REM_OBJ = 5,
502 };
503
504 enum fc_els_rscn_addr_fmt {
505 ELS_ADDR_FMT_PORT = 0,
506 ELS_ADDR_FMT_AREA = 1,
507 ELS_ADDR_FMT_DOM = 2,
508 ELS_ADDR_FMT_FAB = 3,
509 };
510
511
512
513
514 struct fc_els_rnid {
515 __u8 rnid_cmd;
516 __u8 rnid_resv[3];
517 __u8 rnid_fmt;
518 __u8 rnid_resv2[3];
519 };
520
521
522
523
524 enum fc_els_rnid_fmt {
525 ELS_RNIDF_NONE = 0,
526 ELS_RNIDF_GEN = 0xdf,
527 };
528
529
530
531
532 struct fc_els_rnid_resp {
533 __u8 rnid_cmd;
534 __u8 rnid_resv[3];
535 __u8 rnid_fmt;
536 __u8 rnid_cid_len;
537 __u8 rnid_resv2;
538 __u8 rnid_sid_len;
539 };
540
541 struct fc_els_rnid_cid {
542 __be64 rnid_wwpn;
543 __be64 rnid_wwnn;
544 };
545
546 struct fc_els_rnid_gen {
547 __u8 rnid_vend_id[16];
548 __be32 rnid_atype;
549 __be32 rnid_phys_port;
550 __be32 rnid_att_nodes;
551 __u8 rnid_node_mgmt;
552 __u8 rnid_ip_ver;
553 __be16 rnid_prot_port;
554 __be32 rnid_ip_addr[4];
555 __u8 rnid_resvd[2];
556 __be16 rnid_vend_spec;
557 };
558
559 enum fc_els_rnid_atype {
560 ELS_RNIDA_UNK = 0x01,
561 ELS_RNIDA_OTHER = 0x02,
562 ELS_RNIDA_HUB = 0x03,
563 ELS_RNIDA_SWITCH = 0x04,
564 ELS_RNIDA_GATEWAY = 0x05,
565 ELS_RNIDA_CONV = 0x06,
566 ELS_RNIDA_HBA = 0x07,
567 ELS_RNIDA_PROXY = 0x08,
568 ELS_RNIDA_STORAGE = 0x09,
569 ELS_RNIDA_HOST = 0x0a,
570 ELS_RNIDA_SUBSYS = 0x0b,
571 ELS_RNIDA_ACCESS = 0x0e,
572 ELS_RNIDA_NAS = 0x11,
573 ELS_RNIDA_BRIDGE = 0x12,
574 ELS_RNIDA_VIRT = 0x13,
575 ELS_RNIDA_MF = 0xff,
576 ELS_RNIDA_MF_HUB = 1UL << 31,
577 ELS_RNIDA_MF_SW = 1UL << 30,
578 ELS_RNIDA_MF_GW = 1UL << 29,
579 ELS_RNIDA_MF_ST = 1UL << 28,
580 ELS_RNIDA_MF_HOST = 1UL << 27,
581 ELS_RNIDA_MF_SUB = 1UL << 26,
582 ELS_RNIDA_MF_ACC = 1UL << 25,
583 ELS_RNIDA_MF_WDM = 1UL << 24,
584 ELS_RNIDA_MF_NAS = 1UL << 23,
585 ELS_RNIDA_MF_BR = 1UL << 22,
586 ELS_RNIDA_MF_VIRT = 1UL << 21,
587 };
588
589 enum fc_els_rnid_mgmt {
590 ELS_RNIDM_SNMP = 0,
591 ELS_RNIDM_TELNET = 1,
592 ELS_RNIDM_HTTP = 2,
593 ELS_RNIDM_HTTPS = 3,
594 ELS_RNIDM_XML = 4,
595 };
596
597 enum fc_els_rnid_ipver {
598 ELS_RNIDIP_NONE = 0,
599 ELS_RNIDIP_V4 = 1,
600 ELS_RNIDIP_V6 = 2,
601 };
602
603
604
605
606 struct fc_els_rpl {
607 __u8 rpl_cmd;
608 __u8 rpl_resv[5];
609 __be16 rpl_max_size;
610 __u8 rpl_resv1;
611 __u8 rpl_index[3];
612 };
613
614
615
616
617 struct fc_els_pnb {
618 __be32 pnb_phys_pn;
619 __u8 pnb_resv;
620 __u8 pnb_port_id[3];
621 __be64 pnb_wwpn;
622 };
623
624
625
626
627 struct fc_els_rpl_resp {
628 __u8 rpl_cmd;
629 __u8 rpl_resv1;
630 __be16 rpl_plen;
631 __u8 rpl_resv2;
632 __u8 rpl_llen[3];
633 __u8 rpl_resv3;
634 __u8 rpl_index[3];
635 struct fc_els_pnb rpl_pnb[1];
636 };
637
638
639
640
641 struct fc_els_lesb {
642 __be32 lesb_link_fail;
643 __be32 lesb_sync_loss;
644 __be32 lesb_sig_loss;
645 __be32 lesb_prim_err;
646 __be32 lesb_inv_word;
647 __be32 lesb_inv_crc;
648 };
649
650
651
652
653 struct fc_els_rps {
654 __u8 rps_cmd;
655 __u8 rps_resv[2];
656 __u8 rps_flag;
657 __be64 rps_port_spec;
658 };
659
660 enum fc_els_rps_flag {
661 FC_ELS_RPS_DID = 0x00,
662 FC_ELS_RPS_PPN = 0x01,
663 FC_ELS_RPS_WWPN = 0x02,
664 };
665
666
667
668
669 struct fc_els_rps_resp {
670 __u8 rps_cmd;
671 __u8 rps_resv[2];
672 __u8 rps_flag;
673 __u8 rps_resv2[2];
674 __be16 rps_status;
675 struct fc_els_lesb rps_lesb;
676 };
677
678 enum fc_els_rps_resp_flag {
679 FC_ELS_RPS_LPEV = 0x01,
680 };
681
682 enum fc_els_rps_resp_status {
683 FC_ELS_RPS_PTP = 1 << 5,
684 FC_ELS_RPS_LOOP = 1 << 4,
685 FC_ELS_RPS_FAB = 1 << 3,
686 FC_ELS_RPS_NO_SIG = 1 << 2,
687 FC_ELS_RPS_NO_SYNC = 1 << 1,
688 FC_ELS_RPS_RESET = 1 << 0,
689 };
690
691
692
693
694 struct fc_els_lirr {
695 __u8 lirr_cmd;
696 __u8 lirr_resv[3];
697 __u8 lirr_func;
698 __u8 lirr_fmt;
699 __u8 lirr_resv2[2];
700 };
701
702 enum fc_els_lirr_func {
703 ELS_LIRR_SET_COND = 0x01,
704 ELS_LIRR_SET_UNCOND = 0x02,
705 ELS_LIRR_CLEAR = 0xff
706 };
707
708
709
710
711 struct fc_els_srl {
712 __u8 srl_cmd;
713 __u8 srl_resv[3];
714 __u8 srl_flag;
715 __u8 srl_flag_param[3];
716 };
717
718 enum fc_els_srl_flag {
719 FC_ELS_SRL_ALL = 0x00,
720 FC_ELS_SRL_ONE = 0x01,
721 FC_ELS_SRL_EN_PER = 0x02,
722 FC_ELS_SRL_DIS_PER = 0x03,
723 };
724
725
726
727
728 struct fc_els_rls {
729 __u8 rls_cmd;
730 __u8 rls_resv[4];
731 __u8 rls_port_id[3];
732 };
733
734
735
736
737 struct fc_els_rls_resp {
738 __u8 rls_cmd;
739 __u8 rls_resv[3];
740 struct fc_els_lesb rls_lesb;
741 };
742
743
744
745
746
747 struct fc_els_rlir {
748 __u8 rlir_cmd;
749 __u8 rlir_resv[3];
750 __u8 rlir_fmt;
751 __u8 rlir_clr_len;
752 __u8 rlir_cld_len;
753 __u8 rlir_slr_len;
754 };
755
756
757
758
759 struct fc_els_clir {
760 __be64 clir_wwpn;
761 __be64 clir_wwnn;
762 __u8 clir_port_type;
763 __u8 clir_port_id[3];
764
765 __be64 clir_conn_wwpn;
766 __be64 clir_conn_wwnn;
767 __be64 clir_fab_name;
768 __be32 clir_phys_port;
769 __be32 clir_trans_id;
770 __u8 clir_resv[3];
771 __u8 clir_ts_fmt;
772 __be64 clir_timestamp;
773 };
774
775
776
777
778 enum fc_els_clir_ts_fmt {
779 ELS_CLIR_TS_UNKNOWN = 0,
780 ELS_CLIR_TS_SEC_FRAC = 1,
781 ELS_CLIR_TS_CSU = 2,
782 };
783
784
785
786
787 struct fc_els_clid {
788 __u8 clid_iq;
789 __u8 clid_ic;
790 __be16 clid_epai;
791 };
792
793
794
795
796 enum fc_els_clid_iq {
797 ELS_CLID_SWITCH = 0x20,
798 ELS_CLID_E_PORT = 0x10,
799 ELS_CLID_SEV_MASK = 0x0c,
800 ELS_CLID_SEV_INFO = 0x00,
801 ELS_CLID_SEV_INOP = 0x08,
802 ELS_CLID_SEV_DEG = 0x04,
803 ELS_CLID_LASER = 0x02,
804 ELS_CLID_FRU = 0x01,
805 };
806
807
808
809
810 enum fc_els_clid_ic {
811 ELS_CLID_IC_IMPL = 1,
812 ELS_CLID_IC_BER = 2,
813 ELS_CLID_IC_LOS = 3,
814 ELS_CLID_IC_NOS = 4,
815 ELS_CLID_IC_PST = 5,
816 ELS_CLID_IC_INVAL = 6,
817 ELS_CLID_IC_LOOP_TO = 7,
818 ELS_CLID_IC_LIP = 8,
819 };
820
821
822
823
824
825 enum fc_fn_dtag {
826 ELS_FN_DTAG_LNK_INTEGRITY = 0x00020001,
827 ELS_FN_DTAG_PEER_CONGEST = 0x00020003,
828 ELS_FN_DTAG_CONGESTION = 0x00020004,
829 };
830
831
832
833
834 struct fc_fn_desc {
835 __be32 fn_desc_tag;
836 __be32 fn_desc_value_len;
837
838
839 __u8 fn_desc_value[0];
840 };
841
842
843
844
845 struct fc_els_fpin {
846 __u8 fpin_cmd;
847 __u8 fpin_zero[3];
848 __be32 fpin_desc_cnt;
849 struct fc_fn_desc fpin_desc[0];
850 };
851
852 #endif