Lines Matching +full:0 +full:x17000000
23 #define FDMI_DID 0xfffffaU
24 #define NameServer_DID 0xfffffcU
25 #define Fabric_Cntl_DID 0xfffffdU
26 #define Fabric_DID 0xfffffeU
27 #define Bcast_DID 0xffffffU
28 #define Mask_DID 0xffffffU
29 #define CT_DID_MASK 0xffff00U
30 #define Fabric_DID_MASK 0xfff000U
31 #define WELL_KNOWN_DID_MASK 0xfffff0U
42 0 */
46 #define LPFC_FCP_RING 0 /* ring 0 for FCP initiator commands */
58 #define SLI2_IOCB_CMD_R3_ENTRIES 0
59 #define SLI2_IOCB_RSP_R3_ENTRIES 0
68 #define LPFC_UNREG_ALL_RPIS_VPORT 0xffff
69 #define LPFC_UNREG_ALL_DFLT_RPIS 0xffffffff
96 #define FC4_FEATURE_TARGET 0x1
97 #define FC4_FEATURE_INIT 0x2
98 #define FC4_FEATURE_NVME_DISC 0x4
101 RFT_FCP_REG = (0x1 << 8),
105 RFT_NVME_REG = (0x1 << 8),
109 RFT_APP_SERV_REG = (0x1 << 0),
148 __be32 fcp_reg; /* rsvd 31:9, fcp_reg 8, rsvd 7:0 */
149 __be32 nvme_reg; /* rsvd 31:9, nvme_reg 8, rsvd 7:0 */
151 __be32 app_serv_reg; /* rsvd 31:1, app_serv_reg 0 */
228 #define SLI_CT_MANAGEMENT_SERVICE 0xFA
229 #define SLI_CT_TIME_SERVICE 0xFB
230 #define SLI_CT_DIRECTORY_SERVICE 0xFC
231 #define SLI_CT_FABRIC_CONTROLLER_SERVICE 0xFD
237 #define SLI_CT_DIRECTORY_NAME_SERVER 0x02
243 #define SLI_CT_RESPONSE_FS_RJT 0x8001
244 #define SLI_CT_RESPONSE_FS_ACC 0x8002
250 #define SLI_CT_NO_ADDITIONAL_EXPL 0x0
251 #define SLI_CT_INVALID_COMMAND 0x01
252 #define SLI_CT_INVALID_VERSION 0x02
253 #define SLI_CT_LOGICAL_ERROR 0x03
254 #define SLI_CT_INVALID_IU_SIZE 0x04
255 #define SLI_CT_LOGICAL_BUSY 0x05
256 #define SLI_CT_PROTOCOL_ERROR 0x07
257 #define SLI_CT_UNABLE_TO_PERFORM_REQ 0x09
258 #define SLI_CT_REQ_NOT_SUPPORTED 0x0b
259 #define SLI_CT_HBA_INFO_NOT_REGISTERED 0x10
260 #define SLI_CT_MULTIPLE_HBA_ATTR_OF_SAME_TYPE 0x11
261 #define SLI_CT_INVALID_HBA_ATTR_BLOCK_LEN 0x12
262 #define SLI_CT_HBA_ATTR_NOT_PRESENT 0x13
263 #define SLI_CT_PORT_INFO_NOT_REGISTERED 0x20
264 #define SLI_CT_MULTIPLE_PORT_ATTR_OF_SAME_TYPE 0x21
265 #define SLI_CT_INVALID_PORT_ATTR_BLOCK_LEN 0x22
266 #define SLI_CT_VENDOR_UNIQUE 0xff
272 #define SLI_CT_NO_PORT_ID 0x01
273 #define SLI_CT_NO_PORT_NAME 0x02
274 #define SLI_CT_NO_NODE_NAME 0x03
275 #define SLI_CT_NO_CLASS_OF_SERVICE 0x04
276 #define SLI_CT_NO_IP_ADDRESS 0x05
277 #define SLI_CT_NO_IPA 0x06
278 #define SLI_CT_NO_FC4_TYPES 0x07
279 #define SLI_CT_NO_SYMBOLIC_PORT_NAME 0x08
280 #define SLI_CT_NO_SYMBOLIC_NODE_NAME 0x09
281 #define SLI_CT_NO_PORT_TYPE 0x0A
282 #define SLI_CT_ACCESS_DENIED 0x10
283 #define SLI_CT_INVALID_PORT_ID 0x11
284 #define SLI_CT_DATABASE_EMPTY 0x12
285 #define SLI_CT_APP_ID_NOT_AVAILABLE 0x40
291 #define SLI_CTNS_GA_NXT 0x0100
292 #define SLI_CTNS_GPN_ID 0x0112
293 #define SLI_CTNS_GNN_ID 0x0113
294 #define SLI_CTNS_GCS_ID 0x0114
295 #define SLI_CTNS_GFT_ID 0x0117
296 #define SLI_CTNS_GSPN_ID 0x0118
297 #define SLI_CTNS_GPT_ID 0x011A
298 #define SLI_CTNS_GFF_ID 0x011F
299 #define SLI_CTNS_GID_PN 0x0121
300 #define SLI_CTNS_GID_NN 0x0131
301 #define SLI_CTNS_GIP_NN 0x0135
302 #define SLI_CTNS_GIPA_NN 0x0136
303 #define SLI_CTNS_GSNN_NN 0x0139
304 #define SLI_CTNS_GNN_IP 0x0153
305 #define SLI_CTNS_GIPA_IP 0x0156
306 #define SLI_CTNS_GID_FT 0x0171
307 #define SLI_CTNS_GID_FF 0x01F1
308 #define SLI_CTNS_GID_PT 0x01A1
309 #define SLI_CTNS_RPN_ID 0x0212
310 #define SLI_CTNS_RNN_ID 0x0213
311 #define SLI_CTNS_RCS_ID 0x0214
312 #define SLI_CTNS_RFT_ID 0x0217
313 #define SLI_CTNS_RSPN_ID 0x0218
314 #define SLI_CTNS_RPT_ID 0x021A
315 #define SLI_CTNS_RFF_ID 0x021F
316 #define SLI_CTNS_RIP_NN 0x0235
317 #define SLI_CTNS_RIPA_NN 0x0236
318 #define SLI_CTNS_RSNN_NN 0x0239
319 #define SLI_CTNS_RSPNI_PNI 0x0240
320 #define SLI_CTNS_DA_ID 0x0300
326 #define SLI_CTPT_N_PORT 0x01
327 #define SLI_CTPT_NL_PORT 0x02
328 #define SLI_CTPT_FNL_PORT 0x03
329 #define SLI_CTPT_IP 0x04
330 #define SLI_CTPT_FCP 0x08
331 #define SLI_CTPT_NVME 0x28
332 #define SLI_CTPT_NX_PORT 0x7F
333 #define SLI_CTPT_F_PORT 0x81
334 #define SLI_CTPT_FL_PORT 0x82
335 #define SLI_CTPT_E_PORT 0x84
337 #define SLI_CT_LAST_ENTRY 0x80000000
348 #define FC_PH3 0x20 /* FC-PH-3 version */
356 uint8_t nameType:4; /* FC Word 0, bit 28:31 */
357 uint8_t IEEEextMsn:4; /* FC Word 0, bit 24:27, bit
360 uint8_t IEEEextMsn:4; /* FC Word 0, bit 24:27, bit
362 uint8_t nameType:4; /* FC Word 0, bit 28:31 */
365 #define NAME_IEEE 0x1 /* IEEE name - nameType */
366 #define NAME_IEEE_EXT 0x2 /* IEEE extended name */
367 #define NAME_FC_TYPE 0x3 /* FC native name type */
368 #define NAME_IP_TYPE 0x4 /* IP address */
369 #define NAME_CCITT_TYPE 0xC
370 #define NAME_CCITT_GR_TYPE 0xE
371 uint8_t IEEEextLsb; /* FC Word 0, bit 16:23, IEEE
382 uint8_t fcphHigh; /* FC Word 0, byte 0 */
385 uint8_t bbCreditLsb; /* FC Word 0, byte 3 */
443 uint8_t word2Reserved1; /* FC Word 2 byte 0 */
458 uint8_t classValid:1; /* FC Word 0, bit 31 */
459 uint8_t intermix:1; /* FC Word 0, bit 30 */
460 uint8_t stackedXparent:1; /* FC Word 0, bit 29 */
461 uint8_t stackedLockDown:1; /* FC Word 0, bit 28 */
462 uint8_t seqDelivery:1; /* FC Word 0, bit 27 */
463 uint8_t word0Reserved1:3; /* FC Word 0, bit 24:26 */
465 uint8_t word0Reserved1:3; /* FC Word 0, bit 24:26 */
466 uint8_t seqDelivery:1; /* FC Word 0, bit 27 */
467 uint8_t stackedLockDown:1; /* FC Word 0, bit 28 */
468 uint8_t stackedXparent:1; /* FC Word 0, bit 29 */
469 uint8_t intermix:1; /* FC Word 0, bit 30 */
470 uint8_t classValid:1; /* FC Word 0, bit 31 */
474 uint8_t word0Reserved2; /* FC Word 0, bit 16:23 */
477 uint8_t iCtlXidReAssgn:2; /* FC Word 0, Bit 14:15 */
478 uint8_t iCtlInitialPa:2; /* FC Word 0, bit 12:13 */
479 uint8_t iCtlAck0capable:1; /* FC Word 0, bit 11 */
480 uint8_t iCtlAckNcapable:1; /* FC Word 0, bit 10 */
481 uint8_t word0Reserved3:2; /* FC Word 0, bit 8: 9 */
483 uint8_t word0Reserved3:2; /* FC Word 0, bit 8: 9 */
484 uint8_t iCtlAckNcapable:1; /* FC Word 0, bit 10 */
485 uint8_t iCtlAck0capable:1; /* FC Word 0, bit 11 */
486 uint8_t iCtlInitialPa:2; /* FC Word 0, bit 12:13 */
487 uint8_t iCtlXidReAssgn:2; /* FC Word 0, Bit 14:15 */
490 uint8_t word0Reserved4; /* FC Word 0, bit 0: 7 */
510 uint8_t rcvDataSizeLsb; /* FC Word 1, bit 0: 7 */
515 uint8_t EeCreditSeqLsb; /* FC Word 2, bit 0: 7 */
520 uint8_t word3Reserved2; /* Fc Word 3, bit 0: 7 */
524 AUX_PARM_PNI_VALID = 0x20, /* FC Word 0, bit 29 */
525 AUX_PARM_DATA_VALID = 0x40, /* FC Word 0, bit 30 */
529 u8 flags; /* FC Word 0, bit 31:24 */
530 u8 ext_feat[3]; /* FC Word 0, bit 23:0 */
535 __be16 npiv_cnt; /* FC Word 3, bit 15:0 */
550 #define LPFC_VV_EMLX_ID 0x454d4c58 /* EMLX */
563 #define fc_vft_hdr_r_ctl_MASK 0xFF
566 #define fc_vft_hdr_ver_MASK 0x3
569 #define fc_vft_hdr_type_MASK 0xF
572 #define fc_vft_hdr_e_MASK 0x1
575 #define fc_vft_hdr_priority_MASK 0x7
578 #define fc_vft_hdr_vf_id_MASK 0xFFF
582 #define fc_vft_hdr_hopct_MASK 0xFF
594 #define LOOPBACK_SRC_APPID 0x4321
610 * Extended Link Service LS_COMMAND codes (Payload Word 0)
613 #define ELS_CMD_MASK 0xffff0000
614 #define ELS_RSP_MASK 0xff000000
615 #define ELS_CMD_LS_RJT 0x01000000
616 #define ELS_CMD_ACC 0x02000000
617 #define ELS_CMD_PLOGI 0x03000000
618 #define ELS_CMD_FLOGI 0x04000000
619 #define ELS_CMD_LOGO 0x05000000
620 #define ELS_CMD_ABTX 0x06000000
621 #define ELS_CMD_RCS 0x07000000
622 #define ELS_CMD_RES 0x08000000
623 #define ELS_CMD_RSS 0x09000000
624 #define ELS_CMD_RSI 0x0A000000
625 #define ELS_CMD_ESTS 0x0B000000
626 #define ELS_CMD_ESTC 0x0C000000
627 #define ELS_CMD_ADVC 0x0D000000
628 #define ELS_CMD_RTV 0x0E000000
629 #define ELS_CMD_RLS 0x0F000000
630 #define ELS_CMD_ECHO 0x10000000
631 #define ELS_CMD_TEST 0x11000000
632 #define ELS_CMD_RRQ 0x12000000
633 #define ELS_CMD_REC 0x13000000
634 #define ELS_CMD_RDP 0x18000000
635 #define ELS_CMD_RDF 0x19000000
636 #define ELS_CMD_PRLI 0x20100014
637 #define ELS_CMD_NVMEPRLI 0x20140018
638 #define ELS_CMD_PRLO 0x21100014
639 #define ELS_CMD_PRLO_ACC 0x02100014
640 #define ELS_CMD_PDISC 0x50000000
641 #define ELS_CMD_FDISC 0x51000000
642 #define ELS_CMD_ADISC 0x52000000
643 #define ELS_CMD_FARP 0x54000000
644 #define ELS_CMD_FARPR 0x55000000
645 #define ELS_CMD_RPL 0x57000000
646 #define ELS_CMD_FAN 0x60000000
647 #define ELS_CMD_RSCN 0x61040000
648 #define ELS_CMD_RSCN_XMT 0x61040008
649 #define ELS_CMD_SCR 0x62000000
650 #define ELS_CMD_RNID 0x78000000
651 #define ELS_CMD_LIRR 0x7A000000
652 #define ELS_CMD_LCB 0x81000000
653 #define ELS_CMD_FPIN 0x16000000
654 #define ELS_CMD_EDC 0x17000000
655 #define ELS_CMD_QFPA 0xB0000000
656 #define ELS_CMD_UVEM 0xB1000000
658 #define ELS_CMD_MASK 0xffff
659 #define ELS_RSP_MASK 0xff
660 #define ELS_CMD_LS_RJT 0x01
661 #define ELS_CMD_ACC 0x02
662 #define ELS_CMD_PLOGI 0x03
663 #define ELS_CMD_FLOGI 0x04
664 #define ELS_CMD_LOGO 0x05
665 #define ELS_CMD_ABTX 0x06
666 #define ELS_CMD_RCS 0x07
667 #define ELS_CMD_RES 0x08
668 #define ELS_CMD_RSS 0x09
669 #define ELS_CMD_RSI 0x0A
670 #define ELS_CMD_ESTS 0x0B
671 #define ELS_CMD_ESTC 0x0C
672 #define ELS_CMD_ADVC 0x0D
673 #define ELS_CMD_RTV 0x0E
674 #define ELS_CMD_RLS 0x0F
675 #define ELS_CMD_ECHO 0x10
676 #define ELS_CMD_TEST 0x11
677 #define ELS_CMD_RRQ 0x12
678 #define ELS_CMD_REC 0x13
679 #define ELS_CMD_RDP 0x18
680 #define ELS_CMD_RDF 0x19
681 #define ELS_CMD_PRLI 0x14001020
682 #define ELS_CMD_NVMEPRLI 0x18001420
683 #define ELS_CMD_PRLO 0x14001021
684 #define ELS_CMD_PRLO_ACC 0x14001002
685 #define ELS_CMD_PDISC 0x50
686 #define ELS_CMD_FDISC 0x51
687 #define ELS_CMD_ADISC 0x52
688 #define ELS_CMD_FARP 0x54
689 #define ELS_CMD_FARPR 0x55
690 #define ELS_CMD_RPL 0x57
691 #define ELS_CMD_FAN 0x60
692 #define ELS_CMD_RSCN 0x0461
693 #define ELS_CMD_RSCN_XMT 0x08000461
694 #define ELS_CMD_SCR 0x62
695 #define ELS_CMD_RNID 0x78
696 #define ELS_CMD_LIRR 0x7A
697 #define ELS_CMD_LCB 0x81
700 #define ELS_CMD_QFPA 0xB0
701 #define ELS_CMD_UVEM 0xB1
713 uint8_t lsRjtRsvd0; /* FC Word 0, bit 24:31 */
715 uint8_t lsRjtRsnCode; /* FC Word 0, bit 16:23 */
717 #define LSRJT_INVALID_CMD 0x01
718 #define LSRJT_LOGICAL_ERR 0x03
719 #define LSRJT_LOGICAL_BSY 0x05
720 #define LSRJT_PROTOCOL_ERR 0x07
721 #define LSRJT_UNABLE_TPC 0x09 /* Unable to perform command */
722 #define LSRJT_CMD_UNSUPPORTED 0x0B
723 #define LSRJT_VENDOR_UNIQUE 0xFF /* See Byte 3 */
725 uint8_t lsRjtRsnCodeExp; /* FC Word 0, bit 8:15 */
727 #define LSEXP_NOTHING_MORE 0x00
728 #define LSEXP_SPARM_OPTIONS 0x01
729 #define LSEXP_SPARM_ICTL 0x03
730 #define LSEXP_SPARM_RCTL 0x05
731 #define LSEXP_SPARM_RCV_SIZE 0x07
732 #define LSEXP_SPARM_CONCUR_SEQ 0x09
733 #define LSEXP_SPARM_CREDIT 0x0B
734 #define LSEXP_INVALID_PNAME 0x0D
735 #define LSEXP_INVALID_NNAME 0x0E
736 #define LSEXP_INVALID_CSP 0x0F
737 #define LSEXP_INVALID_ASSOC_HDR 0x11
738 #define LSEXP_ASSOC_HDR_REQ 0x13
739 #define LSEXP_INVALID_O_SID 0x15
740 #define LSEXP_INVALID_OX_RX 0x17
741 #define LSEXP_CMD_IN_PROGRESS 0x19
742 #define LSEXP_PORT_LOGIN_REQ 0x1E
743 #define LSEXP_INVALID_NPORT_ID 0x1F
744 #define LSEXP_INVALID_SEQ_ID 0x21
745 #define LSEXP_INVALID_XCHG 0x23
746 #define LSEXP_INACTIVE_XCHG 0x25
747 #define LSEXP_RQ_REQUIRED 0x27
748 #define LSEXP_OUT_OF_RESOURCE 0x29
749 #define LSEXP_CANT_GIVE_DATA 0x2A
750 #define LSEXP_REQ_UNSUPPORTED 0x2C
751 #define LSEXP_AUTH_REQ 0x48
752 #define LSEXP_NO_RSRC_ASSIGN 0x52
753 uint8_t vendorUnique; /* FC Word 0, bit 0: 7 */
769 uint8_t nPortIdByte2; /* N_port ID bit 0: 7 */
779 #define PRLX_PAGE_LEN 0x10
780 #define TPRLO_PAGE_LEN 0x14
783 uint8_t prliType; /* FC Parm Word 0, bit 24:31 */
785 #define PRLI_FCP_TYPE 0x08
786 #define PRLI_NVME_TYPE 0x28
787 uint8_t word0Reserved1; /* FC Parm Word 0, bit 16:23 */
790 uint8_t origProcAssocV:1; /* FC Parm Word 0, bit 15 */
791 uint8_t respProcAssocV:1; /* FC Parm Word 0, bit 14 */
792 uint8_t estabImagePair:1; /* FC Parm Word 0, bit 13 */
795 uint8_t word0Reserved2:1; /* FC Parm Word 0, bit 12 */
796 uint8_t acceptRspCode:4; /* FC Parm Word 0, bit 8:11, ACC ONLY */
798 uint8_t acceptRspCode:4; /* FC Parm Word 0, bit 8:11, ACC ONLY */
799 uint8_t word0Reserved2:1; /* FC Parm Word 0, bit 12 */
800 uint8_t estabImagePair:1; /* FC Parm Word 0, bit 13 */
801 uint8_t respProcAssocV:1; /* FC Parm Word 0, bit 14 */
802 uint8_t origProcAssocV:1; /* FC Parm Word 0, bit 15 */
806 #define PRLI_REQ_EXECUTED 0x1 /* acceptRspCode */
807 #define PRLI_NO_RESOURCES 0x2
808 #define PRLI_INIT_INCOMPLETE 0x3
809 #define PRLI_NO_SUCH_PA 0x4
810 #define PRLI_PREDEF_CONFIG 0x5
811 #define PRLI_PARTIAL_SUCCESS 0x6
812 #define PRLI_INVALID_PAGE_CNT 0x7
813 #define PRLI_INV_SRV_PARM 0x8
815 uint8_t word0Reserved3; /* FC Parm Word 0, bit 0:7 */
817 uint32_t origProcAssoc; /* FC Parm Word 1, bit 0:31 */
819 uint32_t respProcAssoc; /* FC Parm Word 2, bit 0:31 */
840 uint16_t writeXferRdyDis:1; /* FC Parm Word 3, bit 0 */
850 uint16_t writeXferRdyDis:1; /* FC Parm Word 3, bit 0 */
866 uint8_t prloType; /* FC Parm Word 0, bit 24:31 */
868 #define PRLO_FCP_TYPE 0x08
869 uint8_t word0Reserved1; /* FC Parm Word 0, bit 16:23 */
872 uint8_t origProcAssocV:1; /* FC Parm Word 0, bit 15 */
873 uint8_t respProcAssocV:1; /* FC Parm Word 0, bit 14 */
874 uint8_t word0Reserved2:2; /* FC Parm Word 0, bit 12:13 */
875 uint8_t acceptRspCode:4; /* FC Parm Word 0, bit 8:11, ACC ONLY */
877 uint8_t acceptRspCode:4; /* FC Parm Word 0, bit 8:11, ACC ONLY */
878 uint8_t word0Reserved2:2; /* FC Parm Word 0, bit 12:13 */
879 uint8_t respProcAssocV:1; /* FC Parm Word 0, bit 14 */
880 uint8_t origProcAssocV:1; /* FC Parm Word 0, bit 15 */
883 #define PRLO_REQ_EXECUTED 0x1 /* acceptRspCode */
884 #define PRLO_NO_SUCH_IMAGE 0x4
885 #define PRLO_INVALID_PAGE_CNT 0x7
887 uint8_t word0Reserved3; /* FC Parm Word 0, bit 0:7 */
889 uint32_t origProcAssoc; /* FC Parm Word 1, bit 0:31 */
891 uint32_t respProcAssoc; /* FC Parm Word 2, bit 0:31 */
893 uint32_t word3Reserved1; /* FC Parm Word 3, bit 0:31 */
906 #define FARP_NO_ACTION 0 /* FARP information enclosed, no
908 #define FARP_MATCH_PORT 0x1 /* Match on Responder Port Name */
909 #define FARP_MATCH_NODE 0x2 /* Match on Responder Node Name */
910 #define FARP_MATCH_IP 0x4 /* Match on IP address, not supported */
911 #define FARP_MATCH_IPV4 0x5 /* Match on IPV4 address, not
913 #define FARP_MATCH_IPV6 0x6 /* Match on IPV6 address, not
917 #define FARP_REQUEST_PLOGI 0x1 /* Request for PLOGI */
918 #define FARP_REQUEST_FARPR 0x2 /* Request for FARP Response */
938 #define SCR_FUNC_FABRIC 0x01
939 #define SCR_FUNC_NPORT 0x02
940 #define SCR_FUNC_FULL 0x03
941 #define SCR_CLEAR 0xff
948 #define RNID_HBA 0x7
949 #define RNID_HOST 0xa
950 #define RNID_DRIVER 0xd
954 #define RNID_IPV4 0x1
955 #define RNID_IPV6 0x2
960 #define RNID_TD_SUPPORT 0x1
961 #define RNID_LP_VALID 0x2
966 #define RNID_TOPOLOGY_DISC 0xdf
973 RNID_TOP_DISC topologyDisc; /* topology disc (0xdf) */
980 #define rls_rsvd_MASK 0x000000ff
982 #define rls_did_SHIFT 0
983 #define rls_did_MASK 0x00ffffff
999 #define rrq_rsvd_MASK 0x000000ff
1001 #define rrq_did_SHIFT 0
1002 #define rrq_did_MASK 0x00ffffff
1006 #define rrq_oxid_MASK 0xffff
1008 #define rrq_rxid_SHIFT 0
1009 #define rrq_rxid_MASK 0xffff
1014 #define LPFC_DEF_VFN_PER_PFN 0 /* Default VFs due to platform limitation*/
1021 #define qtov_rsvd0_MASK 0x0000000f
1024 #define qtov_edtovres_MASK 0x00000001
1027 #define qtov_rsvd1_MASK 0x0000003f
1030 #define qtov_rttov_MASK 0x00000001
1032 #define qtov_rsvd2_SHIFT 0
1033 #define qtov_rsvd2_MASK 0x0003ffff
1075 #define RSCN_ADDRESS_FORMAT_PORT 0x0
1076 #define RSCN_ADDRESS_FORMAT_AREA 0x1
1077 #define RSCN_ADDRESS_FORMAT_DOMAIN 0x2
1078 #define RSCN_ADDRESS_FORMAT_FABRIC 0x3
1079 #define RSCN_ADDRESS_FORMAT_MASK 0x3
1086 uint8_t elsCode; /* FC Word 0, bit 24:31 */
1110 uint32_t lcb_command; /* ELS command opcode (0x81) */
1112 #define LPFC_LCB_ON 0x1
1113 #define LPFC_LCB_OFF 0x2
1115 uint8_t capability; /* LCB Payload Word 1, bit 0:7 */
1117 #define LPFC_LCB_GREEN 0x1
1118 #define LPFC_LCB_AMBER 0x2
1122 #define BEACON_VERSION_V0 0
1123 uint16_t lcb_duration; /* LCB Payload Word 2, bit 15:0 */
1130 uint32_t lcb_ls_acc; /* Acceptance of LCB request (0x02) */
1133 uint8_t capability; /* LCB Payload Word 1, bit 0:7 */
1136 uint16_t lcb_duration; /* LCB Payload Word 2, bit 15:0 */
1142 #define SFF_PG0_IDENT_SFP 0x3
1144 #define SFP_FLAG_PT_OPTICAL 0x0
1145 #define SFP_FLAG_PT_SWLASER 0x01
1146 #define SFP_FLAG_PT_LWLASER_LC1310 0x02
1147 #define SFP_FLAG_PT_LWLASER_LL1550 0x03
1148 #define SFP_FLAG_PT_MASK 0x0F
1149 #define SFP_FLAG_PT_SHIFT 0
1151 #define SFP_FLAG_IS_OPTICAL_PORT 0x01
1152 #define SFP_FLAG_IS_OPTICAL_MASK 0x010
1155 #define SFP_FLAG_IS_DESC_VALID 0x01
1156 #define SFP_FLAG_IS_DESC_VALID_MASK 0x020
1159 #define SFP_FLAG_CT_UNKNOWN 0x0
1160 #define SFP_FLAG_CT_SFP_PLUS 0x01
1161 #define SFP_FLAG_CT_MASK 0x3C
1184 #define RDP_PORT_NAMES_DESC_TAG 0x00010003
1197 #define RDP_FEC_DESC_TAG 0x00010005
1209 #define RDP_LINK_ERROR_STATUS_DESC_TAG 0x00010002
1216 #define VN_PT_PHY_UNKNOWN 0x00
1217 #define VN_PT_PHY_PF_PORT 0x01
1218 #define VN_PT_PHY_ETH_MAC 0x10
1221 #define RDP_PS_1GB 0x8000
1222 #define RDP_PS_2GB 0x4000
1223 #define RDP_PS_4GB 0x2000
1224 #define RDP_PS_10GB 0x1000
1225 #define RDP_PS_8GB 0x0800
1226 #define RDP_PS_16GB 0x0400
1227 #define RDP_PS_32GB 0x0200
1228 #define RDP_PS_64GB 0x0100
1229 #define RDP_PS_128GB 0x0080
1230 #define RDP_PS_256GB 0x0040
1232 #define RDP_CAP_USER_CONFIGURED 0x0002
1233 #define RDP_CAP_UNKNOWN 0x0001
1234 #define RDP_PS_UNKNOWN 0x0002
1235 #define RDP_PS_NOT_ESTABLISHED 0x0001
1246 #define RDP_PORT_SPEED_DESC_TAG 0x00010001
1254 #define RDP_N_PORT_DESC_TAG 0x00000003
1264 uint32_t els_req; /* Request payload word 0 value.*/
1267 #define RDP_LINK_SERVICE_DESC_TAG 0x00000001
1272 /* must be ELS req Word 0(0x18) */
1284 #define RDP_SFP_DESC_TAG 0x00010000
1297 #define RDP_BBC_DESC_TAG 0x00010006
1305 #define RDP_OET_LOW_WARNING 0x1
1306 #define RDP_OET_HIGH_WARNING 0x2
1307 #define RDP_OET_LOW_ALARM 0x4
1308 #define RDP_OET_HIGH_ALARM 0x8
1310 #define RDP_OED_TEMPERATURE 0x1
1311 #define RDP_OED_VOLTAGE 0x2
1312 #define RDP_OED_TXBIAS 0x3
1313 #define RDP_OED_TXPOWER 0x4
1314 #define RDP_OED_RXPOWER 0x5
1325 #define RDP_OED_DESC_TAG 0x00010007
1341 #define RDP_OPD_DESC_TAG 0x00010008
1349 uint32_t rdp_command; /* ELS command opcode (0x18)*/
1381 #define VEM_ID_DESC_TAG 0x0001000A
1390 #define INSTANTIATED_VE_DESC_TAG 0x0001000B
1396 #define lpfc_instantiated_local_id_SHIFT 0
1397 #define lpfc_instantiated_local_id_MASK 0x000000ff
1400 #define lpfc_instantiated_nport_id_MASK 0x00ffffff
1404 #define DEINSTANTIATED_VE_DESC_TAG 0x0001000C
1410 #define lpfc_deinstantiated_nport_id_SHIFT 0
1411 #define lpfc_deinstantiated_nport_id_MASK 0x000000ff
1414 #define lpfc_deinstantiated_local_id_MASK 0x00ffffff
1439 #define SLI_CT_APP_SEV_Subtypes 0x20 /* Application Server subtype */
1441 #define SLI_CTAS_GAPPIA_ENT 0x0100 /* Get Application Identifier */
1442 #define SLI_CTAS_GALLAPPIA 0x0101 /* Get All Application Identifier */
1443 #define SLI_CTAS_GALLAPPIA_ID 0x0102 /* Get All Application Identifier */
1445 #define SLI_CTAS_GAPPIA_IDAPP 0x0103 /* Get Application Identifier */
1447 #define SLI_CTAS_RAPP_IDENT 0x0200 /* Register Application Identifier */
1448 #define SLI_CTAS_DAPP_IDENT 0x0300 /* Deregister Application */
1450 #define SLI_CTAS_DALLAPP_ID 0x0301 /* Deregister All Application */
1474 #define GALLAPPIA_ID_LAST 0x80
1489 #define SLI_CT_FDMI_Subtypes 0x10 /* Management Service Subtype */
1576 #define SLI_CT_MIB_Subtypes 0x11
1597 #define SLI_MGMT_GRHL 0x100 /* Get registered HBA list */
1598 #define SLI_MGMT_GHAT 0x101 /* Get HBA attributes */
1599 #define SLI_MGMT_GRPL 0x102 /* Get registered Port list */
1600 #define SLI_MGMT_GPAT 0x110 /* Get Port attributes */
1601 #define SLI_MGMT_GPAS 0x120 /* Get Port Statistics */
1602 #define SLI_MGMT_RHBA 0x200 /* Register HBA */
1603 #define SLI_MGMT_RHAT 0x201 /* Register HBA attributes */
1604 #define SLI_MGMT_RPRT 0x210 /* Register Port */
1605 #define SLI_MGMT_RPA 0x211 /* Register Port attributes */
1606 #define SLI_MGMT_DHBA 0x300 /* De-register HBA */
1607 #define SLI_MGMT_DHAT 0x301 /* De-register HBA attributes */
1608 #define SLI_MGMT_DPRT 0x310 /* De-register Port */
1609 #define SLI_MGMT_DPA 0x311 /* De-register Port attributes */
1616 #define RHBA_NODENAME 0x1 /* 8 byte WWNN */
1617 #define RHBA_MANUFACTURER 0x2 /* 4 to 64 byte ASCII string */
1618 #define RHBA_SERIAL_NUMBER 0x3 /* 4 to 64 byte ASCII string */
1619 #define RHBA_MODEL 0x4 /* 4 to 256 byte ASCII string */
1620 #define RHBA_MODEL_DESCRIPTION 0x5 /* 4 to 256 byte ASCII string */
1621 #define RHBA_HARDWARE_VERSION 0x6 /* 4 to 256 byte ASCII string */
1622 #define RHBA_DRIVER_VERSION 0x7 /* 4 to 256 byte ASCII string */
1623 #define RHBA_OPTION_ROM_VERSION 0x8 /* 4 to 256 byte ASCII string */
1624 #define RHBA_FIRMWARE_VERSION 0x9 /* 4 to 256 byte ASCII string */
1625 #define RHBA_OS_NAME_VERSION 0xa /* 4 to 256 byte ASCII string */
1626 #define RHBA_MAX_CT_PAYLOAD_LEN 0xb /* 32-bit unsigned int */
1627 #define RHBA_SYM_NODENAME 0xc /* 4 to 256 byte ASCII string */
1628 #define RHBA_VENDOR_INFO 0xd /* 32-bit unsigned int */
1629 #define RHBA_NUM_PORTS 0xe /* 32-bit unsigned int */
1630 #define RHBA_FABRIC_WWNN 0xf /* 8 byte WWNN */
1631 #define RHBA_BIOS_VERSION 0x10 /* 4 to 256 byte ASCII string */
1632 #define RHBA_BIOS_STATE 0x11 /* 32-bit unsigned int */
1633 #define RHBA_VENDOR_ID 0xe0 /* 8 byte ASCII string */
1636 #define LPFC_FDMI_HBA_ATTR_wwnn 0x00000001
1637 #define LPFC_FDMI_HBA_ATTR_manufacturer 0x00000002
1638 #define LPFC_FDMI_HBA_ATTR_sn 0x00000004
1639 #define LPFC_FDMI_HBA_ATTR_model 0x00000008
1640 #define LPFC_FDMI_HBA_ATTR_description 0x00000010
1641 #define LPFC_FDMI_HBA_ATTR_hdw_ver 0x00000020
1642 #define LPFC_FDMI_HBA_ATTR_drvr_ver 0x00000040
1643 #define LPFC_FDMI_HBA_ATTR_rom_ver 0x00000080
1644 #define LPFC_FDMI_HBA_ATTR_fmw_ver 0x00000100
1645 #define LPFC_FDMI_HBA_ATTR_os_ver 0x00000200
1646 #define LPFC_FDMI_HBA_ATTR_ct_len 0x00000400
1647 #define LPFC_FDMI_HBA_ATTR_symbolic_name 0x00000800
1648 #define LPFC_FDMI_HBA_ATTR_vendor_info 0x00001000 /* Not used */
1649 #define LPFC_FDMI_HBA_ATTR_num_ports 0x00002000
1650 #define LPFC_FDMI_HBA_ATTR_fabric_wwnn 0x00004000
1651 #define LPFC_FDMI_HBA_ATTR_bios_ver 0x00008000
1652 #define LPFC_FDMI_HBA_ATTR_bios_state 0x00010000 /* Not used */
1653 #define LPFC_FDMI_HBA_ATTR_vendor_id 0x00020000
1656 #define LPFC_FDMI1_HBA_ATTR 0x000007ff
1660 #define LPFC_FDMI2_HBA_ATTR 0x0002efff
1665 #define RPRT_SUPPORTED_FC4_TYPES 0x1 /* 32 byte binary array */
1666 #define RPRT_SUPPORTED_SPEED 0x2 /* 32-bit unsigned int */
1667 #define RPRT_PORT_SPEED 0x3 /* 32-bit unsigned int */
1668 #define RPRT_MAX_FRAME_SIZE 0x4 /* 32-bit unsigned int */
1669 #define RPRT_OS_DEVICE_NAME 0x5 /* 4 to 256 byte ASCII string */
1670 #define RPRT_HOST_NAME 0x6 /* 4 to 256 byte ASCII string */
1671 #define RPRT_NODENAME 0x7 /* 8 byte WWNN */
1672 #define RPRT_PORTNAME 0x8 /* 8 byte WWPN */
1673 #define RPRT_SYM_PORTNAME 0x9 /* 4 to 256 byte ASCII string */
1674 #define RPRT_PORT_TYPE 0xa /* 32-bit unsigned int */
1675 #define RPRT_SUPPORTED_CLASS 0xb /* 32-bit unsigned int */
1676 #define RPRT_FABRICNAME 0xc /* 8 byte Fabric WWPN */
1677 #define RPRT_ACTIVE_FC4_TYPES 0xd /* 32 byte binary array */
1678 #define RPRT_PORT_STATE 0x101 /* 32-bit unsigned int */
1679 #define RPRT_DISC_PORT 0x102 /* 32-bit unsigned int */
1680 #define RPRT_PORT_ID 0x103 /* 32-bit unsigned int */
1681 #define RPRT_VENDOR_MI 0xf047 /* vendor ascii string */
1682 #define RPRT_SMART_SERVICE 0xf100 /* 4 to 256 byte ASCII string */
1683 #define RPRT_SMART_GUID 0xf101 /* 8 byte WWNN + 8 byte WWPN */
1684 #define RPRT_SMART_VERSION 0xf102 /* 4 to 256 byte ASCII string */
1685 #define RPRT_SMART_MODEL 0xf103 /* 4 to 256 byte ASCII string */
1686 #define RPRT_SMART_PORT_INFO 0xf104 /* 32-bit unsigned int */
1687 #define RPRT_SMART_QOS 0xf105 /* 32-bit unsigned int */
1688 #define RPRT_SMART_SECURITY 0xf106 /* 32-bit unsigned int */
1691 #define LPFC_FDMI_PORT_ATTR_fc4type 0x00000001
1692 #define LPFC_FDMI_PORT_ATTR_support_speed 0x00000002
1693 #define LPFC_FDMI_PORT_ATTR_speed 0x00000004
1694 #define LPFC_FDMI_PORT_ATTR_max_frame 0x00000008
1695 #define LPFC_FDMI_PORT_ATTR_os_devname 0x00000010
1696 #define LPFC_FDMI_PORT_ATTR_host_name 0x00000020
1697 #define LPFC_FDMI_PORT_ATTR_wwnn 0x00000040
1698 #define LPFC_FDMI_PORT_ATTR_wwpn 0x00000080
1699 #define LPFC_FDMI_PORT_ATTR_symbolic_name 0x00000100
1700 #define LPFC_FDMI_PORT_ATTR_port_type 0x00000200
1701 #define LPFC_FDMI_PORT_ATTR_class 0x00000400
1702 #define LPFC_FDMI_PORT_ATTR_fabric_wwpn 0x00000800
1703 #define LPFC_FDMI_PORT_ATTR_port_state 0x00001000
1704 #define LPFC_FDMI_PORT_ATTR_active_fc4type 0x00002000
1705 #define LPFC_FDMI_PORT_ATTR_num_disc 0x00004000
1706 #define LPFC_FDMI_PORT_ATTR_nportid 0x00008000
1707 #define LPFC_FDMI_SMART_ATTR_service 0x00010000 /* Vendor specific */
1708 #define LPFC_FDMI_SMART_ATTR_guid 0x00020000 /* Vendor specific */
1709 #define LPFC_FDMI_SMART_ATTR_version 0x00040000 /* Vendor specific */
1710 #define LPFC_FDMI_SMART_ATTR_model 0x00080000 /* Vendor specific */
1711 #define LPFC_FDMI_SMART_ATTR_port_info 0x00100000 /* Vendor specific */
1712 #define LPFC_FDMI_SMART_ATTR_qos 0x00200000 /* Vendor specific */
1713 #define LPFC_FDMI_SMART_ATTR_security 0x00400000 /* Vendor specific */
1714 #define LPFC_FDMI_VENDOR_ATTR_mi 0x00800000 /* Vendor specific */
1717 #define LPFC_FDMI1_PORT_ATTR 0x0000003f
1720 #define LPFC_FDMI2_PORT_ATTR 0x0000ffff
1723 #define LPFC_FDMI2_SMART_ATTR 0x007fffff
1730 #define LPFC_FDMI_PORTTYPE_UNKNOWN 0
1737 * BAR0, offset 0x10 - SLIM base memory address
1738 * BAR1, offset 0x14 - SLIM base memory high address
1739 * BAR2, offset 0x18 - REGISTER base memory address
1740 * BAR3, offset 0x1c - REGISTER base memory high address
1741 * BAR4, offset 0x20 - BIU I/O registers
1742 * BAR5, offset 0x24 - REGISTER base io high address
1753 #define OWN_HOST 0
1759 #define FC_NET_HDR 0x20
1762 #define PCI_VENDOR_ID_EMULEX 0x10df
1763 #define PCI_DEVICE_ID_FIREFLY 0x1ae5
1764 #define PCI_DEVICE_ID_PROTEUS_VF 0xe100
1765 #define PCI_DEVICE_ID_BALIUS 0xe131
1766 #define PCI_DEVICE_ID_PROTEUS_PF 0xe180
1767 #define PCI_DEVICE_ID_LANCER_FC 0xe200
1768 #define PCI_DEVICE_ID_LANCER_FC_VF 0xe208
1769 #define PCI_DEVICE_ID_LANCER_FCOE 0xe260
1770 #define PCI_DEVICE_ID_LANCER_FCOE_VF 0xe268
1771 #define PCI_DEVICE_ID_LANCER_G6_FC 0xe300
1772 #define PCI_DEVICE_ID_LANCER_G7_FC 0xf400
1773 #define PCI_DEVICE_ID_LANCER_G7P_FC 0xf500
1774 #define PCI_DEVICE_ID_SAT_SMB 0xf011
1775 #define PCI_DEVICE_ID_SAT_MID 0xf015
1776 #define PCI_DEVICE_ID_RFLY 0xf095
1777 #define PCI_DEVICE_ID_PFLY 0xf098
1778 #define PCI_DEVICE_ID_LP101 0xf0a1
1779 #define PCI_DEVICE_ID_TFLY 0xf0a5
1780 #define PCI_DEVICE_ID_BSMB 0xf0d1
1781 #define PCI_DEVICE_ID_BMID 0xf0d5
1782 #define PCI_DEVICE_ID_ZSMB 0xf0e1
1783 #define PCI_DEVICE_ID_ZMID 0xf0e5
1784 #define PCI_DEVICE_ID_NEPTUNE 0xf0f5
1785 #define PCI_DEVICE_ID_NEPTUNE_SCSP 0xf0f6
1786 #define PCI_DEVICE_ID_NEPTUNE_DCSP 0xf0f7
1787 #define PCI_DEVICE_ID_SAT 0xf100
1788 #define PCI_DEVICE_ID_SAT_SCSP 0xf111
1789 #define PCI_DEVICE_ID_SAT_DCSP 0xf112
1790 #define PCI_DEVICE_ID_FALCON 0xf180
1791 #define PCI_DEVICE_ID_SUPERFLY 0xf700
1792 #define PCI_DEVICE_ID_DRAGONFLY 0xf800
1793 #define PCI_DEVICE_ID_CENTAUR 0xf900
1794 #define PCI_DEVICE_ID_PEGASUS 0xf980
1795 #define PCI_DEVICE_ID_THOR 0xfa00
1796 #define PCI_DEVICE_ID_VIPER 0xfb00
1797 #define PCI_DEVICE_ID_LP10000S 0xfc00
1798 #define PCI_DEVICE_ID_LP11000S 0xfc10
1799 #define PCI_DEVICE_ID_LPE11000S 0xfc20
1800 #define PCI_DEVICE_ID_SAT_S 0xfc40
1801 #define PCI_DEVICE_ID_PROTEUS_S 0xfc50
1802 #define PCI_DEVICE_ID_HELIOS 0xfd00
1803 #define PCI_DEVICE_ID_HELIOS_SCSP 0xfd11
1804 #define PCI_DEVICE_ID_HELIOS_DCSP 0xfd12
1805 #define PCI_DEVICE_ID_ZEPHYR 0xfe00
1806 #define PCI_DEVICE_ID_ZEPHYR_SCSP 0xfe11
1807 #define PCI_DEVICE_ID_ZEPHYR_DCSP 0xfe12
1808 #define PCI_VENDOR_ID_SERVERENGINE 0x19a2
1809 #define PCI_DEVICE_ID_TIGERSHARK 0x0704
1810 #define PCI_DEVICE_ID_TOMCAT 0x0714
1811 #define PCI_DEVICE_ID_SKYHAWK 0x0724
1812 #define PCI_DEVICE_ID_SKYHAWK_VF 0x072c
1813 #define PCI_VENDOR_ID_ATTO 0x117c
1814 #define PCI_DEVICE_ID_CLRY_16XE 0x0064
1815 #define PCI_DEVICE_ID_CLRY_161E 0x0063
1816 #define PCI_DEVICE_ID_CLRY_162E 0x0064
1817 #define PCI_DEVICE_ID_CLRY_164E 0x0065
1818 #define PCI_DEVICE_ID_CLRY_16XP 0x0094
1819 #define PCI_DEVICE_ID_CLRY_161P 0x00a0
1820 #define PCI_DEVICE_ID_CLRY_162P 0x0094
1821 #define PCI_DEVICE_ID_CLRY_164P 0x00a1
1822 #define PCI_DEVICE_ID_CLRY_32XE 0x0094
1823 #define PCI_DEVICE_ID_CLRY_321E 0x00a2
1824 #define PCI_DEVICE_ID_CLRY_322E 0x00a3
1825 #define PCI_DEVICE_ID_CLRY_324E 0x00ac
1826 #define PCI_DEVICE_ID_CLRY_32XP 0x00bb
1827 #define PCI_DEVICE_ID_CLRY_321P 0x00bc
1828 #define PCI_DEVICE_ID_CLRY_322P 0x00bd
1829 #define PCI_DEVICE_ID_CLRY_324P 0x00be
1830 #define PCI_DEVICE_ID_TLFC_2 0x0064
1831 #define PCI_DEVICE_ID_TLFC_2XX2 0x4064
1832 #define PCI_DEVICE_ID_TLFC_3 0x0094
1833 #define PCI_DEVICE_ID_TLFC_3162 0x40a6
1834 #define PCI_DEVICE_ID_TLFC_3322 0x40a7
1836 #define JEDEC_ID_ADDRESS 0x0080001c
1837 #define FIREFLY_JEDEC_ID 0x1ACC
1838 #define SUPERFLY_JEDEC_ID 0x0020
1839 #define DRAGONFLY_JEDEC_ID 0x0021
1840 #define DRAGONFLY_V2_JEDEC_ID 0x0025
1841 #define CENTAUR_2G_JEDEC_ID 0x0026
1842 #define CENTAUR_1G_JEDEC_ID 0x0028
1843 #define PEGASUS_ORION_JEDEC_ID 0x0036
1844 #define PEGASUS_JEDEC_ID 0x0038
1845 #define THOR_JEDEC_ID 0x0012
1846 #define HELIOS_JEDEC_ID 0x0364
1847 #define ZEPHYR_JEDEC_ID 0x0577
1848 #define VIPER_JEDEC_ID 0x4838
1849 #define SATURN_JEDEC_ID 0x1004
1851 #define JEDEC_ID_MASK 0x0FFFF000
1871 #define HA_REG_OFFSET 0 /* Byte offset from register base address */
1873 #define HA_R0RE_REQ 0x00000001 /* Bit 0 */
1874 #define HA_R0CE_RSP 0x00000002 /* Bit 1 */
1875 #define HA_R0ATT 0x00000008 /* Bit 3 */
1876 #define HA_R1RE_REQ 0x00000010 /* Bit 4 */
1877 #define HA_R1CE_RSP 0x00000020 /* Bit 5 */
1878 #define HA_R1ATT 0x00000080 /* Bit 7 */
1879 #define HA_R2RE_REQ 0x00000100 /* Bit 8 */
1880 #define HA_R2CE_RSP 0x00000200 /* Bit 9 */
1881 #define HA_R2ATT 0x00000800 /* Bit 11 */
1882 #define HA_R3RE_REQ 0x00001000 /* Bit 12 */
1883 #define HA_R3CE_RSP 0x00002000 /* Bit 13 */
1884 #define HA_R3ATT 0x00008000 /* Bit 15 */
1885 #define HA_LATT 0x20000000 /* Bit 29 */
1886 #define HA_MBATT 0x40000000 /* Bit 30 */
1887 #define HA_ERATT 0x80000000 /* Bit 31 */
1889 #define HA_RXRE_REQ 0x00000001 /* Bit 0 */
1890 #define HA_RXCE_RSP 0x00000002 /* Bit 1 */
1891 #define HA_RXATT 0x00000008 /* Bit 3 */
1892 #define HA_RXMASK 0x0000000f
1910 #define CA_R0CE_REQ 0x00000001 /* Bit 0 */
1911 #define CA_R0RE_RSP 0x00000002 /* Bit 1 */
1912 #define CA_R0ATT 0x00000008 /* Bit 3 */
1913 #define CA_R1CE_REQ 0x00000010 /* Bit 4 */
1914 #define CA_R1RE_RSP 0x00000020 /* Bit 5 */
1915 #define CA_R1ATT 0x00000080 /* Bit 7 */
1916 #define CA_R2CE_REQ 0x00000100 /* Bit 8 */
1917 #define CA_R2RE_RSP 0x00000200 /* Bit 9 */
1918 #define CA_R2ATT 0x00000800 /* Bit 11 */
1919 #define CA_R3CE_REQ 0x00001000 /* Bit 12 */
1920 #define CA_R3RE_RSP 0x00002000 /* Bit 13 */
1921 #define CA_R3ATT 0x00008000 /* Bit 15 */
1922 #define CA_MBATT 0x40000000 /* Bit 30 */
1928 #define HS_MBRDY 0x00400000 /* Bit 22 */
1929 #define HS_FFRDY 0x00800000 /* Bit 23 */
1930 #define HS_FFER8 0x01000000 /* Bit 24 */
1931 #define HS_FFER7 0x02000000 /* Bit 25 */
1932 #define HS_FFER6 0x04000000 /* Bit 26 */
1933 #define HS_FFER5 0x08000000 /* Bit 27 */
1934 #define HS_FFER4 0x10000000 /* Bit 28 */
1935 #define HS_FFER3 0x20000000 /* Bit 29 */
1936 #define HS_FFER2 0x40000000 /* Bit 30 */
1937 #define HS_FFER1 0x80000000 /* Bit 31 */
1938 #define HS_CRIT_TEMP 0x00000100 /* Bit 8 */
1939 #define HS_FFERM 0xFF000100 /* Mask for error bits 31:24 and 8 */
1940 #define UNPLUG_ERR 0x00000001 /* Indicate pci hot unplug */
1945 #define HC_MBINT_ENA 0x00000001 /* Bit 0 */
1946 #define HC_R0INT_ENA 0x00000002 /* Bit 1 */
1947 #define HC_R1INT_ENA 0x00000004 /* Bit 2 */
1948 #define HC_R2INT_ENA 0x00000008 /* Bit 3 */
1949 #define HC_R3INT_ENA 0x00000010 /* Bit 4 */
1950 #define HC_INITHBI 0x02000000 /* Bit 25 */
1951 #define HC_INITMB 0x04000000 /* Bit 26 */
1952 #define HC_INITFF 0x08000000 /* Bit 27 */
1953 #define HC_LAINT_ENA 0x20000000 /* Bit 29 */
1954 #define HC_ERINT_ENA 0x80000000 /* Bit 31 */
1957 #define MSIX_DFLT_ID 0
1958 #define MSIX_RNG0_ID 0
1970 #define MBX_SHUTDOWN 0x00 /* terminate testing */
1971 #define MBX_LOAD_SM 0x01
1972 #define MBX_READ_NV 0x02
1973 #define MBX_WRITE_NV 0x03
1974 #define MBX_RUN_BIU_DIAG 0x04
1975 #define MBX_INIT_LINK 0x05
1976 #define MBX_DOWN_LINK 0x06
1977 #define MBX_CONFIG_LINK 0x07
1978 #define MBX_CONFIG_RING 0x09
1979 #define MBX_RESET_RING 0x0A
1980 #define MBX_READ_CONFIG 0x0B
1981 #define MBX_READ_RCONFIG 0x0C
1982 #define MBX_READ_SPARM 0x0D
1983 #define MBX_READ_STATUS 0x0E
1984 #define MBX_READ_RPI 0x0F
1985 #define MBX_READ_XRI 0x10
1986 #define MBX_READ_REV 0x11
1987 #define MBX_READ_LNK_STAT 0x12
1988 #define MBX_REG_LOGIN 0x13
1989 #define MBX_UNREG_LOGIN 0x14
1990 #define MBX_CLEAR_LA 0x16
1991 #define MBX_DUMP_MEMORY 0x17
1992 #define MBX_DUMP_CONTEXT 0x18
1993 #define MBX_RUN_DIAGS 0x19
1994 #define MBX_RESTART 0x1A
1995 #define MBX_UPDATE_CFG 0x1B
1996 #define MBX_DOWN_LOAD 0x1C
1997 #define MBX_DEL_LD_ENTRY 0x1D
1998 #define MBX_RUN_PROGRAM 0x1E
1999 #define MBX_SET_MASK 0x20
2000 #define MBX_SET_VARIABLE 0x21
2001 #define MBX_UNREG_D_ID 0x23
2002 #define MBX_KILL_BOARD 0x24
2003 #define MBX_CONFIG_FARP 0x25
2004 #define MBX_BEACON 0x2A
2005 #define MBX_CONFIG_MSI 0x30
2006 #define MBX_HEARTBEAT 0x31
2007 #define MBX_WRITE_VPARMS 0x32
2008 #define MBX_ASYNCEVT_ENABLE 0x33
2009 #define MBX_READ_EVENT_LOG_STATUS 0x37
2010 #define MBX_READ_EVENT_LOG 0x38
2011 #define MBX_WRITE_EVENT_LOG 0x39
2013 #define MBX_PORT_CAPABILITIES 0x3B
2014 #define MBX_PORT_IOV_CONTROL 0x3C
2016 #define MBX_CONFIG_HBQ 0x7C
2017 #define MBX_LOAD_AREA 0x81
2018 #define MBX_RUN_BIU_DIAG64 0x84
2019 #define MBX_CONFIG_PORT 0x88
2020 #define MBX_READ_SPARM64 0x8D
2021 #define MBX_READ_RPI64 0x8F
2022 #define MBX_REG_LOGIN64 0x93
2023 #define MBX_READ_TOPOLOGY 0x95
2024 #define MBX_REG_VPI 0x96
2025 #define MBX_UNREG_VPI 0x97
2027 #define MBX_WRITE_WWN 0x98
2028 #define MBX_SET_DEBUG 0x99
2029 #define MBX_LOAD_EXP_ROM 0x9C
2030 #define MBX_SLI4_CONFIG 0x9B
2031 #define MBX_SLI4_REQ_FTRS 0x9D
2032 #define MBX_MAX_CMDS 0x9E
2033 #define MBX_RESUME_RPI 0x9E
2034 #define MBX_SLI2_CMD_MASK 0x80
2035 #define MBX_REG_VFI 0x9F
2036 #define MBX_REG_FCFI 0xA0
2037 #define MBX_UNREG_VFI 0xA1
2038 #define MBX_UNREG_FCFI 0xA2
2039 #define MBX_INIT_VFI 0xA3
2040 #define MBX_INIT_VPI 0xA4
2041 #define MBX_ACCESS_VDATA 0xA5
2042 #define MBX_REG_FCFI_MRQ 0xAF
2044 #define MBX_AUTH_PORT 0xF8
2045 #define MBX_SECURITY_MGMT 0xF9
2049 #define CMD_RCV_SEQUENCE_CX 0x01
2050 #define CMD_XMIT_SEQUENCE_CR 0x02
2051 #define CMD_XMIT_SEQUENCE_CX 0x03
2052 #define CMD_XMIT_BCAST_CN 0x04
2053 #define CMD_XMIT_BCAST_CX 0x05
2054 #define CMD_QUE_RING_BUF_CN 0x06
2055 #define CMD_QUE_XRI_BUF_CX 0x07
2056 #define CMD_IOCB_CONTINUE_CN 0x08
2057 #define CMD_RET_XRI_BUF_CX 0x09
2058 #define CMD_ELS_REQUEST_CR 0x0A
2059 #define CMD_ELS_REQUEST_CX 0x0B
2060 #define CMD_RCV_ELS_REQ_CX 0x0D
2061 #define CMD_ABORT_XRI_CN 0x0E
2062 #define CMD_ABORT_XRI_CX 0x0F
2063 #define CMD_CLOSE_XRI_CN 0x10
2064 #define CMD_CLOSE_XRI_CX 0x11
2065 #define CMD_CREATE_XRI_CR 0x12
2066 #define CMD_CREATE_XRI_CX 0x13
2067 #define CMD_GET_RPI_CN 0x14
2068 #define CMD_XMIT_ELS_RSP_CX 0x15
2069 #define CMD_GET_RPI_CR 0x16
2070 #define CMD_XRI_ABORTED_CX 0x17
2071 #define CMD_FCP_IWRITE_CR 0x18
2072 #define CMD_FCP_IWRITE_CX 0x19
2073 #define CMD_FCP_IREAD_CR 0x1A
2074 #define CMD_FCP_IREAD_CX 0x1B
2075 #define CMD_FCP_ICMND_CR 0x1C
2076 #define CMD_FCP_ICMND_CX 0x1D
2077 #define CMD_FCP_TSEND_CX 0x1F
2078 #define CMD_FCP_TRECEIVE_CX 0x21
2079 #define CMD_FCP_TRSP_CX 0x23
2080 #define CMD_FCP_AUTO_TRSP_CX 0x29
2082 #define CMD_ADAPTER_MSG 0x20
2083 #define CMD_ADAPTER_DUMP 0x22
2087 #define CMD_ASYNC_STATUS 0x7C
2088 #define CMD_RCV_SEQUENCE64_CX 0x81
2089 #define CMD_XMIT_SEQUENCE64_CR 0x82
2090 #define CMD_XMIT_SEQUENCE64_CX 0x83
2091 #define CMD_XMIT_BCAST64_CN 0x84
2092 #define CMD_XMIT_BCAST64_CX 0x85
2093 #define CMD_QUE_RING_BUF64_CN 0x86
2094 #define CMD_QUE_XRI_BUF64_CX 0x87
2095 #define CMD_IOCB_CONTINUE64_CN 0x88
2096 #define CMD_RET_XRI_BUF64_CX 0x89
2097 #define CMD_ELS_REQUEST64_CR 0x8A
2098 #define CMD_ELS_REQUEST64_CX 0x8B
2099 #define CMD_ABORT_MXRI64_CN 0x8C
2100 #define CMD_RCV_ELS_REQ64_CX 0x8D
2101 #define CMD_XMIT_ELS_RSP64_CX 0x95
2102 #define CMD_XMIT_BLS_RSP64_CX 0x97
2103 #define CMD_FCP_IWRITE64_CR 0x98
2104 #define CMD_FCP_IWRITE64_CX 0x99
2105 #define CMD_FCP_IREAD64_CR 0x9A
2106 #define CMD_FCP_IREAD64_CX 0x9B
2107 #define CMD_FCP_ICMND64_CR 0x9C
2108 #define CMD_FCP_ICMND64_CX 0x9D
2109 #define CMD_FCP_TSEND64_CX 0x9F
2110 #define CMD_FCP_TRECEIVE64_CX 0xA1
2111 #define CMD_FCP_TRSP64_CX 0xA3
2113 #define CMD_QUE_XRI64_CX 0xB3
2114 #define CMD_IOCB_RCV_SEQ64_CX 0xB5
2115 #define CMD_IOCB_RCV_ELS64_CX 0xB7
2116 #define CMD_IOCB_RET_XRI64_CX 0xB9
2117 #define CMD_IOCB_RCV_CONT64_CX 0xBB
2119 #define CMD_GEN_REQUEST64_CR 0xC2
2120 #define CMD_GEN_REQUEST64_CX 0xC3
2123 #define CMD_IOCB_XMIT_MSEQ64_CR 0xB0
2124 #define CMD_IOCB_XMIT_MSEQ64_CX 0xB1
2125 #define CMD_IOCB_RCV_SEQ_LIST64_CX 0xC1
2126 #define CMD_IOCB_RCV_ELS_LIST64_CX 0xCD
2127 #define CMD_IOCB_CLOSE_EXTENDED_CN 0xB6
2128 #define CMD_IOCB_ABORT_EXTENDED_CN 0xBA
2129 #define CMD_IOCB_RET_HBQE64_CN 0xCA
2130 #define CMD_IOCB_FCP_IBIDIR64_CR 0xAC
2131 #define CMD_IOCB_FCP_IBIDIR64_CX 0xAD
2132 #define CMD_IOCB_FCP_ITASKMGT64_CX 0xAF
2133 #define CMD_IOCB_LOGENTRY_CN 0x94
2134 #define CMD_IOCB_LOGENTRY_ASYNC_CN 0x96
2137 #define DSSCMD_IWRITE64_CR 0xF8
2138 #define DSSCMD_IWRITE64_CX 0xF9
2139 #define DSSCMD_IREAD64_CR 0xFA
2140 #define DSSCMD_IREAD64_CX 0xFB
2142 #define CMD_MAX_IOCB_CMD 0xFB
2143 #define CMD_IOCB_MASK 0xff
2151 #define MBX_SUCCESS 0
2168 #define MBXERR_LINK_DOWN 0x33
2169 #define MBXERR_SEC_NO_PERMISSION 0xF02
2172 #define MBX_BUSY 0xffffff /* Attempted cmd to busy Mailbox */
2173 #define MBX_TIMEOUT 0xfffffe /* time-out expired waiting for */
2175 #define TEMPERATURE_OFFSET 0xB0 /* Slim offset for critical temperature event */
2222 uint32_t addrLow; /* Address 0:31 */
2232 LPFC_PG_TYPE_INVALID = 0, /* used to indicate errors */
2239 #define LPFC_PDE5_DESCRIPTOR 0x85
2240 #define LPFC_PDE6_DESCRIPTOR 0x86
2241 #define LPFC_PDE7_DESCRIPTOR 0x87
2244 #define BG_OP_IN_NODIF_OUT_CRC 0x0
2245 #define BG_OP_IN_CRC_OUT_NODIF 0x1
2246 #define BG_OP_IN_NODIF_OUT_CSUM 0x2
2247 #define BG_OP_IN_CSUM_OUT_NODIF 0x3
2248 #define BG_OP_IN_CRC_OUT_CRC 0x4
2249 #define BG_OP_IN_CSUM_OUT_CSUM 0x5
2250 #define BG_OP_IN_CRC_OUT_CSUM 0x6
2251 #define BG_OP_IN_CSUM_OUT_CRC 0x7
2252 #define BG_OP_RAW_MODE 0x8
2257 #define pde5_type_MASK 0x000000ff
2259 #define pde5_rsvd0_SHIFT 0
2260 #define pde5_rsvd0_MASK 0x00ffffff
2269 #define pde6_type_MASK 0x000000ff
2271 #define pde6_rsvd0_SHIFT 0
2272 #define pde6_rsvd0_MASK 0x00ffffff
2276 #define pde6_rsvd1_MASK 0x0000003f
2279 #define pde6_na_MASK 0x00000001
2282 #define pde6_rsvd2_MASK 0x000001FF
2284 #define pde6_apptagtr_SHIFT 0
2285 #define pde6_apptagtr_MASK 0x0000ffff
2289 #define pde6_optx_MASK 0x0000000f
2292 #define pde6_oprx_MASK 0x0000000f
2295 #define pde6_nr_MASK 0x00000001
2298 #define pde6_ce_MASK 0x00000001
2301 #define pde6_re_MASK 0x00000001
2304 #define pde6_ae_MASK 0x00000001
2307 #define pde6_ai_MASK 0x00000001
2310 #define pde6_bs_MASK 0x00000007
2312 #define pde6_apptagval_SHIFT 0
2313 #define pde6_apptagval_MASK 0x0000ffff
2320 #define pde7_type_MASK 0x000000ff
2322 #define pde7_rsvd0_SHIFT 0
2323 #define pde7_rsvd0_MASK 0x00ffffff
2402 /* Structure for MB Command RUN_BIU_DIAG64 (0x84) */
2418 /* Structure for MB command READ_EVENT_LOG (0x38) */
2422 #define lpfc_event_log_MASK 0x00000001
2450 #define FLAGS_TOPOLOGY_MODE_LOOP_PT 0x00 /* Attempt loop then pt-pt */
2451 #define FLAGS_LOCAL_LB 0x01 /* link_flags (=1) ENDEC loopback */
2452 #define FLAGS_TOPOLOGY_MODE_PT_PT 0x02 /* Attempt pt-pt only */
2453 #define FLAGS_TOPOLOGY_MODE_LOOP 0x04 /* Attempt loop only */
2454 #define FLAGS_TOPOLOGY_MODE_PT_LOOP 0x06 /* Attempt pt-pt then loop */
2455 #define FLAGS_UNREG_LOGIN_ALL 0x08 /* UNREG_LOGIN all on link down */
2456 #define FLAGS_LIRP_LILP 0x80 /* LIRP / LILP is disabled */
2458 #define FLAGS_TOPOLOGY_FAILOVER 0x0400 /* Bit 10 */
2459 #define FLAGS_LINK_SPEED 0x0800 /* Bit 11 */
2460 #define FLAGS_IMED_ABORT 0x04000 /* Bit 14 */
2463 #define LINK_SPEED_AUTO 0x0 /* Auto selection */
2464 #define LINK_SPEED_1G 0x1 /* 1 Gigabaud */
2465 #define LINK_SPEED_2G 0x2 /* 2 Gigabaud */
2466 #define LINK_SPEED_4G 0x4 /* 4 Gigabaud */
2467 #define LINK_SPEED_8G 0x8 /* 8 Gigabaud */
2468 #define LINK_SPEED_10G 0x10 /* 10 Gigabaud */
2469 #define LINK_SPEED_16G 0x11 /* 16 Gigabaud */
2470 #define LINK_SPEED_32G 0x14 /* 32 Gigabaud */
2471 #define LINK_SPEED_64G 0x17 /* 64 Gigabaud */
2472 #define LINK_SPEED_128G 0x1A /* 128 Gigabaud */
2473 #define LINK_SPEED_256G 0x1D /* 256 Gigabaud */
2650 #define LMT_RESERVED 0x000 /* Not used */
2651 #define LMT_1Gb 0x004
2652 #define LMT_2Gb 0x008
2653 #define LMT_4Gb 0x040
2654 #define LMT_8Gb 0x080
2655 #define LMT_10Gb 0x100
2656 #define LMT_16Gb 0x200
2657 #define LMT_32Gb 0x400
2658 #define LMT_64Gb 0x800
2659 #define LMT_128Gb 0x1000
2660 #define LMT_256Gb 0x2000
2726 /* Structure for MB Command READ_SPARM64 (0x8D) */
2747 RD_ST_CC = 0x01,
2748 RD_ST_XKB = 0x80,
2752 RD_ST_XMIT_XKB_MASK = 0x3fffff,
2756 RD_ST_RCV_XKB_MASK = 0x3fffff,
2760 u8 clear_counters; /* rsvd 7:1, cc 0 */
2763 u8 xkb; /* xkb 7, rsvd 6:0 */
2783 u32 xmit_xkb; /* rsvd 31:22, xmit_xkb 21:0 */
2784 u32 rcv_xkb; /* rsvd 31:22, rcv_xkb 21:0 */
2788 /* Structure for MB Command READ_RPI64 (0x8F) */
2927 #define lpfc_read_link_stat_rec_SHIFT 0
2928 #define lpfc_read_link_stat_rec_MASK 0x1
2932 #define lpfc_read_link_stat_gec_MASK 0x1
2936 #define lpfc_read_link_stat_w02oftow23of_MASK 0x3FFFFF
2940 #define lpfc_read_link_stat_rsvd_MASK 0x1F
2944 #define lpfc_read_link_stat_gec2_MASK 0x1
2948 #define lpfc_read_link_stat_clrc_MASK 0x1
2952 #define lpfc_read_link_stat_clof_MASK 0x1
2980 /* Structure for MB Command REG_LOGIN64 (0x93) */
3050 /* Structure for MB Command REG_VPI (0x96) */
3073 /* Structure for MB Command UNREG_VPI (0x97) */
3095 /* Structure for MB Command UNREG_D_ID (0x23) */
3112 /* Structure for MB Command READ_TOPOLOGY (0x95) */
3117 #define lpfc_mbx_read_top_fa_MASK 0x00000001
3120 #define lpfc_mbx_read_top_mm_MASK 0x00000001
3123 #define lpfc_mbx_read_top_pb_MASK 0X00000001
3126 #define lpfc_mbx_read_top_il_MASK 0x00000001
3128 #define lpfc_mbx_read_top_att_type_SHIFT 0
3129 #define lpfc_mbx_read_top_att_type_MASK 0x000000FF
3131 #define LPFC_ATT_RESERVED 0x00 /* Reserved - attType */
3132 #define LPFC_ATT_LINK_UP 0x01 /* Link is up */
3133 #define LPFC_ATT_LINK_DOWN 0x02 /* Link is down */
3134 #define LPFC_ATT_UNEXP_WWPN 0x06 /* Link is down Unexpected WWWPN */
3137 #define lpfc_mbx_read_top_alpa_granted_MASK 0x000000FF
3140 #define lpfc_mbx_read_top_lip_alps_MASK 0x000000FF
3143 #define lpfc_mbx_read_top_lip_type_MASK 0x000000FF
3145 #define lpfc_mbx_read_top_topology_SHIFT 0
3146 #define lpfc_mbx_read_top_topology_MASK 0x000000FF
3148 #define LPFC_TOPOLOGY_PT_PT 0x01 /* Topology is pt-pt / pt-fabric */
3149 #define LPFC_TOPOLOGY_LOOP 0x02 /* Topology is FC-AL */
3155 #define lpfc_mbx_read_top_ld_lu_MASK 0x00000001
3158 #define lpfc_mbx_read_top_ld_tf_MASK 0x00000001
3161 #define lpfc_mbx_read_top_ld_link_spd_MASK 0x000000FF
3164 #define lpfc_mbx_read_top_ld_nl_port_MASK 0x0000000F
3167 #define lpfc_mbx_read_top_ld_tx_MASK 0x00000003
3169 #define lpfc_mbx_read_top_ld_rx_SHIFT 0
3170 #define lpfc_mbx_read_top_ld_rx_MASK 0x00000003
3174 #define lpfc_mbx_read_top_lu_MASK 0x00000001
3177 #define lpfc_mbx_read_top_tf_MASK 0x00000001
3180 #define lpfc_mbx_read_top_link_spd_MASK 0x000000FF
3183 #define lpfc_mbx_read_top_nl_port_MASK 0x0000000F
3186 #define lpfc_mbx_read_top_tx_MASK 0x00000003
3188 #define lpfc_mbx_read_top_rx_SHIFT 0
3189 #define lpfc_mbx_read_top_rx_MASK 0x00000003
3191 #define LPFC_LINK_SPEED_UNKNOWN 0x0
3192 #define LPFC_LINK_SPEED_1GHZ 0x04
3193 #define LPFC_LINK_SPEED_2GHZ 0x08
3194 #define LPFC_LINK_SPEED_4GHZ 0x10
3195 #define LPFC_LINK_SPEED_8GHZ 0x20
3196 #define LPFC_LINK_SPEED_10GHZ 0x40
3197 #define LPFC_LINK_SPEED_16GHZ 0x80
3198 #define LPFC_LINK_SPEED_32GHZ 0x90
3199 #define LPFC_LINK_SPEED_64GHZ 0xA0
3200 #define LPFC_LINK_SPEED_128GHZ 0xB0
3201 #define LPFC_LINK_SPEED_256GHZ 0xC0
3237 #define DMP_MEM_REG 0x1
3238 #define DMP_NV_PARAMS 0x2
3239 #define DMP_LMSD 0x3 /* Link Module Serial Data */
3240 #define DMP_WELL_KNOWN 0x4
3242 #define DMP_REGION_VPD 0xe
3243 #define DMP_VPD_SIZE 0x400 /* maximum amount of VPD */
3244 #define DMP_RSP_OFFSET 0x14 /* word 5 contains first word of rsp */
3245 #define DMP_RSP_SIZE 0x6C /* maximum of 27 words of rsp data */
3247 #define DMP_REGION_VPORT 0x16 /* VPort info region */
3248 #define DMP_VPORT_REGION_SIZE 0x200
3249 #define DMP_MBOX_OFFSET_WORD 0x5
3251 #define DMP_REGION_23 0x17 /* fcoe param and port state region */
3252 #define DMP_RGN23_SIZE 0x400
3262 #define VPORT_INFO_SIG 0x32324752
3263 #define VPORT_INFO_REV_MASK 0xff
3264 #define VPORT_INFO_REV 0x1
3294 /* Structure for MB Command UPDATE_CFG (0x1B) */
3465 /* Structure for MB Command CONFIG_PORT (0x88) */
3473 uint32_t pcbLen : 24; /* bit 23:0 of memory based port
3476 uint32_t pcbLen : 24; /* bit 23:0 of memory based port
3485 uint32_t pcbLow; /* bit 31:0 of memory based port config block */
3579 /* Structure for MB Command CONFIG_MSI (0x30) */
3616 #define SLIMOFF 0x30 /* WORD */
3631 #define TYPE_NATIVE_SLI2 0x01
3633 #define FEATURE_INITIAL_SLI2 0x01
3640 #define FEATURE_INITIAL_SLI2 0x01
3642 #define TYPE_NATIVE_SLI2 0x01
3683 /* Structure for MB Command MBX_ASYNCEVT_ENABLE (0x33) */
3688 uint32_t ring:2; /* Ring for ASYNC_EVENT iocb Bits 0-1*/
3690 uint32_t ring:2; /* Ring for ASYNC_EVENT iocb Bits 0-1*/
3701 #define MAILBOX_HBA_EXT_OFFSET 0x100
3731 UNREG_D_ID_VAR varUnregDID; /* cmd = 0x23 (UNREG_D_ID) */
3732 CONFIG_FARP_VAR varCfgFarp; /* cmd = 0x25 (CONFIG_FARP)
3735 struct config_hbq_var varCfgHbq;/* cmd = 0x7c (CONFIG_HBQ) */
3736 struct update_cfg_var varUpdateCfg; /* cmd = 0x1B (UPDATE_CFG)*/
3737 CONFIG_PORT_VAR varCfgPort; /* cmd = 0x88 (CONFIG_PORT) */
3738 struct lpfc_mbx_read_top varReadTop; /* cmd = 0x95 (READ_TOPOLOGY) */
3739 REG_VPI_VAR varRegVpi; /* cmd = 0x96 (REG_VPI) */
3740 UNREG_VPI_VAR varUnregVpi; /* cmd = 0x97 (UNREG_VPI) */
3742 struct READ_EVENT_LOG_VAR varRdEventLog; /* cmd = 0x38
3828 #define RJT_BAD_D_ID 0x01 /* Invalid D_ID field */
3829 #define RJT_BAD_S_ID 0x02 /* Invalid S_ID field */
3830 #define RJT_UNAVAIL_TEMP 0x03 /* N_Port unavailable temp. */
3831 #define RJT_UNAVAIL_PERM 0x04 /* N_Port unavailable perm. */
3832 #define RJT_UNSUP_CLASS 0x05 /* Class not supported */
3833 #define RJT_DELIM_ERR 0x06 /* Delimiter usage error */
3834 #define RJT_UNSUP_TYPE 0x07 /* Type not supported */
3835 #define RJT_BAD_CONTROL 0x08 /* Invalid link conrtol */
3836 #define RJT_BAD_RCTL 0x09 /* R_CTL invalid */
3837 #define RJT_BAD_FCTL 0x0A /* F_CTL invalid */
3838 #define RJT_BAD_OXID 0x0B /* OX_ID invalid */
3839 #define RJT_BAD_RXID 0x0C /* RX_ID invalid */
3840 #define RJT_BAD_SEQID 0x0D /* SEQ_ID invalid */
3841 #define RJT_BAD_DFCTL 0x0E /* DF_CTL invalid */
3842 #define RJT_BAD_SEQCNT 0x0F /* SEQ_CNT invalid */
3843 #define RJT_BAD_PARM 0x10 /* Param. field invalid */
3844 #define RJT_XCHG_ERR 0x11 /* Exchange error */
3845 #define RJT_PROT_ERR 0x12 /* Protocol error */
3846 #define RJT_BAD_LENGTH 0x13 /* Invalid Length */
3847 #define RJT_UNEXPECTED_ACK 0x14 /* Unexpected ACK */
3848 #define RJT_LOGIN_REQUIRED 0x16 /* Login required */
3849 #define RJT_TOO_MANY_SEQ 0x17 /* Excessive sequences */
3850 #define RJT_XCHG_NOT_STRT 0x18 /* Exchange not started */
3851 #define RJT_UNSUP_SEC_HDR 0x19 /* Security hdr not supported */
3852 #define RJT_UNAVAIL_PATH 0x1A /* Fabric Path not available */
3853 #define RJT_VENDOR_UNIQUE 0xFF /* Vendor unique error */
3855 #define IOERR_SUCCESS 0x00 /* statLocalError */
3856 #define IOERR_MISSING_CONTINUE 0x01
3857 #define IOERR_SEQUENCE_TIMEOUT 0x02
3858 #define IOERR_INTERNAL_ERROR 0x03
3859 #define IOERR_INVALID_RPI 0x04
3860 #define IOERR_NO_XRI 0x05
3861 #define IOERR_ILLEGAL_COMMAND 0x06
3862 #define IOERR_XCHG_DROPPED 0x07
3863 #define IOERR_ILLEGAL_FIELD 0x08
3864 #define IOERR_RPI_SUSPENDED 0x09
3865 #define IOERR_TOO_MANY_BUFFERS 0x0A
3866 #define IOERR_RCV_BUFFER_WAITING 0x0B
3867 #define IOERR_NO_CONNECTION 0x0C
3868 #define IOERR_TX_DMA_FAILED 0x0D
3869 #define IOERR_RX_DMA_FAILED 0x0E
3870 #define IOERR_ILLEGAL_FRAME 0x0F
3871 #define IOERR_EXTRA_DATA 0x10
3872 #define IOERR_NO_RESOURCES 0x11
3873 #define IOERR_RESERVED 0x12
3874 #define IOERR_ILLEGAL_LENGTH 0x13
3875 #define IOERR_UNSUPPORTED_FEATURE 0x14
3876 #define IOERR_ABORT_IN_PROGRESS 0x15
3877 #define IOERR_ABORT_REQUESTED 0x16
3878 #define IOERR_RECEIVE_BUFFER_TIMEOUT 0x17
3879 #define IOERR_LOOP_OPEN_FAILURE 0x18
3880 #define IOERR_RING_RESET 0x19
3881 #define IOERR_LINK_DOWN 0x1A
3882 #define IOERR_CORRUPTED_DATA 0x1B
3883 #define IOERR_CORRUPTED_RPI 0x1C
3884 #define IOERR_OUT_OF_ORDER_DATA 0x1D
3885 #define IOERR_OUT_OF_ORDER_ACK 0x1E
3886 #define IOERR_DUP_FRAME 0x1F
3887 #define IOERR_LINK_CONTROL_FRAME 0x20 /* ACK_N received */
3888 #define IOERR_BAD_HOST_ADDRESS 0x21
3889 #define IOERR_RCV_HDRBUF_WAITING 0x22
3890 #define IOERR_MISSING_HDR_BUFFER 0x23
3891 #define IOERR_MSEQ_CHAIN_CORRUPTED 0x24
3892 #define IOERR_ABORTMULT_REQUESTED 0x25
3893 #define IOERR_BUFFER_SHORTAGE 0x28
3894 #define IOERR_DEFAULT 0x29
3895 #define IOERR_CNT 0x2A
3896 #define IOERR_SLER_FAILURE 0x46
3897 #define IOERR_SLER_CMD_RCV_FAILURE 0x47
3898 #define IOERR_SLER_REC_RJT_ERR 0x48
3899 #define IOERR_SLER_REC_SRR_RETRY_ERR 0x49
3900 #define IOERR_SLER_SRR_RJT_ERR 0x4A
3901 #define IOERR_SLER_RRQ_RJT_ERR 0x4C
3902 #define IOERR_SLER_RRQ_RETRY_ERR 0x4D
3903 #define IOERR_SLER_ABTS_ERR 0x4E
3904 #define IOERR_ELXSEC_KEY_UNWRAP_ERROR 0xF0
3905 #define IOERR_ELXSEC_KEY_UNWRAP_COMPARE_ERROR 0xF1
3906 #define IOERR_ELXSEC_CRYPTO_ERROR 0xF2
3907 #define IOERR_ELXSEC_CRYPTO_COMPARE_ERROR 0xF3
3908 #define IOERR_DRVR_MASK 0x100
3909 #define IOERR_SLI_DOWN 0x101 /* ulpStatus - Driver defined */
3910 #define IOERR_SLI_BRESET 0x102
3911 #define IOERR_SLI_ABORTED 0x103
3912 #define IOERR_PARAM_MASK 0x1ff
3921 uint8_t Fctl; /* Bits 0-7 of IOCB word 5 */
3923 uint8_t Fctl; /* Bits 0-7 of IOCB word 5 */
3929 #define BC 0x02 /* Broadcast Received - Fctl */
3930 #define SI 0x04 /* Sequence Initiative */
3931 #define LA 0x08 /* Ignore Link Attention state */
3932 #define LS 0x80 /* Last Sequence */
3988 #define ABORT_TYPE_ABTX 0x00000000
3989 #define ABORT_TYPE_ABTS 0x00000001
4150 #define ASYNC_TEMP_WARN 0x100
4151 #define ASYNC_TEMP_SAFE 0x101
4152 #define ASYNC_STATUS_CN 0x102
4154 /* IOCB Command template for CMD_IOCB_RCV_ELS64_CX (0xB7)
4155 or CMD_IOCB_RCV_SEQ64_CX (0xB5) */
4182 /* IOCB Command template for QUE_XRI64_CX (0xB3) command */
4201 #define BGS_BIDIR_BG_PROF_MASK 0xff000000
4203 #define BGS_BIDIR_ERR_COND_FLAGS_MASK 0x003f0000
4205 #define BGS_BG_PROFILE_MASK 0x0000ff00
4207 #define BGS_INVALID_PROF_MASK 0x00000020
4209 #define BGS_UNINIT_DIF_BLOCK_MASK 0x00000010
4211 #define BGS_HI_WATER_MARK_PRESENT_MASK 0x00000008
4213 #define BGS_REFTAG_ERR_MASK 0x00000004
4215 #define BGS_APPTAG_ERR_MASK 0x00000002
4217 #define BGS_GUARD_ERR_MASK 0x00000001
4218 #define BGS_GUARD_ERR_SHIFT 0
4403 #define PARM_UNUSED 0 /* PU field (Word 4) not used */
4407 #define CLASS1 0 /* Class 1 */
4412 #define IOSTAT_SUCCESS 0x0 /* ulpStatus - HBA defined */
4413 #define IOSTAT_FCP_RSP_ERROR 0x1
4414 #define IOSTAT_REMOTE_STOP 0x2
4415 #define IOSTAT_LOCAL_REJECT 0x3
4416 #define IOSTAT_NPORT_RJT 0x4
4417 #define IOSTAT_FABRIC_RJT 0x5
4418 #define IOSTAT_NPORT_BSY 0x6
4419 #define IOSTAT_FABRIC_BSY 0x7
4420 #define IOSTAT_INTERMED_RSP 0x8
4421 #define IOSTAT_LS_RJT 0x9
4422 #define IOSTAT_BA_RJT 0xA
4423 #define IOSTAT_RSVD1 0xB
4424 #define IOSTAT_RSVD2 0xC
4425 #define IOSTAT_RSVD3 0xD
4426 #define IOSTAT_RSVD4 0xE
4427 #define IOSTAT_NEED_BUFFER 0xF
4428 #define IOSTAT_DRIVER_REJECT 0x10 /* ulpStatus - Driver defined */
4429 #define IOSTAT_DEFAULT 0xF /* Same as rsvd5 for now */
4430 #define IOSTAT_CNT 0x11
4466 * 0 => FALSE
4483 return 0; in lpfc_is_LC_HBA()