1
2
3
4
5
6
7
8
9
10
11 #ifndef __BFA_FC_H__
12 #define __BFA_FC_H__
13
14 #include "bfad_drv.h"
15
16 typedef u64 wwn_t;
17
18 #define WWN_NULL (0)
19 #define FC_SYMNAME_MAX 256
20 #define FC_ALPA_MAX 128
21
22 #pragma pack(1)
23
24 #define MAC_ADDRLEN (6)
25 struct mac_s { u8 mac[MAC_ADDRLEN]; };
26 #define mac_t struct mac_s
27
28
29
30
31 #define SCSI_MAX_CDBLEN 16
32 struct scsi_cdb_s {
33 u8 scsi_cdb[SCSI_MAX_CDBLEN];
34 };
35
36
37
38
39
40 #define SCSI_STATUS_GOOD 0x00
41 #define SCSI_STATUS_CHECK_CONDITION 0x02
42 #define SCSI_STATUS_CONDITION_MET 0x04
43 #define SCSI_STATUS_BUSY 0x08
44 #define SCSI_STATUS_INTERMEDIATE 0x10
45 #define SCSI_STATUS_ICM 0x14
46 #define SCSI_STATUS_RESERVATION_CONFLICT 0x18
47 #define SCSI_STATUS_COMMAND_TERMINATED 0x22
48 #define SCSI_STATUS_QUEUE_FULL 0x28
49 #define SCSI_STATUS_ACA_ACTIVE 0x30
50
51 #define SCSI_MAX_ALLOC_LEN 0xFF
52
53
54
55
56 struct fchs_s {
57 #ifdef __BIG_ENDIAN
58 u32 routing:4;
59 u32 cat_info:4;
60 #else
61 u32 cat_info:4;
62 u32 routing:4;
63 #endif
64 u32 d_id:24;
65
66 u32 cs_ctl:8;
67 u32 s_id:24;
68
69 u32 type:8;
70 u32 f_ctl:24;
71
72 u8 seq_id;
73 u8 df_ctl;
74 u16 seq_cnt;
75
76 __be16 ox_id;
77 u16 rx_id;
78
79 u32 ro;
80 };
81
82
83
84
85 enum {
86 FC_RTG_FC4_DEV_DATA = 0x0,
87 FC_RTG_EXT_LINK = 0x2,
88 FC_RTG_FC4_LINK_DATA = 0x3,
89 FC_RTG_VIDEO_DATA = 0x4,
90 FC_RTG_EXT_HDR = 0x5,
91 FC_RTG_BASIC_LINK = 0x8,
92 FC_RTG_LINK_CTRL = 0xC,
93 };
94
95
96
97
98 enum {
99 FC_CAT_LD_REQUEST = 0x2,
100 FC_CAT_LD_REPLY = 0x3,
101 FC_CAT_LD_DIAG = 0xF,
102 };
103
104
105
106
107 enum {
108 FC_CAT_VFT_HDR = 0x0,
109 FC_CAT_IFR_HDR = 0x1,
110 FC_CAT_ENC_HDR = 0x2,
111 };
112
113
114
115
116 enum {
117 FC_CAT_UNCATEG_INFO = 0x0,
118 FC_CAT_SOLICIT_DATA = 0x1,
119 FC_CAT_UNSOLICIT_CTRL = 0x2,
120 FC_CAT_SOLICIT_CTRL = 0x3,
121 FC_CAT_UNSOLICIT_DATA = 0x4,
122 FC_CAT_DATA_DESC = 0x5,
123 FC_CAT_UNSOLICIT_CMD = 0x6,
124 FC_CAT_CMD_STATUS = 0x7,
125 };
126
127
128
129
130 enum {
131 FC_TYPE_BLS = 0x0,
132 FC_TYPE_ELS = 0x1,
133 FC_TYPE_IP = 0x5,
134 FC_TYPE_FCP = 0x8,
135 FC_TYPE_GPP = 0x9,
136 FC_TYPE_SERVICES = 0x20,
137 FC_TYPE_FC_FSS = 0x22,
138 FC_TYPE_FC_AL = 0x23,
139 FC_TYPE_FC_SNMP = 0x24,
140 FC_TYPE_FC_SPINFAB = 0xEE,
141 FC_TYPE_FC_DIAG = 0xEF,
142 FC_TYPE_MAX = 256,
143 };
144
145
146
147
148 enum {
149 FCTL_EC_ORIG = 0x000000,
150 FCTL_EC_RESP = 0x800000,
151 FCTL_SEQ_INI = 0x000000,
152 FCTL_SEQ_REC = 0x400000,
153 FCTL_FS_EXCH = 0x200000,
154 FCTL_LS_EXCH = 0x100000,
155 FCTL_END_SEQ = 0x080000,
156 FCTL_SI_XFER = 0x010000,
157 FCTL_RO_PRESENT = 0x000008,
158 FCTL_FILLBYTE_MASK = 0x000003
159 };
160
161
162
163
164 enum {
165 FC_MIN_WELL_KNOWN_ADDR = 0xFFFFF0,
166 FC_DOMAIN_CONTROLLER_MASK = 0xFFFC00,
167 FC_ALIAS_SERVER = 0xFFFFF8,
168 FC_MGMT_SERVER = 0xFFFFFA,
169 FC_TIME_SERVER = 0xFFFFFB,
170 FC_NAME_SERVER = 0xFFFFFC,
171 FC_FABRIC_CONTROLLER = 0xFFFFFD,
172 FC_FABRIC_PORT = 0xFFFFFE,
173 FC_BROADCAST_SERVER = 0xFFFFFF
174 };
175
176
177
178
179 #define FC_DOMAIN_MASK 0xFF0000
180 #define FC_DOMAIN_SHIFT 16
181 #define FC_AREA_MASK 0x00FF00
182 #define FC_AREA_SHIFT 8
183 #define FC_PORT_MASK 0x0000FF
184 #define FC_PORT_SHIFT 0
185
186 #define FC_GET_DOMAIN(p) (((p) & FC_DOMAIN_MASK) >> FC_DOMAIN_SHIFT)
187 #define FC_GET_AREA(p) (((p) & FC_AREA_MASK) >> FC_AREA_SHIFT)
188 #define FC_GET_PORT(p) (((p) & FC_PORT_MASK) >> FC_PORT_SHIFT)
189
190 #define FC_DOMAIN_CTRLR(p) (FC_DOMAIN_CONTROLLER_MASK | (FC_GET_DOMAIN(p)))
191
192 enum {
193 FC_RXID_ANY = 0xFFFFU,
194 };
195
196
197
198
199 struct fc_els_cmd_s {
200 u32 els_code:8;
201 u32 reserved:24;
202 };
203
204
205
206
207 enum {
208 FC_ELS_LS_RJT = 0x1,
209 FC_ELS_ACC = 0x02,
210 FC_ELS_PLOGI = 0x03,
211 FC_ELS_FLOGI = 0x04,
212 FC_ELS_LOGO = 0x05,
213 FC_ELS_ABTX = 0x06,
214 FC_ELS_RES = 0x08,
215 FC_ELS_RSS = 0x09,
216 FC_ELS_RSI = 0x0A,
217 FC_ELS_ESTC = 0x0C,
218 FC_ELS_RTV = 0x0E,
219 FC_ELS_RLS = 0x0F,
220 FC_ELS_ECHO = 0x10,
221 FC_ELS_TEST = 0x11,
222 FC_ELS_RRQ = 0x12,
223 FC_ELS_REC = 0x13,
224 FC_ELS_PRLI = 0x20,
225 FC_ELS_PRLO = 0x21,
226 FC_ELS_SCN = 0x22,
227 FC_ELS_TPRLO = 0x24,
228 FC_ELS_PDISC = 0x50,
229 FC_ELS_FDISC = 0x51,
230 FC_ELS_ADISC = 0x52,
231 FC_ELS_FARP_REQ = 0x54,
232 FC_ELS_FARP_REP = 0x55,
233 FC_ELS_FAN = 0x60,
234 FC_ELS_RSCN = 0x61,
235 FC_ELS_SCR = 0x62,
236 FC_ELS_RTIN = 0x77,
237 FC_ELS_RNID = 0x78,
238 FC_ELS_RLIR = 0x79,
239
240 FC_ELS_RPSC = 0x7D,
241 FC_ELS_QSA = 0x7E,
242 FC_ELS_E2E_LBEACON = 0x81,
243
244 FC_ELS_AUTH = 0x90,
245 FC_ELS_RFCN = 0x97,
246
247 };
248
249
250
251
252
253
254 enum {
255 FC_PH_VER_4_3 = 0x09,
256 FC_PH_VER_PH_3 = 0x20,
257 };
258
259
260
261
262 enum {
263 FC_MIN_PDUSZ = 512,
264 FC_MAX_PDUSZ = 2112,
265 };
266
267
268
269
270
271 struct fc_plogi_csp_s {
272 u8 verhi;
273 u8 verlo;
274 __be16 bbcred;
275
276 #ifdef __BIG_ENDIAN
277 u8 ciro:1,
278 rro:1,
279 npiv_supp:1,
280 port_type:1,
281 altbbcred:1,
282 resolution:1,
283 vvl_info:1,
284 reserved1:1;
285
286 u8 hg_supp:1,
287 query_dbc:1,
288 security:1,
289 sync_cap:1,
290 r_t_tov:1,
291 dh_dup_supp:1,
292 cisc:1,
293 payload:1;
294 #else
295 u8 reserved2:2,
296 resolution:1,
297 altbbcred:1,
298 port_type:1,
299 npiv_supp:1,
300 rro:1,
301 ciro:1;
302
303 u8 payload:1,
304 cisc:1,
305 dh_dup_supp:1,
306 r_t_tov:1,
307 sync_cap:1,
308 security:1,
309 query_dbc:1,
310 hg_supp:1;
311 #endif
312 __be16 rxsz;
313 __be16 conseq;
314 __be16 ro_bitmap;
315 __be32 e_d_tov;
316 };
317
318
319
320
321
322 struct fc_plogi_clp_s {
323 #ifdef __BIG_ENDIAN
324 u32 class_valid:1;
325 u32 intermix:1;
326
327
328 u32 reserved1:2;
329 u32 sequential:1;
330 u32 reserved2:3;
331 #else
332 u32 reserved2:3;
333 u32 sequential:1;
334 u32 reserved1:2;
335 u32 intermix:1;
336
337
338 u32 class_valid:1;
339 #endif
340 u32 reserved3:24;
341
342 u32 reserved4:16;
343 u32 rxsz:16;
344
345 u32 reserved5:8;
346 u32 conseq:8;
347 u32 e2e_credit:16;
348
349 u32 reserved7:8;
350 u32 ospx:8;
351 u32 reserved8:16;
352 };
353
354
355 #define FLOGI_VVL_BRCD 0x42524344
356
357
358
359
360 struct fc_logi_s {
361 struct fc_els_cmd_s els_cmd;
362 struct fc_plogi_csp_s csp;
363 wwn_t port_name;
364 wwn_t node_name;
365 struct fc_plogi_clp_s class1;
366 struct fc_plogi_clp_s class2;
367 struct fc_plogi_clp_s class3;
368 struct fc_plogi_clp_s class4;
369 u8 vvl[16];
370 };
371
372
373
374
375 struct fc_logo_s {
376 struct fc_els_cmd_s els_cmd;
377 u32 res1:8;
378 u32 nport_id:24;
379 wwn_t orig_port_name;
380 };
381
382
383
384
385 struct fc_adisc_s {
386 struct fc_els_cmd_s els_cmd;
387 u32 res1:8;
388 u32 orig_HA:24;
389 wwn_t orig_port_name;
390 wwn_t orig_node_name;
391 u32 res2:8;
392 u32 nport_id:24;
393 };
394
395
396
397
398 struct fc_exch_status_blk_s {
399 u32 oxid:16;
400 u32 rxid:16;
401 u32 res1:8;
402 u32 orig_np:24;
403 u32 res2:8;
404 u32 resp_np:24;
405 u32 es_bits;
406 u32 res3;
407
408
409
410 };
411
412
413
414
415 struct fc_res_s {
416 struct fc_els_cmd_s els_cmd;
417 u32 res1:8;
418 u32 nport_id:24;
419 u32 oxid:16;
420 u32 rxid:16;
421 u8 assoc_hdr[32];
422 };
423
424
425
426
427 struct fc_res_acc_s {
428 struct fc_els_cmd_s els_cmd;
429 struct fc_exch_status_blk_s fc_exch_blk;
430 };
431
432
433
434
435 struct fc_rec_s {
436 struct fc_els_cmd_s els_cmd;
437 u32 res1:8;
438 u32 nport_id:24;
439 u32 oxid:16;
440 u32 rxid:16;
441 };
442
443 #define FC_REC_ESB_OWN_RSP 0x80000000
444 #define FC_REC_ESB_SI 0x40000000
445 #define FC_REC_ESB_COMP 0x20000000
446 #define FC_REC_ESB_ENDCOND_ABN 0x10000000
447 #define FC_REC_ESB_RQACT 0x04000000
448 #define FC_REC_ESB_ERRP_MSK 0x03000000
449 #define FC_REC_ESB_OXID_INV 0x00800000
450 #define FC_REC_ESB_RXID_INV 0x00400000
451 #define FC_REC_ESB_PRIO_INUSE 0x00200000
452
453
454
455
456 struct fc_rec_acc_s {
457 struct fc_els_cmd_s els_cmd;
458 u32 oxid:16;
459 u32 rxid:16;
460 u32 res1:8;
461 u32 orig_id:24;
462 u32 res2:8;
463 u32 resp_id:24;
464 u32 count;
465 u32 e_stat;
466 };
467
468
469
470
471 struct fc_rsi_s {
472 struct fc_els_cmd_s els_cmd;
473 u32 res1:8;
474 u32 orig_sid:24;
475 u32 oxid:16;
476 u32 rxid:16;
477 };
478
479
480
481
482
483 struct fc_prli_params_s {
484 u32 reserved:16;
485 #ifdef __BIG_ENDIAN
486 u32 reserved1:5;
487 u32 rec_support:1;
488 u32 task_retry_id:1;
489 u32 retry:1;
490
491 u32 confirm:1;
492 u32 doverlay:1;
493 u32 initiator:1;
494 u32 target:1;
495 u32 cdmix:1;
496 u32 drmix:1;
497 u32 rxrdisab:1;
498 u32 wxrdisab:1;
499 #else
500 u32 retry:1;
501 u32 task_retry_id:1;
502 u32 rec_support:1;
503 u32 reserved1:5;
504
505 u32 wxrdisab:1;
506 u32 rxrdisab:1;
507 u32 drmix:1;
508 u32 cdmix:1;
509 u32 target:1;
510 u32 initiator:1;
511 u32 doverlay:1;
512 u32 confirm:1;
513 #endif
514 };
515
516
517
518
519 enum {
520 FC_PRLI_ACC_XQTD = 0x1,
521 FC_PRLI_ACC_PREDEF_IMG = 0x5,
522 };
523
524 struct fc_prli_params_page_s {
525 u32 type:8;
526 u32 codext:8;
527 #ifdef __BIG_ENDIAN
528 u32 origprocasv:1;
529 u32 rsppav:1;
530 u32 imagepair:1;
531 u32 reserved1:1;
532 u32 rspcode:4;
533 #else
534 u32 rspcode:4;
535 u32 reserved1:1;
536 u32 imagepair:1;
537 u32 rsppav:1;
538 u32 origprocasv:1;
539 #endif
540 u32 reserved2:8;
541
542 u32 origprocas;
543 u32 rspprocas;
544 struct fc_prli_params_s servparams;
545 };
546
547
548
549
550 struct fc_prli_s {
551 u32 command:8;
552 u32 pglen:8;
553 u32 pagebytes:16;
554 struct fc_prli_params_page_s parampage;
555 };
556
557
558
559
560 struct fc_prlo_params_page_s {
561 u32 type:8;
562 u32 type_ext:8;
563 #ifdef __BIG_ENDIAN
564 u32 opa_valid:1;
565 u32 rpa_valid:1;
566 u32 res1:14;
567 #else
568 u32 res1:14;
569 u32 rpa_valid:1;
570 u32 opa_valid:1;
571 #endif
572 u32 orig_process_assc;
573 u32 resp_process_assc;
574
575 u32 res2;
576 };
577
578
579
580
581 struct fc_prlo_s {
582 u32 command:8;
583 u32 page_len:8;
584 u32 payload_len:16;
585 struct fc_prlo_params_page_s prlo_params[1];
586 };
587
588
589
590
591 struct fc_prlo_acc_params_page_s {
592 u32 type:8;
593 u32 type_ext:8;
594
595 #ifdef __BIG_ENDIAN
596 u32 opa_valid:1;
597 u32 rpa_valid:1;
598 u32 res1:14;
599 #else
600 u32 res1:14;
601 u32 rpa_valid:1;
602 u32 opa_valid:1;
603 #endif
604 u32 orig_process_assc;
605 u32 resp_process_assc;
606
607 u32 fc4type_csp;
608 };
609
610
611
612
613 struct fc_prlo_acc_s {
614 u32 command:8;
615 u32 page_len:8;
616 u32 payload_len:16;
617 struct fc_prlo_acc_params_page_s prlo_acc_params[1];
618 };
619
620
621
622
623 enum {
624 FC_SCR_REG_FUNC_FABRIC_DETECTED = 0x01,
625 FC_SCR_REG_FUNC_N_PORT_DETECTED = 0x02,
626 FC_SCR_REG_FUNC_FULL = 0x03,
627 FC_SCR_REG_FUNC_CLEAR_REG = 0xFF,
628 };
629
630
631 enum {
632 FC_VU_SCR_REG_FUNC_FABRIC_NAME_CHANGE = 0x01
633 };
634
635 struct fc_scr_s {
636 u32 command:8;
637 u32 res:24;
638 u32 vu_reg_func:8;
639 u32 res1:16;
640 u32 reg_func:8;
641 };
642
643
644
645
646 enum {
647 FC_CAT_NOP = 0x0,
648 FC_CAT_ABTS = 0x1,
649 FC_CAT_RMC = 0x2,
650 FC_CAT_BA_ACC = 0x4,
651 FC_CAT_BA_RJT = 0x5,
652 FC_CAT_PRMT = 0x6,
653 };
654
655
656
657
658 struct fc_ls_rjt_s {
659 struct fc_els_cmd_s els_cmd;
660 u32 res1:8;
661 u32 reason_code:8;
662 u32 reason_code_expl:8;
663 u32 vendor_unique:8;
664 };
665
666
667
668
669 enum {
670 FC_LS_RJT_RSN_INV_CMD_CODE = 0x01,
671 FC_LS_RJT_RSN_LOGICAL_ERROR = 0x03,
672 FC_LS_RJT_RSN_LOGICAL_BUSY = 0x05,
673 FC_LS_RJT_RSN_PROTOCOL_ERROR = 0x07,
674 FC_LS_RJT_RSN_UNABLE_TO_PERF_CMD = 0x09,
675 FC_LS_RJT_RSN_CMD_NOT_SUPP = 0x0B,
676 };
677
678
679
680
681 enum {
682 FC_LS_RJT_EXP_NO_ADDL_INFO = 0x00,
683 FC_LS_RJT_EXP_SPARMS_ERR_OPTIONS = 0x01,
684 FC_LS_RJT_EXP_SPARMS_ERR_INI_CTL = 0x03,
685 FC_LS_RJT_EXP_SPARMS_ERR_REC_CTL = 0x05,
686 FC_LS_RJT_EXP_SPARMS_ERR_RXSZ = 0x07,
687 FC_LS_RJT_EXP_SPARMS_ERR_CONSEQ = 0x09,
688 FC_LS_RJT_EXP_SPARMS_ERR_CREDIT = 0x0B,
689 FC_LS_RJT_EXP_INV_PORT_NAME = 0x0D,
690 FC_LS_RJT_EXP_INV_NODE_FABRIC_NAME = 0x0E,
691 FC_LS_RJT_EXP_INV_CSP = 0x0F,
692 FC_LS_RJT_EXP_INV_ASSOC_HDR = 0x11,
693 FC_LS_RJT_EXP_ASSOC_HDR_REQD = 0x13,
694 FC_LS_RJT_EXP_INV_ORIG_S_ID = 0x15,
695 FC_LS_RJT_EXP_INV_OXID_RXID_COMB = 0x17,
696 FC_LS_RJT_EXP_CMD_ALREADY_IN_PROG = 0x19,
697 FC_LS_RJT_EXP_LOGIN_REQUIRED = 0x1E,
698 FC_LS_RJT_EXP_INVALID_NPORT_ID = 0x1F,
699 FC_LS_RJT_EXP_INSUFF_RES = 0x29,
700 FC_LS_RJT_EXP_CMD_NOT_SUPP = 0x2C,
701 FC_LS_RJT_EXP_INV_PAYLOAD_LEN = 0x2D,
702 };
703
704
705
706
707 struct fc_rrq_s {
708 struct fc_els_cmd_s els_cmd;
709 u32 res1:8;
710 u32 s_id:24;
711
712 u32 ox_id:16;
713 u32 rx_id:16;
714
715 u32 res2[8];
716 };
717
718
719
720
721 struct fc_ba_acc_s {
722 u32 seq_id_valid:8;
723 u32 seq_id:8;
724 u32 res2:16;
725 u32 ox_id:16;
726 u32 rx_id:16;
727 u32 low_seq_cnt:16;
728 u32 high_seq_cnt:16;
729 };
730
731
732
733
734 struct fc_ba_rjt_s {
735 u32 res1:8;
736 u32 reason_code:8;
737 u32 reason_expl:8;
738 u32 vendor_unique:8;
739 };
740
741
742
743
744 struct fc_tprlo_params_page_s {
745 u32 type:8;
746 u32 type_ext:8;
747
748 #ifdef __BIG_ENDIAN
749 u32 opa_valid:1;
750 u32 rpa_valid:1;
751 u32 tpo_nport_valid:1;
752 u32 global_process_logout:1;
753 u32 res1:12;
754 #else
755 u32 res1:12;
756 u32 global_process_logout:1;
757 u32 tpo_nport_valid:1;
758 u32 rpa_valid:1;
759 u32 opa_valid:1;
760 #endif
761
762 u32 orig_process_assc;
763 u32 resp_process_assc;
764
765 u32 res2:8;
766 u32 tpo_nport_id;
767 };
768
769
770
771
772 struct fc_tprlo_s {
773 u32 command:8;
774 u32 page_len:8;
775 u32 payload_len:16;
776
777 struct fc_tprlo_params_page_s tprlo_params[1];
778 };
779
780 enum fc_tprlo_type {
781 FC_GLOBAL_LOGO = 1,
782 FC_TPR_LOGO
783 };
784
785
786
787
788 struct fc_tprlo_acc_s {
789 u32 command:8;
790 u32 page_len:8;
791 u32 payload_len:16;
792 struct fc_prlo_acc_params_page_s tprlo_acc_params[1];
793 };
794
795
796
797
798 #define FC_RSCN_PGLEN 0x4
799
800 enum fc_rscn_format {
801 FC_RSCN_FORMAT_PORTID = 0x0,
802 FC_RSCN_FORMAT_AREA = 0x1,
803 FC_RSCN_FORMAT_DOMAIN = 0x2,
804 FC_RSCN_FORMAT_FABRIC = 0x3,
805 };
806
807 struct fc_rscn_event_s {
808 u32 format:2;
809 u32 qualifier:4;
810 u32 resvd:2;
811 u32 portid:24;
812 };
813
814 struct fc_rscn_pl_s {
815 u8 command;
816 u8 pagelen;
817 __be16 payldlen;
818 struct fc_rscn_event_s event[1];
819 };
820
821
822
823
824 struct fc_echo_s {
825 struct fc_els_cmd_s els_cmd;
826 };
827
828
829
830
831 #define RNID_NODEID_DATA_FORMAT_COMMON 0x00
832 #define RNID_NODEID_DATA_FORMAT_FCP3 0x08
833 #define RNID_NODEID_DATA_FORMAT_DISCOVERY 0xDF
834
835 #define RNID_ASSOCIATED_TYPE_UNKNOWN 0x00000001
836 #define RNID_ASSOCIATED_TYPE_OTHER 0x00000002
837 #define RNID_ASSOCIATED_TYPE_HUB 0x00000003
838 #define RNID_ASSOCIATED_TYPE_SWITCH 0x00000004
839 #define RNID_ASSOCIATED_TYPE_GATEWAY 0x00000005
840 #define RNID_ASSOCIATED_TYPE_STORAGE_DEVICE 0x00000009
841 #define RNID_ASSOCIATED_TYPE_HOST 0x0000000A
842 #define RNID_ASSOCIATED_TYPE_STORAGE_SUBSYSTEM 0x0000000B
843 #define RNID_ASSOCIATED_TYPE_STORAGE_ACCESS_DEVICE 0x0000000E
844 #define RNID_ASSOCIATED_TYPE_NAS_SERVER 0x00000011
845 #define RNID_ASSOCIATED_TYPE_BRIDGE 0x00000002
846 #define RNID_ASSOCIATED_TYPE_VIRTUALIZATION_DEVICE 0x00000003
847 #define RNID_ASSOCIATED_TYPE_MULTI_FUNCTION_DEVICE 0x000000FF
848
849
850
851
852 struct fc_rnid_cmd_s {
853 struct fc_els_cmd_s els_cmd;
854 u32 node_id_data_format:8;
855 u32 reserved:24;
856 };
857
858
859
860
861
862 struct fc_rnid_common_id_data_s {
863 wwn_t port_name;
864 wwn_t node_name;
865 };
866
867 struct fc_rnid_general_topology_data_s {
868 u32 vendor_unique[4];
869 __be32 asso_type;
870 u32 phy_port_num;
871 __be32 num_attached_nodes;
872 u32 node_mgmt:8;
873 u32 ip_version:8;
874 u32 udp_tcp_port_num:16;
875 u32 ip_address[4];
876 u32 reserved:16;
877 u32 vendor_specific:16;
878 };
879
880 struct fc_rnid_acc_s {
881 struct fc_els_cmd_s els_cmd;
882 u32 node_id_data_format:8;
883 u32 common_id_data_length:8;
884 u32 reserved:8;
885 u32 specific_id_data_length:8;
886 struct fc_rnid_common_id_data_s common_id_data;
887 struct fc_rnid_general_topology_data_s gen_topology_data;
888 };
889
890 #define RNID_ASSOCIATED_TYPE_UNKNOWN 0x00000001
891 #define RNID_ASSOCIATED_TYPE_OTHER 0x00000002
892 #define RNID_ASSOCIATED_TYPE_HUB 0x00000003
893 #define RNID_ASSOCIATED_TYPE_SWITCH 0x00000004
894 #define RNID_ASSOCIATED_TYPE_GATEWAY 0x00000005
895 #define RNID_ASSOCIATED_TYPE_STORAGE_DEVICE 0x00000009
896 #define RNID_ASSOCIATED_TYPE_HOST 0x0000000A
897 #define RNID_ASSOCIATED_TYPE_STORAGE_SUBSYSTEM 0x0000000B
898 #define RNID_ASSOCIATED_TYPE_STORAGE_ACCESS_DEVICE 0x0000000E
899 #define RNID_ASSOCIATED_TYPE_NAS_SERVER 0x00000011
900 #define RNID_ASSOCIATED_TYPE_BRIDGE 0x00000002
901 #define RNID_ASSOCIATED_TYPE_VIRTUALIZATION_DEVICE 0x00000003
902 #define RNID_ASSOCIATED_TYPE_MULTI_FUNCTION_DEVICE 0x000000FF
903
904 enum fc_rpsc_speed_cap {
905 RPSC_SPEED_CAP_1G = 0x8000,
906 RPSC_SPEED_CAP_2G = 0x4000,
907 RPSC_SPEED_CAP_4G = 0x2000,
908 RPSC_SPEED_CAP_10G = 0x1000,
909 RPSC_SPEED_CAP_8G = 0x0800,
910 RPSC_SPEED_CAP_16G = 0x0400,
911
912 RPSC_SPEED_CAP_UNKNOWN = 0x0001,
913 };
914
915 enum fc_rpsc_op_speed {
916 RPSC_OP_SPEED_1G = 0x8000,
917 RPSC_OP_SPEED_2G = 0x4000,
918 RPSC_OP_SPEED_4G = 0x2000,
919 RPSC_OP_SPEED_10G = 0x1000,
920 RPSC_OP_SPEED_8G = 0x0800,
921 RPSC_OP_SPEED_16G = 0x0400,
922
923 RPSC_OP_SPEED_NOT_EST = 0x0001,
924 };
925
926 struct fc_rpsc_speed_info_s {
927 __be16 port_speed_cap;
928 __be16 port_op_speed;
929 };
930
931
932
933
934
935 struct fc_rpsc_cmd_s {
936 struct fc_els_cmd_s els_cmd;
937 };
938
939
940
941
942 struct fc_rpsc_acc_s {
943 u32 command:8;
944 u32 rsvd:8;
945 u32 num_entries:16;
946
947 struct fc_rpsc_speed_info_s speed_info[1];
948 };
949
950
951
952
953 #define FC_BRCD_TOKEN 0x42524344
954
955 struct fc_rpsc2_cmd_s {
956 struct fc_els_cmd_s els_cmd;
957 __be32 token;
958 u16 resvd;
959 __be16 num_pids;
960 struct {
961 u32 rsvd1:8;
962 u32 pid:24;
963 } pid_list[1];
964 };
965
966 enum fc_rpsc2_port_type {
967 RPSC2_PORT_TYPE_UNKNOWN = 0,
968 RPSC2_PORT_TYPE_NPORT = 1,
969 RPSC2_PORT_TYPE_NLPORT = 2,
970 RPSC2_PORT_TYPE_NPIV_PORT = 0x5f,
971 RPSC2_PORT_TYPE_NPORT_TRUNK = 0x6f,
972 };
973
974
975
976
977 struct fc_rpsc2_port_info_s {
978 __be32 pid;
979 u16 resvd1;
980 __be16 index;
981 u8 resvd2;
982 u8 type;
983 __be16 speed;
984 };
985
986
987
988
989 struct fc_rpsc2_acc_s {
990 u8 els_cmd;
991 u8 resvd;
992 __be16 num_pids;
993 struct fc_rpsc2_port_info_s port_info[1];
994 };
995
996
997
998
999 enum fc_cos {
1000 FC_CLASS_2 = 0x04,
1001 FC_CLASS_3 = 0x08,
1002 FC_CLASS_2_3 = 0x0C,
1003 };
1004
1005
1006
1007
1008 struct fc_symname_s {
1009 u8 symname[FC_SYMNAME_MAX];
1010 };
1011
1012 struct fc_alpabm_s {
1013 u8 alpa_bm[FC_ALPA_MAX / 8];
1014 };
1015
1016
1017
1018
1019 #define FC_ED_TOV 2
1020 #define FC_REC_TOV (FC_ED_TOV + 1)
1021 #define FC_RA_TOV 10
1022 #define FC_ELS_TOV (2 * FC_RA_TOV)
1023 #define FC_FCCT_TOV (3 * FC_RA_TOV)
1024
1025
1026
1027
1028 #define FC_VF_ID_NULL 0
1029 #define FC_VF_ID_MIN 1
1030 #define FC_VF_ID_MAX 0xEFF
1031 #define FC_VF_ID_CTL 0xFEF
1032
1033
1034
1035
1036
1037 struct fc_vft_s {
1038 u32 r_ctl:8;
1039 u32 ver:2;
1040 u32 type:4;
1041 u32 res_a:2;
1042 u32 priority:3;
1043 u32 vf_id:12;
1044 u32 res_b:1;
1045 u32 hopct:8;
1046 u32 res_c:24;
1047 };
1048
1049
1050
1051
1052 #define FCP_CMND_CDB_LEN 16
1053 #define FCP_CMND_LUN_LEN 8
1054
1055 struct fcp_cmnd_s {
1056 struct scsi_lun lun;
1057 u8 crn;
1058 #ifdef __BIG_ENDIAN
1059 u8 resvd:1,
1060 priority:4,
1061 taskattr:3;
1062 #else
1063 u8 taskattr:3,
1064 priority:4,
1065 resvd:1;
1066 #endif
1067 u8 tm_flags;
1068 #ifdef __BIG_ENDIAN
1069 u8 addl_cdb_len:6,
1070 iodir:2;
1071 #else
1072 u8 iodir:2,
1073 addl_cdb_len:6;
1074 #endif
1075 struct scsi_cdb_s cdb;
1076
1077 __be32 fcp_dl;
1078 };
1079
1080 #define fcp_cmnd_cdb_len(_cmnd) ((_cmnd)->addl_cdb_len * 4 + FCP_CMND_CDB_LEN)
1081 #define fcp_cmnd_fcpdl(_cmnd) ((&(_cmnd)->fcp_dl)[(_cmnd)->addl_cdb_len])
1082
1083
1084
1085
1086 enum fcp_iodir {
1087 FCP_IODIR_NONE = 0,
1088 FCP_IODIR_WRITE = 1,
1089 FCP_IODIR_READ = 2,
1090 FCP_IODIR_RW = 3,
1091 };
1092
1093
1094
1095
1096 enum fcp_tm_cmnd {
1097 FCP_TM_ABORT_TASK_SET = BIT(1),
1098 FCP_TM_CLEAR_TASK_SET = BIT(2),
1099 FCP_TM_LUN_RESET = BIT(4),
1100 FCP_TM_TARGET_RESET = BIT(5),
1101 FCP_TM_CLEAR_ACA = BIT(6),
1102 };
1103
1104
1105
1106
1107 enum fcp_residue {
1108 FCP_NO_RESIDUE = 0,
1109 FCP_RESID_OVER = 1,
1110 FCP_RESID_UNDER = 2,
1111 };
1112
1113 struct fcp_rspinfo_s {
1114 u32 res0:24;
1115 u32 rsp_code:8;
1116 u32 res1;
1117 };
1118
1119 struct fcp_resp_s {
1120 u32 reserved[2];
1121 u16 reserved2;
1122 #ifdef __BIG_ENDIAN
1123 u8 reserved3:3;
1124 u8 fcp_conf_req:1;
1125 u8 resid_flags:2;
1126 u8 sns_len_valid:1;
1127 u8 rsp_len_valid:1;
1128 #else
1129 u8 rsp_len_valid:1;
1130 u8 sns_len_valid:1;
1131 u8 resid_flags:2;
1132 u8 fcp_conf_req:1;
1133 u8 reserved3:3;
1134 #endif
1135 u8 scsi_status;
1136 u32 residue;
1137 u32 sns_len;
1138 u32 rsp_len;
1139 };
1140
1141 #define fcp_snslen(__fcprsp) ((__fcprsp)->sns_len_valid ? \
1142 (__fcprsp)->sns_len : 0)
1143 #define fcp_rsplen(__fcprsp) ((__fcprsp)->rsp_len_valid ? \
1144 (__fcprsp)->rsp_len : 0)
1145 #define fcp_rspinfo(__fcprsp) ((struct fcp_rspinfo_s *)((__fcprsp) + 1))
1146 #define fcp_snsinfo(__fcprsp) (((u8 *)fcp_rspinfo(__fcprsp)) + \
1147 fcp_rsplen(__fcprsp))
1148
1149
1150
1151 struct ct_hdr_s {
1152 u32 rev_id:8;
1153 u32 in_id:24;
1154 u32 gs_type:8;
1155 u32 gs_sub_type:8;
1156 u32 options:8;
1157 u32 rsvrd:8;
1158 u32 cmd_rsp_code:16;
1159 u32 max_res_size:16;
1160 u32 frag_id:8;
1161 u32 reason_code:8;
1162 u32 exp_code:8;
1163 u32 vendor_unq:8;
1164 };
1165
1166
1167
1168
1169 enum {
1170 CT_GS3_REVISION = 0x01,
1171 };
1172
1173
1174
1175
1176 enum {
1177 CT_GSTYPE_KEYSERVICE = 0xF7,
1178 CT_GSTYPE_ALIASSERVICE = 0xF8,
1179 CT_GSTYPE_MGMTSERVICE = 0xFA,
1180 CT_GSTYPE_TIMESERVICE = 0xFB,
1181 CT_GSTYPE_DIRSERVICE = 0xFC,
1182 };
1183
1184
1185
1186
1187 enum {
1188 CT_GSSUBTYPE_NAMESERVER = 0x02,
1189 };
1190
1191
1192
1193
1194 enum {
1195 CT_GSSUBTYPE_CFGSERVER = 0x01,
1196 CT_GSSUBTYPE_UNZONED_NS = 0x02,
1197 CT_GSSUBTYPE_ZONESERVER = 0x03,
1198 CT_GSSUBTYPE_LOCKSERVER = 0x04,
1199 CT_GSSUBTYPE_HBA_MGMTSERVER = 0x10,
1200 };
1201
1202
1203
1204
1205 enum {
1206 CT_RSP_REJECT = 0x8001,
1207 CT_RSP_ACCEPT = 0x8002,
1208 };
1209
1210
1211
1212
1213 enum {
1214 CT_RSN_INV_CMD = 0x01,
1215 CT_RSN_INV_VER = 0x02,
1216 CT_RSN_LOGIC_ERR = 0x03,
1217 CT_RSN_INV_SIZE = 0x04,
1218 CT_RSN_LOGICAL_BUSY = 0x05,
1219 CT_RSN_PROTO_ERR = 0x07,
1220 CT_RSN_UNABLE_TO_PERF = 0x09,
1221 CT_RSN_NOT_SUPP = 0x0B,
1222 CT_RSN_SERVER_NOT_AVBL = 0x0D,
1223 CT_RSN_SESSION_COULD_NOT_BE_ESTBD = 0x0E,
1224 CT_RSN_VENDOR_SPECIFIC = 0xFF,
1225
1226 };
1227
1228
1229
1230
1231 enum {
1232 CT_NS_EXP_NOADDITIONAL = 0x00,
1233 CT_NS_EXP_ID_NOT_REG = 0x01,
1234 CT_NS_EXP_PN_NOT_REG = 0x02,
1235 CT_NS_EXP_NN_NOT_REG = 0x03,
1236 CT_NS_EXP_CS_NOT_REG = 0x04,
1237 CT_NS_EXP_IPN_NOT_REG = 0x05,
1238 CT_NS_EXP_IPA_NOT_REG = 0x06,
1239 CT_NS_EXP_FT_NOT_REG = 0x07,
1240 CT_NS_EXP_SPN_NOT_REG = 0x08,
1241 CT_NS_EXP_SNN_NOT_REG = 0x09,
1242 CT_NS_EXP_PT_NOT_REG = 0x0A,
1243 CT_NS_EXP_IPP_NOT_REG = 0x0B,
1244 CT_NS_EXP_FPN_NOT_REG = 0x0C,
1245 CT_NS_EXP_HA_NOT_REG = 0x0D,
1246 CT_NS_EXP_FD_NOT_REG = 0x0E,
1247 CT_NS_EXP_FF_NOT_REG = 0x0F,
1248 CT_NS_EXP_ACCESSDENIED = 0x10,
1249 CT_NS_EXP_UNACCEPTABLE_ID = 0x11,
1250 CT_NS_EXP_DATABASEEMPTY = 0x12,
1251 CT_NS_EXP_NOT_REG_IN_SCOPE = 0x13,
1252 CT_NS_EXP_DOM_ID_NOT_PRESENT = 0x14,
1253 CT_NS_EXP_PORT_NUM_NOT_PRESENT = 0x15,
1254 CT_NS_EXP_NO_DEVICE_ATTACHED = 0x16
1255 };
1256
1257
1258
1259
1260 enum {
1261 CT_EXP_AUTH_EXCEPTION = 0xF1,
1262 CT_EXP_DB_FULL = 0xF2,
1263 CT_EXP_DB_EMPTY = 0xF3,
1264 CT_EXP_PROCESSING_REQ = 0xF4,
1265 CT_EXP_UNABLE_TO_VERIFY_CONN = 0xF5,
1266 CT_EXP_DEVICES_NOT_IN_CMN_ZONE = 0xF6
1267 };
1268
1269
1270
1271
1272 enum {
1273 GS_GID_PN = 0x0121,
1274 GS_GPN_ID = 0x0112,
1275 GS_GNN_ID = 0x0113,
1276 GS_GID_FT = 0x0171,
1277 GS_GSPN_ID = 0x0118,
1278 GS_RFT_ID = 0x0217,
1279 GS_RSPN_ID = 0x0218,
1280 GS_RSNN_NN = 0x0239,
1281 GS_RPN_ID = 0x0212,
1282 GS_RNN_ID = 0x0213,
1283 GS_RCS_ID = 0x0214,
1284 GS_RPT_ID = 0x021A,
1285 GS_GA_NXT = 0x0100,
1286 GS_RFF_ID = 0x021F,
1287 };
1288
1289 struct fcgs_id_req_s {
1290 u32 rsvd:8;
1291 u32 dap:24;
1292 };
1293 #define fcgs_gpnid_req_t struct fcgs_id_req_s
1294 #define fcgs_gnnid_req_t struct fcgs_id_req_s
1295 #define fcgs_gspnid_req_t struct fcgs_id_req_s
1296
1297 struct fcgs_gidpn_req_s {
1298 wwn_t port_name;
1299 };
1300
1301 struct fcgs_gidpn_resp_s {
1302 u32 rsvd:8;
1303 u32 dap:24;
1304 };
1305
1306
1307
1308
1309 struct fcgs_rftid_req_s {
1310 u32 rsvd:8;
1311 u32 dap:24;
1312 __be32 fc4_type[8];
1313 };
1314
1315
1316
1317
1318 #define FC_GS_FCP_FC4_FEATURE_INITIATOR 0x02
1319 #define FC_GS_FCP_FC4_FEATURE_TARGET 0x01
1320
1321 struct fcgs_rffid_req_s {
1322 u32 rsvd:8;
1323 u32 dap:24;
1324 u32 rsvd1:16;
1325 u32 fc4ftr_bits:8;
1326 u32 fc4_type:8;
1327 };
1328
1329
1330
1331
1332 struct fcgs_gidft_req_s {
1333 u8 reserved;
1334 u8 domain_id;
1335 u8 area_id;
1336 u8 fc4_type;
1337 };
1338
1339
1340
1341
1342 struct fcgs_gidft_resp_s {
1343 u8 last:1;
1344 u8 reserved:7;
1345 u32 pid:24;
1346 };
1347
1348
1349
1350
1351 struct fcgs_rspnid_req_s {
1352 u32 rsvd:8;
1353 u32 dap:24;
1354 u8 spn_len;
1355 u8 spn[256];
1356 };
1357
1358
1359
1360
1361 struct fcgs_rsnn_nn_req_s {
1362 wwn_t node_name;
1363 u8 snn_len;
1364 u8 snn[256];
1365 };
1366
1367
1368
1369
1370 struct fcgs_rpnid_req_s {
1371 u32 rsvd:8;
1372 u32 port_id:24;
1373 wwn_t port_name;
1374 };
1375
1376
1377
1378
1379 struct fcgs_rnnid_req_s {
1380 u32 rsvd:8;
1381 u32 port_id:24;
1382 wwn_t node_name;
1383 };
1384
1385
1386
1387
1388 struct fcgs_rcsid_req_s {
1389 u32 rsvd:8;
1390 u32 port_id:24;
1391 u32 cos;
1392 };
1393
1394
1395
1396
1397 struct fcgs_rptid_req_s {
1398 u32 rsvd:8;
1399 u32 port_id:24;
1400 u32 port_type:8;
1401 u32 rsvd1:24;
1402 };
1403
1404
1405
1406
1407 struct fcgs_ganxt_req_s {
1408 u32 rsvd:8;
1409 u32 port_id:24;
1410 };
1411
1412
1413
1414
1415 struct fcgs_ganxt_rsp_s {
1416 u32 port_type:8;
1417 u32 port_id:24;
1418 wwn_t port_name;
1419 u8 spn_len;
1420 char spn[255];
1421 wwn_t node_name;
1422 u8 snn_len;
1423 char snn[255];
1424 u8 ipa[8];
1425 u8 ip[16];
1426 u32 cos;
1427 u32 fc4types[8];
1428 wwn_t fabric_port_name;
1429 u32 rsvd:8;
1430 u32 hard_addr:24;
1431 };
1432
1433
1434
1435
1436 enum {
1437 GS_FC_GFN_CMD = 0x0114,
1438 GS_FC_GMAL_CMD = 0x0116,
1439 GS_FC_TRACE_CMD = 0x0400,
1440 GS_FC_PING_CMD = 0x0401,
1441 };
1442
1443
1444
1445
1446
1447 #define CT_GMAL_RESP_PREFIX_TELNET "telnet://"
1448 #define CT_GMAL_RESP_PREFIX_HTTP "http://"
1449
1450
1451 struct fcgs_req_s {
1452 wwn_t wwn;
1453 };
1454
1455 #define fcgs_gmal_req_t struct fcgs_req_s
1456 #define fcgs_gfn_req_t struct fcgs_req_s
1457
1458
1459 struct fcgs_gmal_resp_s {
1460 __be32 ms_len;
1461 u8 ms_ma[256];
1462 };
1463
1464 struct fcgs_gmal_entry_s {
1465 u8 len;
1466 u8 prefix[7];
1467 u8 ip_addr[248];
1468 };
1469
1470
1471
1472
1473 #define FDMI_GRHL 0x0100
1474 #define FDMI_GHAT 0x0101
1475 #define FDMI_GRPL 0x0102
1476 #define FDMI_GPAT 0x0110
1477 #define FDMI_RHBA 0x0200
1478 #define FDMI_RHAT 0x0201
1479 #define FDMI_RPRT 0x0210
1480 #define FDMI_RPA 0x0211
1481 #define FDMI_DHBA 0x0300
1482 #define FDMI_DPRT 0x0310
1483
1484
1485
1486
1487 #define FDMI_NO_ADDITIONAL_EXP 0x00
1488 #define FDMI_HBA_ALREADY_REG 0x10
1489 #define FDMI_HBA_ATTRIB_NOT_REG 0x11
1490 #define FDMI_HBA_ATTRIB_MULTIPLE 0x12
1491 #define FDMI_HBA_ATTRIB_LENGTH_INVALID 0x13
1492 #define FDMI_HBA_ATTRIB_NOT_PRESENT 0x14
1493 #define FDMI_PORT_ORIG_NOT_IN_LIST 0x15
1494 #define FDMI_PORT_HBA_NOT_IN_LIST 0x16
1495 #define FDMI_PORT_ATTRIB_NOT_REG 0x20
1496 #define FDMI_PORT_NOT_REG 0x21
1497 #define FDMI_PORT_ATTRIB_MULTIPLE 0x22
1498 #define FDMI_PORT_ATTRIB_LENGTH_INVALID 0x23
1499 #define FDMI_PORT_ALREADY_REGISTEREED 0x24
1500
1501
1502
1503
1504 #define FDMI_TRANS_SPEED_1G 0x00000001
1505 #define FDMI_TRANS_SPEED_2G 0x00000002
1506 #define FDMI_TRANS_SPEED_10G 0x00000004
1507 #define FDMI_TRANS_SPEED_4G 0x00000008
1508 #define FDMI_TRANS_SPEED_8G 0x00000010
1509 #define FDMI_TRANS_SPEED_16G 0x00000020
1510 #define FDMI_TRANS_SPEED_UNKNOWN 0x00008000
1511
1512
1513
1514
1515 enum fdmi_hba_attribute_type {
1516 FDMI_HBA_ATTRIB_NODENAME = 1,
1517 FDMI_HBA_ATTRIB_MANUFACTURER,
1518 FDMI_HBA_ATTRIB_SERIALNUM,
1519 FDMI_HBA_ATTRIB_MODEL,
1520 FDMI_HBA_ATTRIB_MODEL_DESC,
1521 FDMI_HBA_ATTRIB_HW_VERSION,
1522 FDMI_HBA_ATTRIB_DRIVER_VERSION,
1523 FDMI_HBA_ATTRIB_ROM_VERSION,
1524 FDMI_HBA_ATTRIB_FW_VERSION,
1525 FDMI_HBA_ATTRIB_OS_NAME,
1526 FDMI_HBA_ATTRIB_MAX_CT,
1527 FDMI_HBA_ATTRIB_NODE_SYM_NAME,
1528 FDMI_HBA_ATTRIB_VENDOR_INFO,
1529 FDMI_HBA_ATTRIB_NUM_PORTS,
1530 FDMI_HBA_ATTRIB_FABRIC_NAME,
1531 FDMI_HBA_ATTRIB_BIOS_VER,
1532 FDMI_HBA_ATTRIB_VENDOR_ID = 0x00E0,
1533
1534 FDMI_HBA_ATTRIB_MAX_TYPE
1535 };
1536
1537
1538
1539
1540 enum fdmi_port_attribute_type {
1541 FDMI_PORT_ATTRIB_FC4_TYPES = 1,
1542 FDMI_PORT_ATTRIB_SUPP_SPEED,
1543 FDMI_PORT_ATTRIB_PORT_SPEED,
1544 FDMI_PORT_ATTRIB_FRAME_SIZE,
1545 FDMI_PORT_ATTRIB_DEV_NAME,
1546 FDMI_PORT_ATTRIB_HOST_NAME,
1547 FDMI_PORT_ATTRIB_NODE_NAME,
1548 FDMI_PORT_ATTRIB_PORT_NAME,
1549 FDMI_PORT_ATTRIB_PORT_SYM_NAME,
1550 FDMI_PORT_ATTRIB_PORT_TYPE,
1551 FDMI_PORT_ATTRIB_SUPP_COS,
1552 FDMI_PORT_ATTRIB_PORT_FAB_NAME,
1553 FDMI_PORT_ATTRIB_PORT_FC4_TYPE,
1554 FDMI_PORT_ATTRIB_PORT_STATE = 0x101,
1555 FDMI_PORT_ATTRIB_PORT_NUM_RPRT = 0x102,
1556
1557 FDMI_PORT_ATTR_MAX_TYPE
1558 };
1559
1560
1561
1562
1563 struct fdmi_attr_s {
1564 __be16 type;
1565 __be16 len;
1566 u8 value[1];
1567 };
1568
1569
1570
1571
1572 struct fdmi_hba_attr_s {
1573 __be32 attr_count;
1574 struct fdmi_attr_s hba_attr;
1575 };
1576
1577
1578
1579
1580 struct fdmi_port_list_s {
1581 __be32 num_ports;
1582 wwn_t port_entry;
1583 };
1584
1585
1586
1587
1588 struct fdmi_port_attr_s {
1589 __be32 attr_count;
1590 struct fdmi_attr_s port_attr;
1591 };
1592
1593
1594
1595
1596 struct fdmi_rhba_s {
1597 wwn_t hba_id;
1598 struct fdmi_port_list_s port_list;
1599 struct fdmi_hba_attr_s hba_attr_blk;
1600 };
1601
1602
1603
1604
1605 struct fdmi_rprt_s {
1606 wwn_t hba_id;
1607 wwn_t port_name;
1608 struct fdmi_port_attr_s port_attr_blk;
1609 };
1610
1611
1612
1613
1614 struct fdmi_rpa_s {
1615 wwn_t port_name;
1616 struct fdmi_port_attr_s port_attr_blk;
1617 };
1618
1619 #pragma pack()
1620
1621 #endif