diff options
author | Jing Huang <huangj@brocade.com> | 2010-12-27 00:50:10 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-31 10:43:31 -0500 |
commit | 8f4bfadd200477acb6dcf41a45919dd37d01a6db (patch) | |
tree | ec25c381eb99246efbc4fb0911529b229323df0f /drivers/scsi/bfa/bfa_fc.h | |
parent | 2f2f40a45845e52fbbe07bcd3e09ccff44feb01b (diff) |
[SCSI] bfa: remove unused defintions and misc cleanups
This patch removes unused functions, data strucutres, and definitions. It
also includes misc comment and formatting cleanups.
Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/bfa/bfa_fc.h')
-rw-r--r-- | drivers/scsi/bfa/bfa_fc.h | 588 |
1 files changed, 140 insertions, 448 deletions
diff --git a/drivers/scsi/bfa/bfa_fc.h b/drivers/scsi/bfa/bfa_fc.h index 0d04ba9574f9..8e764fae8dc9 100644 --- a/drivers/scsi/bfa/bfa_fc.h +++ b/drivers/scsi/bfa/bfa_fc.h | |||
@@ -24,7 +24,6 @@ typedef u64 wwn_t; | |||
24 | 24 | ||
25 | #define WWN_NULL (0) | 25 | #define WWN_NULL (0) |
26 | #define FC_SYMNAME_MAX 256 /* max name server symbolic name size */ | 26 | #define FC_SYMNAME_MAX 256 /* max name server symbolic name size */ |
27 | #define FC_ALPA_MAX 128 | ||
28 | 27 | ||
29 | #pragma pack(1) | 28 | #pragma pack(1) |
30 | 29 | ||
@@ -39,7 +38,6 @@ struct mac_s { u8 mac[MAC_ADDRLEN]; }; | |||
39 | struct scsi_cdb_s { | 38 | struct scsi_cdb_s { |
40 | u8 scsi_cdb[SCSI_MAX_CDBLEN]; | 39 | u8 scsi_cdb[SCSI_MAX_CDBLEN]; |
41 | }; | 40 | }; |
42 | #define scsi_cdb_t struct scsi_cdb_s | ||
43 | 41 | ||
44 | /* ------------------------------------------------------------ | 42 | /* ------------------------------------------------------------ |
45 | * SCSI status byte values | 43 | * SCSI status byte values |
@@ -74,34 +72,19 @@ struct fchs_s { | |||
74 | u32 cs_ctl:8; /* class specific control */ | 72 | u32 cs_ctl:8; /* class specific control */ |
75 | u32 s_id:24; /* source identifier */ | 73 | u32 s_id:24; /* source identifier */ |
76 | 74 | ||
77 | u32 type:8; /* data structure type */ | 75 | u32 type:8; /* data structure type */ |
78 | u32 f_ctl:24; /* initial frame control */ | 76 | u32 f_ctl:24; /* initial frame control */ |
79 | 77 | ||
80 | u8 seq_id; /* sequence identifier */ | 78 | u8 seq_id; /* sequence identifier */ |
81 | u8 df_ctl; /* data field control */ | 79 | u8 df_ctl; /* data field control */ |
82 | u16 seq_cnt; /* sequence count */ | 80 | u16 seq_cnt; /* sequence count */ |
83 | 81 | ||
84 | __be16 ox_id; /* originator exchange ID */ | 82 | __be16 ox_id; /* originator exchange ID */ |
85 | u16 rx_id; /* responder exchange ID */ | 83 | u16 rx_id; /* responder exchange ID */ |
86 | 84 | ||
87 | u32 ro; /* relative offset */ | 85 | u32 ro; /* relative offset */ |
88 | }; | 86 | }; |
89 | 87 | ||
90 | #define FC_SOF_LEN 4 | ||
91 | #define FC_EOF_LEN 4 | ||
92 | #define FC_CRC_LEN 4 | ||
93 | |||
94 | /* | ||
95 | * Fibre Channel BB_E Header Structure | ||
96 | */ | ||
97 | struct fcbbehs_s { | ||
98 | u16 ver_rsvd; | ||
99 | u32 rsvd[2]; | ||
100 | u32 rsvd__sof; | ||
101 | }; | ||
102 | |||
103 | #define FC_SEQ_ID_MAX 256 | ||
104 | |||
105 | /* | 88 | /* |
106 | * routing bit definitions | 89 | * routing bit definitions |
107 | */ | 90 | */ |
@@ -148,22 +131,6 @@ enum { | |||
148 | }; | 131 | }; |
149 | 132 | ||
150 | /* | 133 | /* |
151 | * information category for Link Control | ||
152 | */ | ||
153 | enum { | ||
154 | FC_CAT_ACK_1 = 0x00, | ||
155 | FC_CAT_ACK_0_N = 0x01, | ||
156 | FC_CAT_P_RJT = 0x02, | ||
157 | FC_CAT_F_RJT = 0x03, | ||
158 | FC_CAT_P_BSY = 0x04, | ||
159 | FC_CAT_F_BSY_DATA = 0x05, | ||
160 | FC_CAT_F_BSY_LINK_CTL = 0x06, | ||
161 | FC_CAT_F_LCR = 0x07, | ||
162 | FC_CAT_NTY = 0x08, | ||
163 | FC_CAT_END = 0x09, | ||
164 | }; | ||
165 | |||
166 | /* | ||
167 | * Type Field Definitions. FC-PH Section 18.5 pg. 165 | 134 | * Type Field Definitions. FC-PH Section 18.5 pg. 165 |
168 | */ | 135 | */ |
169 | enum { | 136 | enum { |
@@ -181,10 +148,6 @@ enum { | |||
181 | FC_TYPE_MAX = 256, /* 256 FC-4 types */ | 148 | FC_TYPE_MAX = 256, /* 256 FC-4 types */ |
182 | }; | 149 | }; |
183 | 150 | ||
184 | struct fc_fc4types_s { | ||
185 | u8 bits[FC_TYPE_MAX / 8]; | ||
186 | }; | ||
187 | |||
188 | /* | 151 | /* |
189 | * Frame Control Definitions. FC-PH Table-45. pg. 168 | 152 | * Frame Control Definitions. FC-PH Table-45. pg. 168 |
190 | */ | 153 | */ |
@@ -287,7 +250,6 @@ enum { | |||
287 | FC_ELS_AUTH = 0x90, /* Authentication. Ref FC-SP */ | 250 | FC_ELS_AUTH = 0x90, /* Authentication. Ref FC-SP */ |
288 | FC_ELS_RFCN = 0x97, /* Request Fabric Change Notification. Ref | 251 | FC_ELS_RFCN = 0x97, /* Request Fabric Change Notification. Ref |
289 | *FC-SP */ | 252 | *FC-SP */ |
290 | |||
291 | }; | 253 | }; |
292 | 254 | ||
293 | /* | 255 | /* |
@@ -313,12 +275,12 @@ enum { | |||
313 | * FC-PH-x. Figure-76. pg. 308. | 275 | * FC-PH-x. Figure-76. pg. 308. |
314 | */ | 276 | */ |
315 | struct fc_plogi_csp_s { | 277 | struct fc_plogi_csp_s { |
316 | u8 verhi; /* FC-PH high version */ | 278 | u8 verhi; /* FC-PH high version */ |
317 | u8 verlo; /* FC-PH low version */ | 279 | u8 verlo; /* FC-PH low version */ |
318 | __be16 bbcred; /* BB_Credit */ | 280 | __be16 bbcred; /* BB_Credit */ |
319 | 281 | ||
320 | #ifdef __BIG_ENDIAN | 282 | #ifdef __BIG_ENDIAN |
321 | u8 ciro:1, /* continuously increasing RO */ | 283 | u8 ciro:1, /* continuously increasing RO */ |
322 | rro:1, /* random relative offset */ | 284 | rro:1, /* random relative offset */ |
323 | npiv_supp:1, /* NPIV supported */ | 285 | npiv_supp:1, /* NPIV supported */ |
324 | port_type:1, /* N_Port/F_port */ | 286 | port_type:1, /* N_Port/F_port */ |
@@ -327,7 +289,7 @@ struct fc_plogi_csp_s { | |||
327 | vvl_info:1, /* VVL Info included */ | 289 | vvl_info:1, /* VVL Info included */ |
328 | reserved1:1; | 290 | reserved1:1; |
329 | 291 | ||
330 | u8 hg_supp:1, | 292 | u8 hg_supp:1, |
331 | query_dbc:1, | 293 | query_dbc:1, |
332 | security:1, | 294 | security:1, |
333 | sync_cap:1, | 295 | sync_cap:1, |
@@ -336,7 +298,7 @@ struct fc_plogi_csp_s { | |||
336 | cisc:1, /* continuously increasing seq count */ | 298 | cisc:1, /* continuously increasing seq count */ |
337 | payload:1; | 299 | payload:1; |
338 | #else | 300 | #else |
339 | u8 reserved2:2, | 301 | u8 reserved2:2, |
340 | resolution:1, /* ms/ns ED_TOV resolution */ | 302 | resolution:1, /* ms/ns ED_TOV resolution */ |
341 | altbbcred:1, /* alternate BB_Credit */ | 303 | altbbcred:1, /* alternate BB_Credit */ |
342 | port_type:1, /* N_Port/F_port */ | 304 | port_type:1, /* N_Port/F_port */ |
@@ -344,7 +306,7 @@ struct fc_plogi_csp_s { | |||
344 | rro:1, /* random relative offset */ | 306 | rro:1, /* random relative offset */ |
345 | ciro:1; /* continuously increasing RO */ | 307 | ciro:1; /* continuously increasing RO */ |
346 | 308 | ||
347 | u8 payload:1, | 309 | u8 payload:1, |
348 | cisc:1, /* continuously increasing seq count */ | 310 | cisc:1, /* continuously increasing seq count */ |
349 | dh_dup_supp:1, | 311 | dh_dup_supp:1, |
350 | r_t_tov:1, | 312 | r_t_tov:1, |
@@ -353,13 +315,10 @@ struct fc_plogi_csp_s { | |||
353 | query_dbc:1, | 315 | query_dbc:1, |
354 | hg_supp:1; | 316 | hg_supp:1; |
355 | #endif | 317 | #endif |
356 | 318 | __be16 rxsz; /* recieve data_field size */ | |
357 | __be16 rxsz; /* recieve data_field size */ | 319 | __be16 conseq; |
358 | 320 | __be16 ro_bitmap; | |
359 | __be16 conseq; | 321 | __be32 e_d_tov; |
360 | __be16 ro_bitmap; | ||
361 | |||
362 | __be32 e_d_tov; | ||
363 | }; | 322 | }; |
364 | 323 | ||
365 | /* | 324 | /* |
@@ -370,9 +329,8 @@ struct fc_plogi_clp_s { | |||
370 | #ifdef __BIG_ENDIAN | 329 | #ifdef __BIG_ENDIAN |
371 | u32 class_valid:1; | 330 | u32 class_valid:1; |
372 | u32 intermix:1; /* class intermix supported if set =1. | 331 | u32 intermix:1; /* class intermix supported if set =1. |
373 | * valid only for class1. Reserved for | 332 | * valid only for class1. Reserved for |
374 | * class2 & class3 | 333 | * class2 & class3 */ |
375 | */ | ||
376 | u32 reserved1:2; | 334 | u32 reserved1:2; |
377 | u32 sequential:1; | 335 | u32 sequential:1; |
378 | u32 reserved2:3; | 336 | u32 reserved2:3; |
@@ -381,12 +339,10 @@ struct fc_plogi_clp_s { | |||
381 | u32 sequential:1; | 339 | u32 sequential:1; |
382 | u32 reserved1:2; | 340 | u32 reserved1:2; |
383 | u32 intermix:1; /* class intermix supported if set =1. | 341 | u32 intermix:1; /* class intermix supported if set =1. |
384 | * valid only for class1. Reserved for | 342 | * valid only for class1. Reserved for |
385 | * class2 & class3 | 343 | * class2 & class3 */ |
386 | */ | ||
387 | u32 class_valid:1; | 344 | u32 class_valid:1; |
388 | #endif | 345 | #endif |
389 | |||
390 | u32 reserved3:24; | 346 | u32 reserved3:24; |
391 | 347 | ||
392 | u32 reserved4:16; | 348 | u32 reserved4:16; |
@@ -394,7 +350,7 @@ struct fc_plogi_clp_s { | |||
394 | 350 | ||
395 | u32 reserved5:8; | 351 | u32 reserved5:8; |
396 | u32 conseq:8; | 352 | u32 conseq:8; |
397 | u32 e2e_credit:16; /* end to end credit */ | 353 | u32 e2e_credit:16; /* end to end credit */ |
398 | 354 | ||
399 | u32 reserved7:8; | 355 | u32 reserved7:8; |
400 | u32 ospx:8; | 356 | u32 ospx:8; |
@@ -408,24 +364,24 @@ struct fc_plogi_clp_s { | |||
408 | * PLOGI els command and reply payload | 364 | * PLOGI els command and reply payload |
409 | */ | 365 | */ |
410 | struct fc_logi_s { | 366 | struct fc_logi_s { |
411 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | 367 | struct fc_els_cmd_s els_cmd; /* ELS command code */ |
412 | struct fc_plogi_csp_s csp; /* common service params */ | 368 | struct fc_plogi_csp_s csp; /* common service params */ |
413 | wwn_t port_name; | 369 | wwn_t port_name; |
414 | wwn_t node_name; | 370 | wwn_t node_name; |
415 | struct fc_plogi_clp_s class1; /* class 1 service parameters */ | 371 | struct fc_plogi_clp_s class1; /* class 1 service parameters */ |
416 | struct fc_plogi_clp_s class2; /* class 2 service parameters */ | 372 | struct fc_plogi_clp_s class2; /* class 2 service parameters */ |
417 | struct fc_plogi_clp_s class3; /* class 3 service parameters */ | 373 | struct fc_plogi_clp_s class3; /* class 3 service parameters */ |
418 | struct fc_plogi_clp_s class4; /* class 4 service parameters */ | 374 | struct fc_plogi_clp_s class4; /* class 4 service parameters */ |
419 | u8 vvl[16]; /* vendor version level */ | 375 | u8 vvl[16]; /* vendor version level */ |
420 | }; | 376 | }; |
421 | 377 | ||
422 | /* | 378 | /* |
423 | * LOGO els command payload | 379 | * LOGO els command payload |
424 | */ | 380 | */ |
425 | struct fc_logo_s { | 381 | struct fc_logo_s { |
426 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | 382 | struct fc_els_cmd_s els_cmd; /* ELS command code */ |
427 | u32 res1:8; | 383 | u32 res1:8; |
428 | u32 nport_id:24; /* N_Port identifier of source */ | 384 | u32 nport_id:24; /* N_Port identifier of source */ |
429 | wwn_t orig_port_name; /* Port name of the LOGO originator */ | 385 | wwn_t orig_port_name; /* Port name of the LOGO originator */ |
430 | }; | 386 | }; |
431 | 387 | ||
@@ -434,12 +390,12 @@ struct fc_logo_s { | |||
434 | */ | 390 | */ |
435 | struct fc_adisc_s { | 391 | struct fc_adisc_s { |
436 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | 392 | struct fc_els_cmd_s els_cmd; /* ELS command code */ |
437 | u32 res1:8; | 393 | u32 res1:8; |
438 | u32 orig_HA:24; /* originator hard address */ | 394 | u32 orig_HA:24; /* originator hard address */ |
439 | wwn_t orig_port_name; /* originator port name */ | 395 | wwn_t orig_port_name; /* originator port name */ |
440 | wwn_t orig_node_name; /* originator node name */ | 396 | wwn_t orig_node_name; /* originator node name */ |
441 | u32 res2:8; | 397 | u32 res2:8; |
442 | u32 nport_id:24; /* originator NPortID */ | 398 | u32 nport_id:24; /* originator NPortID */ |
443 | }; | 399 | }; |
444 | 400 | ||
445 | /* | 401 | /* |
@@ -465,7 +421,7 @@ struct fc_exch_status_blk_s { | |||
465 | struct fc_res_s { | 421 | struct fc_res_s { |
466 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | 422 | struct fc_els_cmd_s els_cmd; /* ELS command code */ |
467 | u32 res1:8; | 423 | u32 res1:8; |
468 | u32 nport_id:24; /* N_Port identifier of source */ | 424 | u32 nport_id:24; /* N_Port identifier of source */ |
469 | u32 oxid:16; | 425 | u32 oxid:16; |
470 | u32 rxid:16; | 426 | u32 rxid:16; |
471 | u8 assoc_hdr[32]; | 427 | u8 assoc_hdr[32]; |
@@ -511,8 +467,8 @@ struct fc_rec_acc_s { | |||
511 | u32 orig_id:24; /* N_Port id of exchange originator */ | 467 | u32 orig_id:24; /* N_Port id of exchange originator */ |
512 | u32 res2:8; | 468 | u32 res2:8; |
513 | u32 resp_id:24; /* N_Port id of exchange responder */ | 469 | u32 resp_id:24; /* N_Port id of exchange responder */ |
514 | u32 count; /* data transfer count */ | 470 | u32 count; /* data transfer count */ |
515 | u32 e_stat; /* exchange status */ | 471 | u32 e_stat; /* exchange status */ |
516 | }; | 472 | }; |
517 | 473 | ||
518 | /* | 474 | /* |
@@ -611,17 +567,13 @@ struct fc_prlo_params_page_s { | |||
611 | u32 type:8; | 567 | u32 type:8; |
612 | u32 type_ext:8; | 568 | u32 type_ext:8; |
613 | #ifdef __BIG_ENDIAN | 569 | #ifdef __BIG_ENDIAN |
614 | u32 opa_valid:1; /* originator process associator | 570 | u32 opa_valid:1; /* originator process associator valid */ |
615 | * valid | ||
616 | */ | ||
617 | u32 rpa_valid:1; /* responder process associator valid */ | 571 | u32 rpa_valid:1; /* responder process associator valid */ |
618 | u32 res1:14; | 572 | u32 res1:14; |
619 | #else | 573 | #else |
620 | u32 res1:14; | 574 | u32 res1:14; |
621 | u32 rpa_valid:1; /* responder process associator valid */ | 575 | u32 rpa_valid:1; /* responder process associator valid */ |
622 | u32 opa_valid:1; /* originator process associator | 576 | u32 opa_valid:1; /* originator process associator valid */ |
623 | * valid | ||
624 | */ | ||
625 | #endif | 577 | #endif |
626 | u32 orig_process_assc; | 578 | u32 orig_process_assc; |
627 | u32 resp_process_assc; | 579 | u32 resp_process_assc; |
@@ -647,17 +599,13 @@ struct fc_prlo_acc_params_page_s { | |||
647 | u32 type_ext:8; | 599 | u32 type_ext:8; |
648 | 600 | ||
649 | #ifdef __BIG_ENDIAN | 601 | #ifdef __BIG_ENDIAN |
650 | u32 opa_valid:1; /* originator process associator | 602 | u32 opa_valid:1; /* originator process associator valid */ |
651 | * valid | ||
652 | */ | ||
653 | u32 rpa_valid:1; /* responder process associator valid */ | 603 | u32 rpa_valid:1; /* responder process associator valid */ |
654 | u32 res1:14; | 604 | u32 res1:14; |
655 | #else | 605 | #else |
656 | u32 res1:14; | 606 | u32 res1:14; |
657 | u32 rpa_valid:1; /* responder process associator valid */ | 607 | u32 rpa_valid:1; /* responder process associator valid */ |
658 | u32 opa_valid:1; /* originator process associator | 608 | u32 opa_valid:1; /* originator process associator valid */ |
659 | * valid | ||
660 | */ | ||
661 | #endif | 609 | #endif |
662 | u32 orig_process_assc; | 610 | u32 orig_process_assc; |
663 | u32 resp_process_assc; | 611 | u32 resp_process_assc; |
@@ -714,9 +662,9 @@ enum { | |||
714 | * LS_RJT els reply payload | 662 | * LS_RJT els reply payload |
715 | */ | 663 | */ |
716 | struct fc_ls_rjt_s { | 664 | struct fc_ls_rjt_s { |
717 | struct fc_els_cmd_s els_cmd; /* ELS command code */ | 665 | struct fc_els_cmd_s els_cmd; /* ELS command code */ |
718 | u32 res1:8; | 666 | u32 res1:8; |
719 | u32 reason_code:8; /* Reason code for reject */ | 667 | u32 reason_code:8; /* Reason code for reject */ |
720 | u32 reason_code_expl:8; /* Reason code explanation */ | 668 | u32 reason_code_expl:8; /* Reason code explanation */ |
721 | u32 vendor_unique:8; /* Vendor specific */ | 669 | u32 vendor_unique:8; /* Vendor specific */ |
722 | }; | 670 | }; |
@@ -778,12 +726,12 @@ struct fc_rrq_s { | |||
778 | */ | 726 | */ |
779 | struct fc_ba_acc_s { | 727 | struct fc_ba_acc_s { |
780 | u32 seq_id_valid:8; /* set to 0x00 for Abort Exchange */ | 728 | u32 seq_id_valid:8; /* set to 0x00 for Abort Exchange */ |
781 | u32 seq_id:8; /* invalid for Abort Exchange */ | 729 | u32 seq_id:8; /* invalid for Abort Exchange */ |
782 | u32 res2:16; | 730 | u32 res2:16; |
783 | u32 ox_id:16; /* OX_ID from ABTS frame */ | 731 | u32 ox_id:16; /* OX_ID from ABTS frame */ |
784 | u32 rx_id:16; /* RX_ID from ABTS frame */ | 732 | u32 rx_id:16; /* RX_ID from ABTS frame */ |
785 | u32 low_seq_cnt:16; /* set to 0x0000 for Abort Exchange */ | 733 | u32 low_seq_cnt:16; /* set to 0x0000 for Abort Exchange */ |
786 | u32 high_seq_cnt:16;/* set to 0xFFFF for Abort Exchange */ | 734 | u32 high_seq_cnt:16; /* set to 0xFFFF for Abort Exchange */ |
787 | }; | 735 | }; |
788 | 736 | ||
789 | /* | 737 | /* |
@@ -793,15 +741,15 @@ struct fc_ba_rjt_s { | |||
793 | u32 res1:8; /* Reserved */ | 741 | u32 res1:8; /* Reserved */ |
794 | u32 reason_code:8; /* reason code for reject */ | 742 | u32 reason_code:8; /* reason code for reject */ |
795 | u32 reason_expl:8; /* reason code explanation */ | 743 | u32 reason_expl:8; /* reason code explanation */ |
796 | u32 vendor_unique:8;/* vendor unique reason code,set to 0 */ | 744 | u32 vendor_unique:8; /* vendor unique reason code,set to 0 */ |
797 | }; | 745 | }; |
798 | 746 | ||
799 | /* | 747 | /* |
800 | * TPRLO logout parameter page | 748 | * TPRLO logout parameter page |
801 | */ | 749 | */ |
802 | struct fc_tprlo_params_page_s { | 750 | struct fc_tprlo_params_page_s { |
803 | u32 type:8; | 751 | u32 type:8; |
804 | u32 type_ext:8; | 752 | u32 type_ext:8; |
805 | 753 | ||
806 | #ifdef __BIG_ENDIAN | 754 | #ifdef __BIG_ENDIAN |
807 | u32 opa_valid:1; | 755 | u32 opa_valid:1; |
@@ -863,16 +811,16 @@ enum fc_rscn_format { | |||
863 | }; | 811 | }; |
864 | 812 | ||
865 | struct fc_rscn_event_s { | 813 | struct fc_rscn_event_s { |
866 | u32 format:2; | 814 | u32 format:2; |
867 | u32 qualifier:4; | 815 | u32 qualifier:4; |
868 | u32 resvd:2; | 816 | u32 resvd:2; |
869 | u32 portid:24; | 817 | u32 portid:24; |
870 | }; | 818 | }; |
871 | 819 | ||
872 | struct fc_rscn_pl_s { | 820 | struct fc_rscn_pl_s { |
873 | u8 command; | 821 | u8 command; |
874 | u8 pagelen; | 822 | u8 pagelen; |
875 | __be16 payldlen; | 823 | __be16 payldlen; |
876 | struct fc_rscn_event_s event[1]; | 824 | struct fc_rscn_event_s event[1]; |
877 | }; | 825 | }; |
878 | 826 | ||
@@ -886,7 +834,6 @@ struct fc_echo_s { | |||
886 | /* | 834 | /* |
887 | * RNID els command | 835 | * RNID els command |
888 | */ | 836 | */ |
889 | |||
890 | #define RNID_NODEID_DATA_FORMAT_COMMON 0x00 | 837 | #define RNID_NODEID_DATA_FORMAT_COMMON 0x00 |
891 | #define RNID_NODEID_DATA_FORMAT_FCP3 0x08 | 838 | #define RNID_NODEID_DATA_FORMAT_FCP3 0x08 |
892 | #define RNID_NODEID_DATA_FORMAT_DISCOVERY 0xDF | 839 | #define RNID_NODEID_DATA_FORMAT_DISCOVERY 0xDF |
@@ -919,15 +866,15 @@ struct fc_rnid_cmd_s { | |||
919 | */ | 866 | */ |
920 | 867 | ||
921 | struct fc_rnid_common_id_data_s { | 868 | struct fc_rnid_common_id_data_s { |
922 | wwn_t port_name; | 869 | wwn_t port_name; |
923 | wwn_t node_name; | 870 | wwn_t node_name; |
924 | }; | 871 | }; |
925 | 872 | ||
926 | struct fc_rnid_general_topology_data_s { | 873 | struct fc_rnid_general_topology_data_s { |
927 | u32 vendor_unique[4]; | 874 | u32 vendor_unique[4]; |
928 | __be32 asso_type; | 875 | __be32 asso_type; |
929 | u32 phy_port_num; | 876 | u32 phy_port_num; |
930 | __be32 num_attached_nodes; | 877 | __be32 num_attached_nodes; |
931 | u32 node_mgmt:8; | 878 | u32 node_mgmt:8; |
932 | u32 ip_version:8; | 879 | u32 ip_version:8; |
933 | u32 udp_tcp_port_num:16; | 880 | u32 udp_tcp_port_num:16; |
@@ -979,59 +926,17 @@ enum fc_rpsc_op_speed { | |||
979 | RPSC_OP_SPEED_8G = 0x0800, | 926 | RPSC_OP_SPEED_8G = 0x0800, |
980 | RPSC_OP_SPEED_16G = 0x0400, | 927 | RPSC_OP_SPEED_16G = 0x0400, |
981 | 928 | ||
982 | RPSC_OP_SPEED_NOT_EST = 0x0001, /*! speed not established */ | 929 | RPSC_OP_SPEED_NOT_EST = 0x0001, /* speed not established */ |
983 | }; | 930 | }; |
984 | 931 | ||
985 | struct fc_rpsc_speed_info_s { | 932 | struct fc_rpsc_speed_info_s { |
986 | __be16 port_speed_cap; /*! see enum fc_rpsc_speed_cap */ | 933 | __be16 port_speed_cap; /* see enum fc_rpsc_speed_cap */ |
987 | __be16 port_op_speed; /*! see enum fc_rpsc_op_speed */ | 934 | __be16 port_op_speed; /* see enum fc_rpsc_op_speed */ |
988 | }; | ||
989 | |||
990 | enum link_e2e_beacon_subcmd { | ||
991 | LINK_E2E_BEACON_ON = 1, | ||
992 | LINK_E2E_BEACON_OFF = 2 | ||
993 | }; | ||
994 | |||
995 | enum beacon_type { | ||
996 | BEACON_TYPE_NORMAL = 1, /*! Normal Beaconing. Green */ | ||
997 | BEACON_TYPE_WARN = 2, /*! Warning Beaconing. Yellow/Amber */ | ||
998 | BEACON_TYPE_CRITICAL = 3 /*! Critical Beaconing. Red */ | ||
999 | }; | ||
1000 | |||
1001 | struct link_e2e_beacon_param_s { | ||
1002 | u8 beacon_type; /* Beacon Type. See enum beacon_type */ | ||
1003 | u8 beacon_frequency; | ||
1004 | /* Beacon frequency. Number of blinks | ||
1005 | * per 10 seconds | ||
1006 | */ | ||
1007 | u16 beacon_duration;/* Beacon duration (in Seconds). The | ||
1008 | * command operation should be | ||
1009 | * terminated at the end of this | ||
1010 | * timeout value. | ||
1011 | * | ||
1012 | * Ignored if diag_sub_cmd is | ||
1013 | * LINK_E2E_BEACON_OFF. | ||
1014 | * | ||
1015 | * If 0, beaconing will continue till a | ||
1016 | * BEACON OFF request is received | ||
1017 | */ | ||
1018 | }; | ||
1019 | |||
1020 | /* | ||
1021 | * Link E2E beacon request/good response format. | ||
1022 | * For LS_RJTs use struct fc_ls_rjt_s | ||
1023 | */ | ||
1024 | struct link_e2e_beacon_req_s { | ||
1025 | u32 ls_code; /*! FC_ELS_E2E_LBEACON in requests * | ||
1026 | *or FC_ELS_ACC in good replies */ | ||
1027 | u32 ls_sub_cmd; /*! See enum link_e2e_beacon_subcmd */ | ||
1028 | struct link_e2e_beacon_param_s beacon_parm; | ||
1029 | }; | 935 | }; |
1030 | 936 | ||
1031 | /* | 937 | /* |
1032 | * If RPSC request is sent to the Domain Controller, the request is for | 938 | * If RPSC request is sent to the Domain Controller, the request is for |
1033 | * all the ports within that domain (TODO - I don't think FOS implements | 939 | * all the ports within that domain. |
1034 | * this...). | ||
1035 | */ | 940 | */ |
1036 | struct fc_rpsc_cmd_s { | 941 | struct fc_rpsc_cmd_s { |
1037 | struct fc_els_cmd_s els_cmd; | 942 | struct fc_els_cmd_s els_cmd; |
@@ -1057,7 +962,7 @@ struct fc_rpsc2_cmd_s { | |||
1057 | struct fc_els_cmd_s els_cmd; | 962 | struct fc_els_cmd_s els_cmd; |
1058 | __be32 token; | 963 | __be32 token; |
1059 | u16 resvd; | 964 | u16 resvd; |
1060 | __be16 num_pids; /* Number of pids in the request */ | 965 | __be16 num_pids; /* Number of pids in the request */ |
1061 | struct { | 966 | struct { |
1062 | u32 rsvd1:8; | 967 | u32 rsvd1:8; |
1063 | u32 pid:24; /* port identifier */ | 968 | u32 pid:24; /* port identifier */ |
@@ -1071,16 +976,17 @@ enum fc_rpsc2_port_type { | |||
1071 | RPSC2_PORT_TYPE_NPIV_PORT = 0x5f, | 976 | RPSC2_PORT_TYPE_NPIV_PORT = 0x5f, |
1072 | RPSC2_PORT_TYPE_NPORT_TRUNK = 0x6f, | 977 | RPSC2_PORT_TYPE_NPORT_TRUNK = 0x6f, |
1073 | }; | 978 | }; |
979 | |||
1074 | /* | 980 | /* |
1075 | * RPSC2 portInfo entry structure | 981 | * RPSC2 portInfo entry structure |
1076 | */ | 982 | */ |
1077 | struct fc_rpsc2_port_info_s { | 983 | struct fc_rpsc2_port_info_s { |
1078 | __be32 pid; /* PID */ | 984 | __be32 pid; /* PID */ |
1079 | u16 resvd1; | 985 | u16 resvd1; |
1080 | __be16 index; /* port number / index */ | 986 | __be16 index; /* port number / index */ |
1081 | u8 resvd2; | 987 | u8 resvd2; |
1082 | u8 type; /* port type N/NL/... */ | 988 | u8 type; /* port type N/NL/... */ |
1083 | __be16 speed; /* port Operating Speed */ | 989 | __be16 speed; /* port Operating Speed */ |
1084 | }; | 990 | }; |
1085 | 991 | ||
1086 | /* | 992 | /* |
@@ -1089,8 +995,8 @@ struct fc_rpsc2_port_info_s { | |||
1089 | struct fc_rpsc2_acc_s { | 995 | struct fc_rpsc2_acc_s { |
1090 | u8 els_cmd; | 996 | u8 els_cmd; |
1091 | u8 resvd; | 997 | u8 resvd; |
1092 | __be16 num_pids; /* Number of pids in the request */ | 998 | __be16 num_pids; /* Number of pids in the request */ |
1093 | struct fc_rpsc2_port_info_s port_info[1]; /* port information */ | 999 | struct fc_rpsc2_port_info_s port_info[1]; /* port information */ |
1094 | }; | 1000 | }; |
1095 | 1001 | ||
1096 | /* | 1002 | /* |
@@ -1109,18 +1015,14 @@ struct fc_symname_s { | |||
1109 | u8 symname[FC_SYMNAME_MAX]; | 1015 | u8 symname[FC_SYMNAME_MAX]; |
1110 | }; | 1016 | }; |
1111 | 1017 | ||
1112 | struct fc_alpabm_s { | ||
1113 | u8 alpa_bm[FC_ALPA_MAX / 8]; | ||
1114 | }; | ||
1115 | |||
1116 | /* | 1018 | /* |
1117 | * protocol default timeout values | 1019 | * protocol default timeout values |
1118 | */ | 1020 | */ |
1119 | #define FC_ED_TOV 2 | 1021 | #define FC_ED_TOV 2 |
1120 | #define FC_REC_TOV (FC_ED_TOV + 1) | 1022 | #define FC_REC_TOV (FC_ED_TOV + 1) |
1121 | #define FC_RA_TOV 10 | 1023 | #define FC_RA_TOV 10 |
1122 | #define FC_ELS_TOV (2 * FC_RA_TOV) | 1024 | #define FC_ELS_TOV (2 * FC_RA_TOV) |
1123 | #define FC_FCCT_TOV (3 * FC_RA_TOV) | 1025 | #define FC_FCCT_TOV (3 * FC_RA_TOV) |
1124 | 1026 | ||
1125 | /* | 1027 | /* |
1126 | * virtual fabric related defines | 1028 | * virtual fabric related defines |
@@ -1156,49 +1058,33 @@ enum { | |||
1156 | }; | 1058 | }; |
1157 | 1059 | ||
1158 | /* | 1060 | /* |
1159 | * SRR FC-4 LS payload | ||
1160 | */ | ||
1161 | struct fc_srr_s { | ||
1162 | u32 ls_cmd; | ||
1163 | u32 ox_id:16; /* ox-id */ | ||
1164 | u32 rx_id:16; /* rx-id */ | ||
1165 | u32 ro; /* relative offset */ | ||
1166 | u32 r_ctl:8; /* R_CTL for I.U. */ | ||
1167 | u32 res:24; | ||
1168 | }; | ||
1169 | |||
1170 | |||
1171 | /* | ||
1172 | * FCP_CMND definitions | 1061 | * FCP_CMND definitions |
1173 | */ | 1062 | */ |
1174 | #define FCP_CMND_CDB_LEN 16 | 1063 | #define FCP_CMND_CDB_LEN 16 |
1175 | #define FCP_CMND_LUN_LEN 8 | 1064 | #define FCP_CMND_LUN_LEN 8 |
1176 | 1065 | ||
1177 | struct fcp_cmnd_s { | 1066 | struct fcp_cmnd_s { |
1178 | struct scsi_lun lun; /* 64-bit LU number */ | 1067 | struct scsi_lun lun; /* 64-bit LU number */ |
1179 | u8 crn; /* command reference number */ | 1068 | u8 crn; /* command reference number */ |
1180 | #ifdef __BIG_ENDIAN | 1069 | #ifdef __BIG_ENDIAN |
1181 | u8 resvd:1, | 1070 | u8 resvd:1, |
1182 | priority:4, /* FCP-3: SAM-3 priority */ | 1071 | priority:4, /* FCP-3: SAM-3 priority */ |
1183 | taskattr:3; /* scsi task attribute */ | 1072 | taskattr:3; /* scsi task attribute */ |
1184 | #else | 1073 | #else |
1185 | u8 taskattr:3, /* scsi task attribute */ | 1074 | u8 taskattr:3, /* scsi task attribute */ |
1186 | priority:4, /* FCP-3: SAM-3 priority */ | 1075 | priority:4, /* FCP-3: SAM-3 priority */ |
1187 | resvd:1; | 1076 | resvd:1; |
1188 | #endif | 1077 | #endif |
1189 | u8 tm_flags; /* task management flags */ | 1078 | u8 tm_flags; /* task management flags */ |
1190 | #ifdef __BIG_ENDIAN | 1079 | #ifdef __BIG_ENDIAN |
1191 | u8 addl_cdb_len:6, /* additional CDB length words */ | 1080 | u8 addl_cdb_len:6, /* additional CDB length words */ |
1192 | iodir:2; /* read/write FCP_DATA IUs */ | 1081 | iodir:2; /* read/write FCP_DATA IUs */ |
1193 | #else | 1082 | #else |
1194 | u8 iodir:2, /* read/write FCP_DATA IUs */ | 1083 | u8 iodir:2, /* read/write FCP_DATA IUs */ |
1195 | addl_cdb_len:6; /* additional CDB length */ | 1084 | addl_cdb_len:6; /* additional CDB length */ |
1196 | #endif | 1085 | #endif |
1197 | scsi_cdb_t cdb; | 1086 | struct scsi_cdb_s cdb; |
1198 | 1087 | ||
1199 | /* | ||
1200 | * !!! additional cdb bytes follows here!!! | ||
1201 | */ | ||
1202 | __be32 fcp_dl; /* bytes to be transferred */ | 1088 | __be32 fcp_dl; /* bytes to be transferred */ |
1203 | }; | 1089 | }; |
1204 | 1090 | ||
@@ -1209,21 +1095,10 @@ struct fcp_cmnd_s { | |||
1209 | * struct fcp_cmnd_s .iodir field values | 1095 | * struct fcp_cmnd_s .iodir field values |
1210 | */ | 1096 | */ |
1211 | enum fcp_iodir { | 1097 | enum fcp_iodir { |
1212 | FCP_IODIR_NONE = 0, | 1098 | FCP_IODIR_NONE = 0, |
1213 | FCP_IODIR_WRITE = 1, | 1099 | FCP_IODIR_WRITE = 1, |
1214 | FCP_IODIR_READ = 2, | 1100 | FCP_IODIR_READ = 2, |
1215 | FCP_IODIR_RW = 3, | 1101 | FCP_IODIR_RW = 3, |
1216 | }; | ||
1217 | |||
1218 | /* | ||
1219 | * Task attribute field | ||
1220 | */ | ||
1221 | enum { | ||
1222 | FCP_TASK_ATTR_SIMPLE = 0, | ||
1223 | FCP_TASK_ATTR_HOQ = 1, | ||
1224 | FCP_TASK_ATTR_ORDERED = 2, | ||
1225 | FCP_TASK_ATTR_ACA = 4, | ||
1226 | FCP_TASK_ATTR_UNTAGGED = 5, /* obsolete in FCP-3 */ | ||
1227 | }; | 1102 | }; |
1228 | 1103 | ||
1229 | /* | 1104 | /* |
@@ -1238,58 +1113,40 @@ enum fcp_tm_cmnd { | |||
1238 | }; | 1113 | }; |
1239 | 1114 | ||
1240 | /* | 1115 | /* |
1241 | * FCP_XFER_RDY IU defines | ||
1242 | */ | ||
1243 | struct fcp_xfer_rdy_s { | ||
1244 | u32 data_ro; | ||
1245 | u32 burst_len; | ||
1246 | u32 reserved; | ||
1247 | }; | ||
1248 | |||
1249 | /* | ||
1250 | * FCP_RSP residue flags | 1116 | * FCP_RSP residue flags |
1251 | */ | 1117 | */ |
1252 | enum fcp_residue { | 1118 | enum fcp_residue { |
1253 | FCP_NO_RESIDUE = 0, /* no residue */ | 1119 | FCP_NO_RESIDUE = 0, /* no residue */ |
1254 | FCP_RESID_OVER = 1, /* more data left that was not sent */ | 1120 | FCP_RESID_OVER = 1, /* more data left that was not sent */ |
1255 | FCP_RESID_UNDER = 2, /* less data than requested */ | 1121 | FCP_RESID_UNDER = 2, /* less data than requested */ |
1256 | }; | ||
1257 | |||
1258 | enum { | ||
1259 | FCP_RSPINFO_GOOD = 0, | ||
1260 | FCP_RSPINFO_DATALEN_MISMATCH = 1, | ||
1261 | FCP_RSPINFO_CMND_INVALID = 2, | ||
1262 | FCP_RSPINFO_ROLEN_MISMATCH = 3, | ||
1263 | FCP_RSPINFO_TM_NOT_SUPP = 4, | ||
1264 | FCP_RSPINFO_TM_FAILED = 5, | ||
1265 | }; | 1122 | }; |
1266 | 1123 | ||
1267 | struct fcp_rspinfo_s { | 1124 | struct fcp_rspinfo_s { |
1268 | u32 res0:24; | 1125 | u32 res0:24; |
1269 | u32 rsp_code:8; /* response code (as above) */ | 1126 | u32 rsp_code:8; /* response code (as above) */ |
1270 | u32 res1; | 1127 | u32 res1; |
1271 | }; | 1128 | }; |
1272 | 1129 | ||
1273 | struct fcp_resp_s { | 1130 | struct fcp_resp_s { |
1274 | u32 reserved[2]; /* 2 words reserved */ | 1131 | u32 reserved[2]; /* 2 words reserved */ |
1275 | u16 reserved2; | 1132 | u16 reserved2; |
1276 | #ifdef __BIG_ENDIAN | 1133 | #ifdef __BIG_ENDIAN |
1277 | u8 reserved3:3; | 1134 | u8 reserved3:3; |
1278 | u8 fcp_conf_req:1; /* FCP_CONF is requested */ | 1135 | u8 fcp_conf_req:1; /* FCP_CONF is requested */ |
1279 | u8 resid_flags:2; /* underflow/overflow */ | 1136 | u8 resid_flags:2; /* underflow/overflow */ |
1280 | u8 sns_len_valid:1;/* sense len is valid */ | 1137 | u8 sns_len_valid:1; /* sense len is valid */ |
1281 | u8 rsp_len_valid:1;/* response len is valid */ | 1138 | u8 rsp_len_valid:1; /* response len is valid */ |
1282 | #else | 1139 | #else |
1283 | u8 rsp_len_valid:1;/* response len is valid */ | 1140 | u8 rsp_len_valid:1; /* response len is valid */ |
1284 | u8 sns_len_valid:1;/* sense len is valid */ | 1141 | u8 sns_len_valid:1; /* sense len is valid */ |
1285 | u8 resid_flags:2; /* underflow/overflow */ | 1142 | u8 resid_flags:2; /* underflow/overflow */ |
1286 | u8 fcp_conf_req:1; /* FCP_CONF is requested */ | 1143 | u8 fcp_conf_req:1; /* FCP_CONF is requested */ |
1287 | u8 reserved3:3; | 1144 | u8 reserved3:3; |
1288 | #endif | 1145 | #endif |
1289 | u8 scsi_status; /* one byte SCSI status */ | 1146 | u8 scsi_status; /* one byte SCSI status */ |
1290 | u32 residue; /* residual data bytes */ | 1147 | u32 residue; /* residual data bytes */ |
1291 | u32 sns_len; /* length od sense info */ | 1148 | u32 sns_len; /* length od sense info */ |
1292 | u32 rsp_len; /* length of response info */ | 1149 | u32 rsp_len; /* length of response info */ |
1293 | }; | 1150 | }; |
1294 | 1151 | ||
1295 | #define fcp_snslen(__fcprsp) ((__fcprsp)->sns_len_valid ? \ | 1152 | #define fcp_snslen(__fcprsp) ((__fcprsp)->sns_len_valid ? \ |
@@ -1299,12 +1156,6 @@ struct fcp_resp_s { | |||
1299 | #define fcp_rspinfo(__fcprsp) ((struct fcp_rspinfo_s *)((__fcprsp) + 1)) | 1156 | #define fcp_rspinfo(__fcprsp) ((struct fcp_rspinfo_s *)((__fcprsp) + 1)) |
1300 | #define fcp_snsinfo(__fcprsp) (((u8 *)fcp_rspinfo(__fcprsp)) + \ | 1157 | #define fcp_snsinfo(__fcprsp) (((u8 *)fcp_rspinfo(__fcprsp)) + \ |
1301 | fcp_rsplen(__fcprsp)) | 1158 | fcp_rsplen(__fcprsp)) |
1302 | |||
1303 | struct fcp_cmnd_fr_s { | ||
1304 | struct fchs_s fchs; | ||
1305 | struct fcp_cmnd_s fcp; | ||
1306 | }; | ||
1307 | |||
1308 | /* | 1159 | /* |
1309 | * CT | 1160 | * CT |
1310 | */ | 1161 | */ |
@@ -1378,7 +1229,7 @@ enum { | |||
1378 | CT_RSN_LOGICAL_BUSY = 0x05, | 1229 | CT_RSN_LOGICAL_BUSY = 0x05, |
1379 | CT_RSN_PROTO_ERR = 0x07, | 1230 | CT_RSN_PROTO_ERR = 0x07, |
1380 | CT_RSN_UNABLE_TO_PERF = 0x09, | 1231 | CT_RSN_UNABLE_TO_PERF = 0x09, |
1381 | CT_RSN_NOT_SUPP = 0x0B, | 1232 | CT_RSN_NOT_SUPP = 0x0B, |
1382 | CT_RSN_SERVER_NOT_AVBL = 0x0D, | 1233 | CT_RSN_SERVER_NOT_AVBL = 0x0D, |
1383 | CT_RSN_SESSION_COULD_NOT_BE_ESTBD = 0x0E, | 1234 | CT_RSN_SESSION_COULD_NOT_BE_ESTBD = 0x0E, |
1384 | CT_RSN_VENDOR_SPECIFIC = 0xFF, | 1235 | CT_RSN_VENDOR_SPECIFIC = 0xFF, |
@@ -1418,10 +1269,10 @@ enum { | |||
1418 | * defintions for the explanation code for all servers | 1269 | * defintions for the explanation code for all servers |
1419 | */ | 1270 | */ |
1420 | enum { | 1271 | enum { |
1421 | CT_EXP_AUTH_EXCEPTION = 0xF1, | 1272 | CT_EXP_AUTH_EXCEPTION = 0xF1, |
1422 | CT_EXP_DB_FULL = 0xF2, | 1273 | CT_EXP_DB_FULL = 0xF2, |
1423 | CT_EXP_DB_EMPTY = 0xF3, | 1274 | CT_EXP_DB_EMPTY = 0xF3, |
1424 | CT_EXP_PROCESSING_REQ = 0xF4, | 1275 | CT_EXP_PROCESSING_REQ = 0xF4, |
1425 | CT_EXP_UNABLE_TO_VERIFY_CONN = 0xF5, | 1276 | CT_EXP_UNABLE_TO_VERIFY_CONN = 0xF5, |
1426 | CT_EXP_DEVICES_NOT_IN_CMN_ZONE = 0xF6 | 1277 | CT_EXP_DEVICES_NOT_IN_CMN_ZONE = 0xF6 |
1427 | }; | 1278 | }; |
@@ -1445,7 +1296,7 @@ enum { | |||
1445 | GS_RFF_ID = 0x021F, /* Register FC4 Feature */ | 1296 | GS_RFF_ID = 0x021F, /* Register FC4 Feature */ |
1446 | }; | 1297 | }; |
1447 | 1298 | ||
1448 | struct fcgs_id_req_s{ | 1299 | struct fcgs_id_req_s { |
1449 | u32 rsvd:8; | 1300 | u32 rsvd:8; |
1450 | u32 dap:24; /* port identifier */ | 1301 | u32 dap:24; /* port identifier */ |
1451 | }; | 1302 | }; |
@@ -1459,7 +1310,7 @@ struct fcgs_gidpn_req_s { | |||
1459 | 1310 | ||
1460 | struct fcgs_gidpn_resp_s { | 1311 | struct fcgs_gidpn_resp_s { |
1461 | u32 rsvd:8; | 1312 | u32 rsvd:8; |
1462 | u32 dap:24; /* port identifier */ | 1313 | u32 dap:24; /* port identifier */ |
1463 | }; | 1314 | }; |
1464 | 1315 | ||
1465 | /* | 1316 | /* |
@@ -1474,16 +1325,15 @@ struct fcgs_rftid_req_s { | |||
1474 | /* | 1325 | /* |
1475 | * RFF_ID : Register FC4 features. | 1326 | * RFF_ID : Register FC4 features. |
1476 | */ | 1327 | */ |
1477 | |||
1478 | #define FC_GS_FCP_FC4_FEATURE_INITIATOR 0x02 | 1328 | #define FC_GS_FCP_FC4_FEATURE_INITIATOR 0x02 |
1479 | #define FC_GS_FCP_FC4_FEATURE_TARGET 0x01 | 1329 | #define FC_GS_FCP_FC4_FEATURE_TARGET 0x01 |
1480 | 1330 | ||
1481 | struct fcgs_rffid_req_s { | 1331 | struct fcgs_rffid_req_s { |
1482 | u32 rsvd:8; | 1332 | u32 rsvd:8; |
1483 | u32 dap:24; /* port identifier */ | 1333 | u32 dap:24; /* port identifier */ |
1484 | u32 rsvd1:16; | 1334 | u32 rsvd1:16; |
1485 | u32 fc4ftr_bits:8; /* fc4 feature bits */ | 1335 | u32 fc4ftr_bits:8; /* fc4 feature bits */ |
1486 | u32 fc4_type:8; /* corresponding FC4 Type */ | 1336 | u32 fc4_type:8; /* corresponding FC4 Type */ |
1487 | }; | 1337 | }; |
1488 | 1338 | ||
1489 | /* | 1339 | /* |
@@ -1494,16 +1344,16 @@ struct fcgs_gidft_req_s { | |||
1494 | u8 domain_id; /* domain, 0 - all fabric */ | 1344 | u8 domain_id; /* domain, 0 - all fabric */ |
1495 | u8 area_id; /* area, 0 - whole domain */ | 1345 | u8 area_id; /* area, 0 - whole domain */ |
1496 | u8 fc4_type; /* FC_TYPE_FCP for SCSI devices */ | 1346 | u8 fc4_type; /* FC_TYPE_FCP for SCSI devices */ |
1497 | }; /* GID_FT Request */ | 1347 | }; |
1498 | 1348 | ||
1499 | /* | 1349 | /* |
1500 | * GID_FT Response | 1350 | * GID_FT Response |
1501 | */ | 1351 | */ |
1502 | struct fcgs_gidft_resp_s { | 1352 | struct fcgs_gidft_resp_s { |
1503 | u8 last:1; /* last port identifier flag */ | 1353 | u8 last:1; /* last port identifier flag */ |
1504 | u8 reserved:7; | 1354 | u8 reserved:7; |
1505 | u32 pid:24; /* port identifier */ | 1355 | u32 pid:24; /* port identifier */ |
1506 | }; /* GID_FT Response */ | 1356 | }; |
1507 | 1357 | ||
1508 | /* | 1358 | /* |
1509 | * RSPN_ID | 1359 | * RSPN_ID |
@@ -1511,8 +1361,8 @@ struct fcgs_gidft_resp_s { | |||
1511 | struct fcgs_rspnid_req_s { | 1361 | struct fcgs_rspnid_req_s { |
1512 | u32 rsvd:8; | 1362 | u32 rsvd:8; |
1513 | u32 dap:24; /* port identifier */ | 1363 | u32 dap:24; /* port identifier */ |
1514 | u8 spn_len; /* symbolic port name length */ | 1364 | u8 spn_len; /* symbolic port name length */ |
1515 | u8 spn[256]; /* symbolic port name */ | 1365 | u8 spn[256]; /* symbolic port name */ |
1516 | }; | 1366 | }; |
1517 | 1367 | ||
1518 | /* | 1368 | /* |
@@ -1521,7 +1371,7 @@ struct fcgs_rspnid_req_s { | |||
1521 | struct fcgs_rpnid_req_s { | 1371 | struct fcgs_rpnid_req_s { |
1522 | u32 rsvd:8; | 1372 | u32 rsvd:8; |
1523 | u32 port_id:24; | 1373 | u32 port_id:24; |
1524 | wwn_t port_name; | 1374 | wwn_t port_name; |
1525 | }; | 1375 | }; |
1526 | 1376 | ||
1527 | /* | 1377 | /* |
@@ -1530,7 +1380,7 @@ struct fcgs_rpnid_req_s { | |||
1530 | struct fcgs_rnnid_req_s { | 1380 | struct fcgs_rnnid_req_s { |
1531 | u32 rsvd:8; | 1381 | u32 rsvd:8; |
1532 | u32 port_id:24; | 1382 | u32 port_id:24; |
1533 | wwn_t node_name; | 1383 | wwn_t node_name; |
1534 | }; | 1384 | }; |
1535 | 1385 | ||
1536 | /* | 1386 | /* |
@@ -1564,8 +1414,8 @@ struct fcgs_ganxt_req_s { | |||
1564 | * GA_NXT Response | 1414 | * GA_NXT Response |
1565 | */ | 1415 | */ |
1566 | struct fcgs_ganxt_rsp_s { | 1416 | struct fcgs_ganxt_rsp_s { |
1567 | u32 port_type:8; /* Port Type */ | 1417 | u32 port_type:8; /* Port Type */ |
1568 | u32 port_id:24; /* Port Identifier */ | 1418 | u32 port_id:24; /* Port Identifier */ |
1569 | wwn_t port_name; /* Port Name */ | 1419 | wwn_t port_name; /* Port Name */ |
1570 | u8 spn_len; /* Length of Symbolic Port Name */ | 1420 | u8 spn_len; /* Length of Symbolic Port Name */ |
1571 | char spn[255]; /* Symbolic Port Name */ | 1421 | char spn[255]; /* Symbolic Port Name */ |
@@ -1574,19 +1424,14 @@ struct fcgs_ganxt_rsp_s { | |||
1574 | char snn[255]; /* Symbolic Node Name */ | 1424 | char snn[255]; /* Symbolic Node Name */ |
1575 | u8 ipa[8]; /* Initial Process Associator */ | 1425 | u8 ipa[8]; /* Initial Process Associator */ |
1576 | u8 ip[16]; /* IP Address */ | 1426 | u8 ip[16]; /* IP Address */ |
1577 | u32 cos; /* Class of Service */ | 1427 | u32 cos; /* Class of Service */ |
1578 | u32 fc4types[8]; /* FC-4 TYPEs */ | 1428 | u32 fc4types[8]; /* FC-4 TYPEs */ |
1579 | wwn_t fabric_port_name; | 1429 | wwn_t fabric_port_name; /* Fabric Port Name */ |
1580 | /* Fabric Port Name */ | 1430 | u32 rsvd:8; /* Reserved */ |
1581 | u32 rsvd:8; /* Reserved */ | 1431 | u32 hard_addr:24; /* Hard Address */ |
1582 | u32 hard_addr:24; /* Hard Address */ | ||
1583 | }; | 1432 | }; |
1584 | 1433 | ||
1585 | /* | 1434 | /* |
1586 | * Fabric Config Server | ||
1587 | */ | ||
1588 | |||
1589 | /* | ||
1590 | * Command codes for Fabric Configuration Server | 1435 | * Command codes for Fabric Configuration Server |
1591 | */ | 1436 | */ |
1592 | enum { | 1437 | enum { |
@@ -1597,159 +1442,9 @@ enum { | |||
1597 | }; | 1442 | }; |
1598 | 1443 | ||
1599 | /* | 1444 | /* |
1600 | * Source or Destination Port Tags. | ||
1601 | */ | ||
1602 | enum { | ||
1603 | GS_FTRACE_TAG_NPORT_ID = 1, | ||
1604 | GS_FTRACE_TAG_NPORT_NAME = 2, | ||
1605 | }; | ||
1606 | |||
1607 | /* | ||
1608 | * Port Value : Could be a Port id or wwn | ||
1609 | */ | ||
1610 | union fcgs_port_val_u { | ||
1611 | u32 nport_id; | ||
1612 | wwn_t nport_wwn; | ||
1613 | }; | ||
1614 | |||
1615 | #define GS_FTRACE_MAX_HOP_COUNT 20 | ||
1616 | #define GS_FTRACE_REVISION 1 | ||
1617 | |||
1618 | /* | ||
1619 | * Ftrace Related Structures. | ||
1620 | */ | ||
1621 | |||
1622 | /* | ||
1623 | * STR (Switch Trace) Reject Reason Codes. From FC-SW. | ||
1624 | */ | ||
1625 | enum { | ||
1626 | GS_FTRACE_STR_CMD_COMPLETED_SUCC = 0, | ||
1627 | GS_FTRACE_STR_CMD_NOT_SUPP_IN_NEXT_SWITCH, | ||
1628 | GS_FTRACE_STR_NO_RESP_FROM_NEXT_SWITCH, | ||
1629 | GS_FTRACE_STR_MAX_HOP_CNT_REACHED, | ||
1630 | GS_FTRACE_STR_SRC_PORT_NOT_FOUND, | ||
1631 | GS_FTRACE_STR_DST_PORT_NOT_FOUND, | ||
1632 | GS_FTRACE_STR_DEVICES_NOT_IN_COMMON_ZONE, | ||
1633 | GS_FTRACE_STR_NO_ROUTE_BW_PORTS, | ||
1634 | GS_FTRACE_STR_NO_ADDL_EXPLN, | ||
1635 | GS_FTRACE_STR_FABRIC_BUSY, | ||
1636 | GS_FTRACE_STR_FABRIC_BUILD_IN_PROGRESS, | ||
1637 | GS_FTRACE_STR_VENDOR_SPECIFIC_ERR_START = 0xf0, | ||
1638 | GS_FTRACE_STR_VENDOR_SPECIFIC_ERR_END = 0xff, | ||
1639 | }; | ||
1640 | |||
1641 | /* | ||
1642 | * Ftrace Request | ||
1643 | */ | ||
1644 | struct fcgs_ftrace_req_s { | ||
1645 | u32 revision; | ||
1646 | u16 src_port_tag; /* Source Port tag */ | ||
1647 | u16 src_port_len; /* Source Port len */ | ||
1648 | union fcgs_port_val_u src_port_val; /* Source Port value */ | ||
1649 | u16 dst_port_tag; /* Destination Port tag */ | ||
1650 | u16 dst_port_len; /* Destination Port len */ | ||
1651 | union fcgs_port_val_u dst_port_val; /* Destination Port value */ | ||
1652 | u32 token; | ||
1653 | u8 vendor_id[8]; /* T10 Vendor Identifier */ | ||
1654 | u8 vendor_info[8]; /* Vendor specific Info */ | ||
1655 | u32 max_hop_cnt; /* Max Hop Count */ | ||
1656 | }; | ||
1657 | |||
1658 | /* | ||
1659 | * Path info structure | ||
1660 | */ | ||
1661 | struct fcgs_ftrace_path_info_s { | ||
1662 | wwn_t switch_name; /* Switch WWN */ | ||
1663 | u32 domain_id; | ||
1664 | wwn_t ingress_port_name; /* Ingress ports wwn */ | ||
1665 | u32 ingress_phys_port_num; /* Ingress ports physical port | ||
1666 | * number | ||
1667 | */ | ||
1668 | wwn_t egress_port_name; /* Ingress ports wwn */ | ||
1669 | u32 egress_phys_port_num; /* Ingress ports physical port | ||
1670 | * number | ||
1671 | */ | ||
1672 | }; | ||
1673 | |||
1674 | /* | ||
1675 | * Ftrace Acc Response | ||
1676 | */ | ||
1677 | struct fcgs_ftrace_resp_s { | ||
1678 | u32 revision; | ||
1679 | u32 token; | ||
1680 | u8 vendor_id[8]; /* T10 Vendor Identifier */ | ||
1681 | u8 vendor_info[8]; /* Vendor specific Info */ | ||
1682 | u32 str_rej_reason_code; /* STR Reject Reason Code */ | ||
1683 | u32 num_path_info_entries; /* No. of path info entries */ | ||
1684 | /* | ||
1685 | * path info entry/entries. | ||
1686 | */ | ||
1687 | struct fcgs_ftrace_path_info_s path_info[1]; | ||
1688 | |||
1689 | }; | ||
1690 | |||
1691 | /* | ||
1692 | * Fabric Config Server : FCPing | ||
1693 | */ | ||
1694 | |||
1695 | /* | ||
1696 | * FC Ping Request | ||
1697 | */ | ||
1698 | struct fcgs_fcping_req_s { | ||
1699 | u32 revision; | ||
1700 | u16 port_tag; | ||
1701 | u16 port_len; /* Port len */ | ||
1702 | union fcgs_port_val_u port_val; /* Port value */ | ||
1703 | u32 token; | ||
1704 | }; | ||
1705 | |||
1706 | /* | ||
1707 | * FC Ping Response | ||
1708 | */ | ||
1709 | struct fcgs_fcping_resp_s { | ||
1710 | u32 token; | ||
1711 | }; | ||
1712 | |||
1713 | /* | ||
1714 | * Command codes for zone server query. | ||
1715 | */ | ||
1716 | enum { | ||
1717 | ZS_GZME = 0x0124, /* Get zone member extended */ | ||
1718 | }; | ||
1719 | |||
1720 | /* | ||
1721 | * ZS GZME request | ||
1722 | */ | ||
1723 | #define ZS_GZME_ZNAMELEN 32 | ||
1724 | struct zs_gzme_req_s { | ||
1725 | u8 znamelen; | ||
1726 | u8 rsvd[3]; | ||
1727 | u8 zname[ZS_GZME_ZNAMELEN]; | ||
1728 | }; | ||
1729 | |||
1730 | enum zs_mbr_type { | ||
1731 | ZS_MBR_TYPE_PWWN = 1, | ||
1732 | ZS_MBR_TYPE_DOMPORT = 2, | ||
1733 | ZS_MBR_TYPE_PORTID = 3, | ||
1734 | ZS_MBR_TYPE_NWWN = 4, | ||
1735 | }; | ||
1736 | |||
1737 | struct zs_mbr_wwn_s { | ||
1738 | u8 mbr_type; | ||
1739 | u8 rsvd[3]; | ||
1740 | wwn_t wwn; | ||
1741 | }; | ||
1742 | |||
1743 | struct zs_query_resp_s { | ||
1744 | u32 nmbrs; /* number of zone members */ | ||
1745 | struct zs_mbr_wwn_s mbr[1]; | ||
1746 | }; | ||
1747 | |||
1748 | /* | ||
1749 | * GMAL Command ( Get ( interconnect Element) Management Address List) | 1445 | * GMAL Command ( Get ( interconnect Element) Management Address List) |
1750 | * To retrieve the IP Address of a Switch. | 1446 | * To retrieve the IP Address of a Switch. |
1751 | */ | 1447 | */ |
1752 | |||
1753 | #define CT_GMAL_RESP_PREFIX_TELNET "telnet://" | 1448 | #define CT_GMAL_RESP_PREFIX_TELNET "telnet://" |
1754 | #define CT_GMAL_RESP_PREFIX_HTTP "http://" | 1449 | #define CT_GMAL_RESP_PREFIX_HTTP "http://" |
1755 | 1450 | ||
@@ -1774,9 +1469,6 @@ struct fcgs_gmal_entry_s { | |||
1774 | }; | 1469 | }; |
1775 | 1470 | ||
1776 | /* | 1471 | /* |
1777 | * FDMI | ||
1778 | */ | ||
1779 | /* | ||
1780 | * FDMI Command Codes | 1472 | * FDMI Command Codes |
1781 | */ | 1473 | */ |
1782 | #define FDMI_GRHL 0x0100 | 1474 | #define FDMI_GRHL 0x0100 |
@@ -1872,8 +1564,8 @@ struct fdmi_hba_attr_s { | |||
1872 | * Registered Port List | 1564 | * Registered Port List |
1873 | */ | 1565 | */ |
1874 | struct fdmi_port_list_s { | 1566 | struct fdmi_port_list_s { |
1875 | __be32 num_ports; /* number Of Port Entries */ | 1567 | __be32 num_ports; /* number Of Port Entries */ |
1876 | wwn_t port_entry; /* one or more */ | 1568 | wwn_t port_entry; /* one or more */ |
1877 | }; | 1569 | }; |
1878 | 1570 | ||
1879 | /* | 1571 | /* |
@@ -1888,7 +1580,7 @@ struct fdmi_port_attr_s { | |||
1888 | * FDMI Register HBA Attributes | 1580 | * FDMI Register HBA Attributes |
1889 | */ | 1581 | */ |
1890 | struct fdmi_rhba_s { | 1582 | struct fdmi_rhba_s { |
1891 | wwn_t hba_id; /* HBA Identifier */ | 1583 | wwn_t hba_id; /* HBA Identifier */ |
1892 | struct fdmi_port_list_s port_list; /* Registered Port List */ | 1584 | struct fdmi_port_list_s port_list; /* Registered Port List */ |
1893 | struct fdmi_hba_attr_s hba_attr_blk; /* HBA attribute block */ | 1585 | struct fdmi_hba_attr_s hba_attr_blk; /* HBA attribute block */ |
1894 | }; | 1586 | }; |
@@ -1897,8 +1589,8 @@ struct fdmi_rhba_s { | |||
1897 | * FDMI Register Port | 1589 | * FDMI Register Port |
1898 | */ | 1590 | */ |
1899 | struct fdmi_rprt_s { | 1591 | struct fdmi_rprt_s { |
1900 | wwn_t hba_id; /* HBA Identifier */ | 1592 | wwn_t hba_id; /* HBA Identifier */ |
1901 | wwn_t port_name; /* Port wwn */ | 1593 | wwn_t port_name; /* Port wwn */ |
1902 | struct fdmi_port_attr_s port_attr_blk; /* Port Attr Block */ | 1594 | struct fdmi_port_attr_s port_attr_blk; /* Port Attr Block */ |
1903 | }; | 1595 | }; |
1904 | 1596 | ||
@@ -1906,7 +1598,7 @@ struct fdmi_rprt_s { | |||
1906 | * FDMI Register Port Attributes | 1598 | * FDMI Register Port Attributes |
1907 | */ | 1599 | */ |
1908 | struct fdmi_rpa_s { | 1600 | struct fdmi_rpa_s { |
1909 | wwn_t port_name; /* port wwn */ | 1601 | wwn_t port_name; /* port wwn */ |
1910 | struct fdmi_port_attr_s port_attr_blk; /* Port Attr Block */ | 1602 | struct fdmi_port_attr_s port_attr_blk; /* Port Attr Block */ |
1911 | }; | 1603 | }; |
1912 | 1604 | ||