diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/scsi/lpfc/lpfc_hw4.h | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hw4.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw4.h | 399 |
1 files changed, 341 insertions, 58 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index 3689eee04535..820015fbc4d6 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h | |||
@@ -52,35 +52,37 @@ struct dma_address { | |||
52 | uint32_t addr_hi; | 52 | uint32_t addr_hi; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | #define LPFC_SLIREV_CONF_WORD 0x58 | ||
56 | struct lpfc_sli_intf { | 55 | struct lpfc_sli_intf { |
57 | uint32_t word0; | 56 | uint32_t word0; |
58 | #define lpfc_sli_intf_iftype_MASK 0x00000007 | 57 | #define lpfc_sli_intf_valid_SHIFT 29 |
59 | #define lpfc_sli_intf_iftype_SHIFT 0 | 58 | #define lpfc_sli_intf_valid_MASK 0x00000007 |
60 | #define lpfc_sli_intf_iftype_WORD word0 | 59 | #define lpfc_sli_intf_valid_WORD word0 |
61 | #define lpfc_sli_intf_rev_MASK 0x0000000f | ||
62 | #define lpfc_sli_intf_rev_SHIFT 4 | ||
63 | #define lpfc_sli_intf_rev_WORD word0 | ||
64 | #define LPFC_SLIREV_CONF_SLI4 4 | ||
65 | #define lpfc_sli_intf_family_MASK 0x000000ff | ||
66 | #define lpfc_sli_intf_family_SHIFT 8 | ||
67 | #define lpfc_sli_intf_family_WORD word0 | ||
68 | #define lpfc_sli_intf_feat1_MASK 0x000000ff | ||
69 | #define lpfc_sli_intf_feat1_SHIFT 16 | ||
70 | #define lpfc_sli_intf_feat1_WORD word0 | ||
71 | #define lpfc_sli_intf_feat2_MASK 0x0000001f | ||
72 | #define lpfc_sli_intf_feat2_SHIFT 24 | ||
73 | #define lpfc_sli_intf_feat2_WORD word0 | ||
74 | #define lpfc_sli_intf_valid_MASK 0x00000007 | ||
75 | #define lpfc_sli_intf_valid_SHIFT 29 | ||
76 | #define lpfc_sli_intf_valid_WORD word0 | ||
77 | #define LPFC_SLI_INTF_VALID 6 | 60 | #define LPFC_SLI_INTF_VALID 6 |
61 | #define lpfc_sli_intf_featurelevel2_SHIFT 24 | ||
62 | #define lpfc_sli_intf_featurelevel2_MASK 0x0000001F | ||
63 | #define lpfc_sli_intf_featurelevel2_WORD word0 | ||
64 | #define lpfc_sli_intf_featurelevel1_SHIFT 16 | ||
65 | #define lpfc_sli_intf_featurelevel1_MASK 0x000000FF | ||
66 | #define lpfc_sli_intf_featurelevel1_WORD word0 | ||
67 | #define LPFC_SLI_INTF_FEATURELEVEL1_1 1 | ||
68 | #define LPFC_SLI_INTF_FEATURELEVEL1_2 2 | ||
69 | #define lpfc_sli_intf_sli_family_SHIFT 8 | ||
70 | #define lpfc_sli_intf_sli_family_MASK 0x000000FF | ||
71 | #define lpfc_sli_intf_sli_family_WORD word0 | ||
72 | #define LPFC_SLI_INTF_FAMILY_BE2 0 | ||
73 | #define LPFC_SLI_INTF_FAMILY_BE3 1 | ||
74 | #define lpfc_sli_intf_slirev_SHIFT 4 | ||
75 | #define lpfc_sli_intf_slirev_MASK 0x0000000F | ||
76 | #define lpfc_sli_intf_slirev_WORD word0 | ||
77 | #define LPFC_SLI_INTF_REV_SLI3 3 | ||
78 | #define LPFC_SLI_INTF_REV_SLI4 4 | ||
79 | #define lpfc_sli_intf_if_type_SHIFT 0 | ||
80 | #define lpfc_sli_intf_if_type_MASK 0x00000007 | ||
81 | #define lpfc_sli_intf_if_type_WORD word0 | ||
82 | #define LPFC_SLI_INTF_IF_TYPE_0 0 | ||
83 | #define LPFC_SLI_INTF_IF_TYPE_1 1 | ||
78 | }; | 84 | }; |
79 | 85 | ||
80 | #define LPFC_SLI4_BAR0 1 | ||
81 | #define LPFC_SLI4_BAR1 2 | ||
82 | #define LPFC_SLI4_BAR2 4 | ||
83 | |||
84 | #define LPFC_SLI4_MBX_EMBED true | 86 | #define LPFC_SLI4_MBX_EMBED true |
85 | #define LPFC_SLI4_MBX_NEMBED false | 87 | #define LPFC_SLI4_MBX_NEMBED false |
86 | 88 | ||
@@ -161,6 +163,9 @@ struct lpfc_sli_intf { | |||
161 | #define LPFC_FP_DEF_IMAX 10000 | 163 | #define LPFC_FP_DEF_IMAX 10000 |
162 | #define LPFC_SP_DEF_IMAX 10000 | 164 | #define LPFC_SP_DEF_IMAX 10000 |
163 | 165 | ||
166 | /* PORT_CAPABILITIES constants. */ | ||
167 | #define LPFC_MAX_SUPPORTED_PAGES 8 | ||
168 | |||
164 | struct ulp_bde64 { | 169 | struct ulp_bde64 { |
165 | union ULP_BDE_TUS { | 170 | union ULP_BDE_TUS { |
166 | uint32_t w; | 171 | uint32_t w; |
@@ -194,6 +199,26 @@ struct lpfc_sli4_flags { | |||
194 | #define lpfc_fip_flag_WORD word0 | 199 | #define lpfc_fip_flag_WORD word0 |
195 | }; | 200 | }; |
196 | 201 | ||
202 | struct sli4_bls_acc { | ||
203 | uint32_t word0_rsvd; /* Word0 must be reserved */ | ||
204 | uint32_t word1; | ||
205 | #define lpfc_abts_orig_SHIFT 0 | ||
206 | #define lpfc_abts_orig_MASK 0x00000001 | ||
207 | #define lpfc_abts_orig_WORD word1 | ||
208 | #define LPFC_ABTS_UNSOL_RSP 1 | ||
209 | #define LPFC_ABTS_UNSOL_INT 0 | ||
210 | uint32_t word2; | ||
211 | #define lpfc_abts_rxid_SHIFT 0 | ||
212 | #define lpfc_abts_rxid_MASK 0x0000FFFF | ||
213 | #define lpfc_abts_rxid_WORD word2 | ||
214 | #define lpfc_abts_oxid_SHIFT 16 | ||
215 | #define lpfc_abts_oxid_MASK 0x0000FFFF | ||
216 | #define lpfc_abts_oxid_WORD word2 | ||
217 | uint32_t word3; | ||
218 | uint32_t word4; | ||
219 | uint32_t word5_rsvd; /* Word5 must be reserved */ | ||
220 | }; | ||
221 | |||
197 | /* event queue entry structure */ | 222 | /* event queue entry structure */ |
198 | struct lpfc_eqe { | 223 | struct lpfc_eqe { |
199 | uint32_t word0; | 224 | uint32_t word0; |
@@ -425,7 +450,7 @@ struct lpfc_wqe_generic{ | |||
425 | #define lpfc_wqe_gen_status_MASK 0x0000000F | 450 | #define lpfc_wqe_gen_status_MASK 0x0000000F |
426 | #define lpfc_wqe_gen_status_WORD word7 | 451 | #define lpfc_wqe_gen_status_WORD word7 |
427 | #define lpfc_wqe_gen_ct_SHIFT 2 | 452 | #define lpfc_wqe_gen_ct_SHIFT 2 |
428 | #define lpfc_wqe_gen_ct_MASK 0x00000007 | 453 | #define lpfc_wqe_gen_ct_MASK 0x00000003 |
429 | #define lpfc_wqe_gen_ct_WORD word7 | 454 | #define lpfc_wqe_gen_ct_WORD word7 |
430 | uint32_t abort_tag; | 455 | uint32_t abort_tag; |
431 | uint32_t word9; | 456 | uint32_t word9; |
@@ -453,6 +478,13 @@ struct lpfc_wqe_generic{ | |||
453 | #define lpfc_wqe_gen_wqec_SHIFT 7 | 478 | #define lpfc_wqe_gen_wqec_SHIFT 7 |
454 | #define lpfc_wqe_gen_wqec_MASK 0x00000001 | 479 | #define lpfc_wqe_gen_wqec_MASK 0x00000001 |
455 | #define lpfc_wqe_gen_wqec_WORD word11 | 480 | #define lpfc_wqe_gen_wqec_WORD word11 |
481 | #define ELS_ID_FLOGI 3 | ||
482 | #define ELS_ID_FDISC 2 | ||
483 | #define ELS_ID_LOGO 1 | ||
484 | #define ELS_ID_DEFAULT 0 | ||
485 | #define lpfc_wqe_gen_els_id_SHIFT 4 | ||
486 | #define lpfc_wqe_gen_els_id_MASK 0x00000003 | ||
487 | #define lpfc_wqe_gen_els_id_WORD word11 | ||
456 | #define lpfc_wqe_gen_cmd_type_SHIFT 0 | 488 | #define lpfc_wqe_gen_cmd_type_SHIFT 0 |
457 | #define lpfc_wqe_gen_cmd_type_MASK 0x0000000F | 489 | #define lpfc_wqe_gen_cmd_type_MASK 0x0000000F |
458 | #define lpfc_wqe_gen_cmd_type_WORD word11 | 490 | #define lpfc_wqe_gen_cmd_type_WORD word11 |
@@ -487,9 +519,9 @@ struct lpfc_register { | |||
487 | 519 | ||
488 | #define LPFC_UERR_STATUS_HI 0x00A4 | 520 | #define LPFC_UERR_STATUS_HI 0x00A4 |
489 | #define LPFC_UERR_STATUS_LO 0x00A0 | 521 | #define LPFC_UERR_STATUS_LO 0x00A0 |
490 | #define LPFC_ONLINE0 0x00B0 | 522 | #define LPFC_UE_MASK_HI 0x00AC |
491 | #define LPFC_ONLINE1 0x00B4 | 523 | #define LPFC_UE_MASK_LO 0x00A8 |
492 | #define LPFC_SCRATCHPAD 0x0058 | 524 | #define LPFC_SLI_INTF 0x0058 |
493 | 525 | ||
494 | /* BAR0 Registers */ | 526 | /* BAR0 Registers */ |
495 | #define LPFC_HST_STATE 0x00AC | 527 | #define LPFC_HST_STATE 0x00AC |
@@ -549,19 +581,6 @@ struct lpfc_register { | |||
549 | #define LPFC_POST_STAGE_ARMFW_READY 0xC000 | 581 | #define LPFC_POST_STAGE_ARMFW_READY 0xC000 |
550 | #define LPFC_POST_STAGE_ARMFW_UE 0xF000 | 582 | #define LPFC_POST_STAGE_ARMFW_UE 0xF000 |
551 | 583 | ||
552 | #define lpfc_scratchpad_slirev_SHIFT 4 | ||
553 | #define lpfc_scratchpad_slirev_MASK 0xF | ||
554 | #define lpfc_scratchpad_slirev_WORD word0 | ||
555 | #define lpfc_scratchpad_chiptype_SHIFT 8 | ||
556 | #define lpfc_scratchpad_chiptype_MASK 0xFF | ||
557 | #define lpfc_scratchpad_chiptype_WORD word0 | ||
558 | #define lpfc_scratchpad_featurelevel1_SHIFT 16 | ||
559 | #define lpfc_scratchpad_featurelevel1_MASK 0xFF | ||
560 | #define lpfc_scratchpad_featurelevel1_WORD word0 | ||
561 | #define lpfc_scratchpad_featurelevel2_SHIFT 24 | ||
562 | #define lpfc_scratchpad_featurelevel2_MASK 0xFF | ||
563 | #define lpfc_scratchpad_featurelevel2_WORD word0 | ||
564 | |||
565 | /* BAR1 Registers */ | 584 | /* BAR1 Registers */ |
566 | #define LPFC_IMR_MASK_ALL 0xFFFFFFFF | 585 | #define LPFC_IMR_MASK_ALL 0xFFFFFFFF |
567 | #define LPFC_ISCR_CLEAR_ALL 0xFFFFFFFF | 586 | #define LPFC_ISCR_CLEAR_ALL 0xFFFFFFFF |
@@ -760,6 +779,7 @@ struct mbox_header { | |||
760 | #define LPFC_MBOX_OPCODE_MQ_DESTROY 0x35 | 779 | #define LPFC_MBOX_OPCODE_MQ_DESTROY 0x35 |
761 | #define LPFC_MBOX_OPCODE_CQ_DESTROY 0x36 | 780 | #define LPFC_MBOX_OPCODE_CQ_DESTROY 0x36 |
762 | #define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37 | 781 | #define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37 |
782 | #define LPFC_MBOX_OPCODE_QUERY_FW_CFG 0x3A | ||
763 | #define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D | 783 | #define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D |
764 | 784 | ||
765 | /* FCoE Opcodes */ | 785 | /* FCoE Opcodes */ |
@@ -773,6 +793,7 @@ struct mbox_header { | |||
773 | #define LPFC_MBOX_OPCODE_FCOE_ADD_FCF 0x09 | 793 | #define LPFC_MBOX_OPCODE_FCOE_ADD_FCF 0x09 |
774 | #define LPFC_MBOX_OPCODE_FCOE_DELETE_FCF 0x0A | 794 | #define LPFC_MBOX_OPCODE_FCOE_DELETE_FCF 0x0A |
775 | #define LPFC_MBOX_OPCODE_FCOE_POST_HDR_TEMPLATE 0x0B | 795 | #define LPFC_MBOX_OPCODE_FCOE_POST_HDR_TEMPLATE 0x0B |
796 | #define LPFC_MBOX_OPCODE_FCOE_REDISCOVER_FCF 0x10 | ||
776 | 797 | ||
777 | /* Mailbox command structures */ | 798 | /* Mailbox command structures */ |
778 | struct eq_context { | 799 | struct eq_context { |
@@ -985,7 +1006,7 @@ struct lpfc_mbx_wq_destroy { | |||
985 | }; | 1006 | }; |
986 | 1007 | ||
987 | #define LPFC_HDR_BUF_SIZE 128 | 1008 | #define LPFC_HDR_BUF_SIZE 128 |
988 | #define LPFC_DATA_BUF_SIZE 4096 | 1009 | #define LPFC_DATA_BUF_SIZE 2048 |
989 | struct rq_context { | 1010 | struct rq_context { |
990 | uint32_t word0; | 1011 | uint32_t word0; |
991 | #define lpfc_rq_context_rq_size_SHIFT 16 | 1012 | #define lpfc_rq_context_rq_size_SHIFT 16 |
@@ -1121,10 +1142,7 @@ struct sli4_sge { /* SLI-4 */ | |||
1121 | this flag !! */ | 1142 | this flag !! */ |
1122 | #define lpfc_sli4_sge_last_MASK 0x00000001 | 1143 | #define lpfc_sli4_sge_last_MASK 0x00000001 |
1123 | #define lpfc_sli4_sge_last_WORD word2 | 1144 | #define lpfc_sli4_sge_last_WORD word2 |
1124 | uint32_t word3; | 1145 | uint32_t sge_len; |
1125 | #define lpfc_sli4_sge_len_SHIFT 0 | ||
1126 | #define lpfc_sli4_sge_len_MASK 0x0001FFFF | ||
1127 | #define lpfc_sli4_sge_len_WORD word3 | ||
1128 | }; | 1146 | }; |
1129 | 1147 | ||
1130 | struct fcf_record { | 1148 | struct fcf_record { |
@@ -1273,6 +1291,64 @@ struct lpfc_mbx_del_fcf_tbl_entry { | |||
1273 | #define lpfc_mbx_del_fcf_tbl_index_WORD word10 | 1291 | #define lpfc_mbx_del_fcf_tbl_index_WORD word10 |
1274 | }; | 1292 | }; |
1275 | 1293 | ||
1294 | struct lpfc_mbx_redisc_fcf_tbl { | ||
1295 | struct mbox_header header; | ||
1296 | uint32_t word10; | ||
1297 | #define lpfc_mbx_redisc_fcf_count_SHIFT 0 | ||
1298 | #define lpfc_mbx_redisc_fcf_count_MASK 0x0000FFFF | ||
1299 | #define lpfc_mbx_redisc_fcf_count_WORD word10 | ||
1300 | uint32_t resvd; | ||
1301 | uint32_t word12; | ||
1302 | #define lpfc_mbx_redisc_fcf_index_SHIFT 0 | ||
1303 | #define lpfc_mbx_redisc_fcf_index_MASK 0x0000FFFF | ||
1304 | #define lpfc_mbx_redisc_fcf_index_WORD word12 | ||
1305 | }; | ||
1306 | |||
1307 | struct lpfc_mbx_query_fw_cfg { | ||
1308 | struct mbox_header header; | ||
1309 | uint32_t config_number; | ||
1310 | uint32_t asic_rev; | ||
1311 | uint32_t phys_port; | ||
1312 | uint32_t function_mode; | ||
1313 | /* firmware Function Mode */ | ||
1314 | #define lpfc_function_mode_toe_SHIFT 0 | ||
1315 | #define lpfc_function_mode_toe_MASK 0x00000001 | ||
1316 | #define lpfc_function_mode_toe_WORD function_mode | ||
1317 | #define lpfc_function_mode_nic_SHIFT 1 | ||
1318 | #define lpfc_function_mode_nic_MASK 0x00000001 | ||
1319 | #define lpfc_function_mode_nic_WORD function_mode | ||
1320 | #define lpfc_function_mode_rdma_SHIFT 2 | ||
1321 | #define lpfc_function_mode_rdma_MASK 0x00000001 | ||
1322 | #define lpfc_function_mode_rdma_WORD function_mode | ||
1323 | #define lpfc_function_mode_vm_SHIFT 3 | ||
1324 | #define lpfc_function_mode_vm_MASK 0x00000001 | ||
1325 | #define lpfc_function_mode_vm_WORD function_mode | ||
1326 | #define lpfc_function_mode_iscsi_i_SHIFT 4 | ||
1327 | #define lpfc_function_mode_iscsi_i_MASK 0x00000001 | ||
1328 | #define lpfc_function_mode_iscsi_i_WORD function_mode | ||
1329 | #define lpfc_function_mode_iscsi_t_SHIFT 5 | ||
1330 | #define lpfc_function_mode_iscsi_t_MASK 0x00000001 | ||
1331 | #define lpfc_function_mode_iscsi_t_WORD function_mode | ||
1332 | #define lpfc_function_mode_fcoe_i_SHIFT 6 | ||
1333 | #define lpfc_function_mode_fcoe_i_MASK 0x00000001 | ||
1334 | #define lpfc_function_mode_fcoe_i_WORD function_mode | ||
1335 | #define lpfc_function_mode_fcoe_t_SHIFT 7 | ||
1336 | #define lpfc_function_mode_fcoe_t_MASK 0x00000001 | ||
1337 | #define lpfc_function_mode_fcoe_t_WORD function_mode | ||
1338 | #define lpfc_function_mode_dal_SHIFT 8 | ||
1339 | #define lpfc_function_mode_dal_MASK 0x00000001 | ||
1340 | #define lpfc_function_mode_dal_WORD function_mode | ||
1341 | #define lpfc_function_mode_lro_SHIFT 9 | ||
1342 | #define lpfc_function_mode_lro_MASK 0x00000001 | ||
1343 | #define lpfc_function_mode_lro_WORD function_mode9 | ||
1344 | #define lpfc_function_mode_flex10_SHIFT 10 | ||
1345 | #define lpfc_function_mode_flex10_MASK 0x00000001 | ||
1346 | #define lpfc_function_mode_flex10_WORD function_mode | ||
1347 | #define lpfc_function_mode_ncsi_SHIFT 11 | ||
1348 | #define lpfc_function_mode_ncsi_MASK 0x00000001 | ||
1349 | #define lpfc_function_mode_ncsi_WORD function_mode | ||
1350 | }; | ||
1351 | |||
1276 | /* Status field for embedded SLI_CONFIG mailbox command */ | 1352 | /* Status field for embedded SLI_CONFIG mailbox command */ |
1277 | #define STATUS_SUCCESS 0x0 | 1353 | #define STATUS_SUCCESS 0x0 |
1278 | #define STATUS_FAILED 0x1 | 1354 | #define STATUS_FAILED 0x1 |
@@ -1298,6 +1374,7 @@ struct lpfc_mbx_del_fcf_tbl_entry { | |||
1298 | #define STATUS_ERROR_ACITMAIN 0x2a | 1374 | #define STATUS_ERROR_ACITMAIN 0x2a |
1299 | #define STATUS_REBOOT_REQUIRED 0x2c | 1375 | #define STATUS_REBOOT_REQUIRED 0x2c |
1300 | #define STATUS_FCF_IN_USE 0x3a | 1376 | #define STATUS_FCF_IN_USE 0x3a |
1377 | #define STATUS_FCF_TABLE_EMPTY 0x43 | ||
1301 | 1378 | ||
1302 | struct lpfc_mbx_sli4_config { | 1379 | struct lpfc_mbx_sli4_config { |
1303 | struct mbox_header header; | 1380 | struct mbox_header header; |
@@ -1349,8 +1426,7 @@ struct lpfc_mbx_reg_vfi { | |||
1349 | #define lpfc_reg_vfi_fcfi_SHIFT 0 | 1426 | #define lpfc_reg_vfi_fcfi_SHIFT 0 |
1350 | #define lpfc_reg_vfi_fcfi_MASK 0x0000FFFF | 1427 | #define lpfc_reg_vfi_fcfi_MASK 0x0000FFFF |
1351 | #define lpfc_reg_vfi_fcfi_WORD word2 | 1428 | #define lpfc_reg_vfi_fcfi_WORD word2 |
1352 | uint32_t word3_rsvd; | 1429 | uint32_t wwn[2]; |
1353 | uint32_t word4_rsvd; | ||
1354 | struct ulp_bde64 bde; | 1430 | struct ulp_bde64 bde; |
1355 | uint32_t word8_rsvd; | 1431 | uint32_t word8_rsvd; |
1356 | uint32_t word9_rsvd; | 1432 | uint32_t word9_rsvd; |
@@ -1555,6 +1631,11 @@ struct lpfc_mbx_read_rev { | |||
1555 | #define lpfc_mbx_rd_rev_fcoe_SHIFT 20 | 1631 | #define lpfc_mbx_rd_rev_fcoe_SHIFT 20 |
1556 | #define lpfc_mbx_rd_rev_fcoe_MASK 0x00000001 | 1632 | #define lpfc_mbx_rd_rev_fcoe_MASK 0x00000001 |
1557 | #define lpfc_mbx_rd_rev_fcoe_WORD word1 | 1633 | #define lpfc_mbx_rd_rev_fcoe_WORD word1 |
1634 | #define lpfc_mbx_rd_rev_cee_ver_SHIFT 21 | ||
1635 | #define lpfc_mbx_rd_rev_cee_ver_MASK 0x00000003 | ||
1636 | #define lpfc_mbx_rd_rev_cee_ver_WORD word1 | ||
1637 | #define LPFC_PREDCBX_CEE_MODE 0 | ||
1638 | #define LPFC_DCBX_CEE_MODE 1 | ||
1558 | #define lpfc_mbx_rd_rev_vpd_SHIFT 29 | 1639 | #define lpfc_mbx_rd_rev_vpd_SHIFT 29 |
1559 | #define lpfc_mbx_rd_rev_vpd_MASK 0x00000001 | 1640 | #define lpfc_mbx_rd_rev_vpd_MASK 0x00000001 |
1560 | #define lpfc_mbx_rd_rev_vpd_WORD word1 | 1641 | #define lpfc_mbx_rd_rev_vpd_WORD word1 |
@@ -1756,6 +1837,177 @@ struct lpfc_mbx_request_features { | |||
1756 | #define lpfc_mbx_rq_ftr_rsp_ifip_WORD word3 | 1837 | #define lpfc_mbx_rq_ftr_rsp_ifip_WORD word3 |
1757 | }; | 1838 | }; |
1758 | 1839 | ||
1840 | struct lpfc_mbx_supp_pages { | ||
1841 | uint32_t word1; | ||
1842 | #define qs_SHIFT 0 | ||
1843 | #define qs_MASK 0x00000001 | ||
1844 | #define qs_WORD word1 | ||
1845 | #define wr_SHIFT 1 | ||
1846 | #define wr_MASK 0x00000001 | ||
1847 | #define wr_WORD word1 | ||
1848 | #define pf_SHIFT 8 | ||
1849 | #define pf_MASK 0x000000ff | ||
1850 | #define pf_WORD word1 | ||
1851 | #define cpn_SHIFT 16 | ||
1852 | #define cpn_MASK 0x000000ff | ||
1853 | #define cpn_WORD word1 | ||
1854 | uint32_t word2; | ||
1855 | #define list_offset_SHIFT 0 | ||
1856 | #define list_offset_MASK 0x000000ff | ||
1857 | #define list_offset_WORD word2 | ||
1858 | #define next_offset_SHIFT 8 | ||
1859 | #define next_offset_MASK 0x000000ff | ||
1860 | #define next_offset_WORD word2 | ||
1861 | #define elem_cnt_SHIFT 16 | ||
1862 | #define elem_cnt_MASK 0x000000ff | ||
1863 | #define elem_cnt_WORD word2 | ||
1864 | uint32_t word3; | ||
1865 | #define pn_0_SHIFT 24 | ||
1866 | #define pn_0_MASK 0x000000ff | ||
1867 | #define pn_0_WORD word3 | ||
1868 | #define pn_1_SHIFT 16 | ||
1869 | #define pn_1_MASK 0x000000ff | ||
1870 | #define pn_1_WORD word3 | ||
1871 | #define pn_2_SHIFT 8 | ||
1872 | #define pn_2_MASK 0x000000ff | ||
1873 | #define pn_2_WORD word3 | ||
1874 | #define pn_3_SHIFT 0 | ||
1875 | #define pn_3_MASK 0x000000ff | ||
1876 | #define pn_3_WORD word3 | ||
1877 | uint32_t word4; | ||
1878 | #define pn_4_SHIFT 24 | ||
1879 | #define pn_4_MASK 0x000000ff | ||
1880 | #define pn_4_WORD word4 | ||
1881 | #define pn_5_SHIFT 16 | ||
1882 | #define pn_5_MASK 0x000000ff | ||
1883 | #define pn_5_WORD word4 | ||
1884 | #define pn_6_SHIFT 8 | ||
1885 | #define pn_6_MASK 0x000000ff | ||
1886 | #define pn_6_WORD word4 | ||
1887 | #define pn_7_SHIFT 0 | ||
1888 | #define pn_7_MASK 0x000000ff | ||
1889 | #define pn_7_WORD word4 | ||
1890 | uint32_t rsvd[27]; | ||
1891 | #define LPFC_SUPP_PAGES 0 | ||
1892 | #define LPFC_BLOCK_GUARD_PROFILES 1 | ||
1893 | #define LPFC_SLI4_PARAMETERS 2 | ||
1894 | }; | ||
1895 | |||
1896 | struct lpfc_mbx_sli4_params { | ||
1897 | uint32_t word1; | ||
1898 | #define qs_SHIFT 0 | ||
1899 | #define qs_MASK 0x00000001 | ||
1900 | #define qs_WORD word1 | ||
1901 | #define wr_SHIFT 1 | ||
1902 | #define wr_MASK 0x00000001 | ||
1903 | #define wr_WORD word1 | ||
1904 | #define pf_SHIFT 8 | ||
1905 | #define pf_MASK 0x000000ff | ||
1906 | #define pf_WORD word1 | ||
1907 | #define cpn_SHIFT 16 | ||
1908 | #define cpn_MASK 0x000000ff | ||
1909 | #define cpn_WORD word1 | ||
1910 | uint32_t word2; | ||
1911 | #define if_type_SHIFT 0 | ||
1912 | #define if_type_MASK 0x00000007 | ||
1913 | #define if_type_WORD word2 | ||
1914 | #define sli_rev_SHIFT 4 | ||
1915 | #define sli_rev_MASK 0x0000000f | ||
1916 | #define sli_rev_WORD word2 | ||
1917 | #define sli_family_SHIFT 8 | ||
1918 | #define sli_family_MASK 0x000000ff | ||
1919 | #define sli_family_WORD word2 | ||
1920 | #define featurelevel_1_SHIFT 16 | ||
1921 | #define featurelevel_1_MASK 0x000000ff | ||
1922 | #define featurelevel_1_WORD word2 | ||
1923 | #define featurelevel_2_SHIFT 24 | ||
1924 | #define featurelevel_2_MASK 0x0000001f | ||
1925 | #define featurelevel_2_WORD word2 | ||
1926 | uint32_t word3; | ||
1927 | #define fcoe_SHIFT 0 | ||
1928 | #define fcoe_MASK 0x00000001 | ||
1929 | #define fcoe_WORD word3 | ||
1930 | #define fc_SHIFT 1 | ||
1931 | #define fc_MASK 0x00000001 | ||
1932 | #define fc_WORD word3 | ||
1933 | #define nic_SHIFT 2 | ||
1934 | #define nic_MASK 0x00000001 | ||
1935 | #define nic_WORD word3 | ||
1936 | #define iscsi_SHIFT 3 | ||
1937 | #define iscsi_MASK 0x00000001 | ||
1938 | #define iscsi_WORD word3 | ||
1939 | #define rdma_SHIFT 4 | ||
1940 | #define rdma_MASK 0x00000001 | ||
1941 | #define rdma_WORD word3 | ||
1942 | uint32_t sge_supp_len; | ||
1943 | uint32_t word5; | ||
1944 | #define if_page_sz_SHIFT 0 | ||
1945 | #define if_page_sz_MASK 0x0000ffff | ||
1946 | #define if_page_sz_WORD word5 | ||
1947 | #define loopbk_scope_SHIFT 24 | ||
1948 | #define loopbk_scope_MASK 0x0000000f | ||
1949 | #define loopbk_scope_WORD word5 | ||
1950 | #define rq_db_window_SHIFT 28 | ||
1951 | #define rq_db_window_MASK 0x0000000f | ||
1952 | #define rq_db_window_WORD word5 | ||
1953 | uint32_t word6; | ||
1954 | #define eq_pages_SHIFT 0 | ||
1955 | #define eq_pages_MASK 0x0000000f | ||
1956 | #define eq_pages_WORD word6 | ||
1957 | #define eqe_size_SHIFT 8 | ||
1958 | #define eqe_size_MASK 0x000000ff | ||
1959 | #define eqe_size_WORD word6 | ||
1960 | uint32_t word7; | ||
1961 | #define cq_pages_SHIFT 0 | ||
1962 | #define cq_pages_MASK 0x0000000f | ||
1963 | #define cq_pages_WORD word7 | ||
1964 | #define cqe_size_SHIFT 8 | ||
1965 | #define cqe_size_MASK 0x000000ff | ||
1966 | #define cqe_size_WORD word7 | ||
1967 | uint32_t word8; | ||
1968 | #define mq_pages_SHIFT 0 | ||
1969 | #define mq_pages_MASK 0x0000000f | ||
1970 | #define mq_pages_WORD word8 | ||
1971 | #define mqe_size_SHIFT 8 | ||
1972 | #define mqe_size_MASK 0x000000ff | ||
1973 | #define mqe_size_WORD word8 | ||
1974 | #define mq_elem_cnt_SHIFT 16 | ||
1975 | #define mq_elem_cnt_MASK 0x000000ff | ||
1976 | #define mq_elem_cnt_WORD word8 | ||
1977 | uint32_t word9; | ||
1978 | #define wq_pages_SHIFT 0 | ||
1979 | #define wq_pages_MASK 0x0000ffff | ||
1980 | #define wq_pages_WORD word9 | ||
1981 | #define wqe_size_SHIFT 8 | ||
1982 | #define wqe_size_MASK 0x000000ff | ||
1983 | #define wqe_size_WORD word9 | ||
1984 | uint32_t word10; | ||
1985 | #define rq_pages_SHIFT 0 | ||
1986 | #define rq_pages_MASK 0x0000ffff | ||
1987 | #define rq_pages_WORD word10 | ||
1988 | #define rqe_size_SHIFT 8 | ||
1989 | #define rqe_size_MASK 0x000000ff | ||
1990 | #define rqe_size_WORD word10 | ||
1991 | uint32_t word11; | ||
1992 | #define hdr_pages_SHIFT 0 | ||
1993 | #define hdr_pages_MASK 0x0000000f | ||
1994 | #define hdr_pages_WORD word11 | ||
1995 | #define hdr_size_SHIFT 8 | ||
1996 | #define hdr_size_MASK 0x0000000f | ||
1997 | #define hdr_size_WORD word11 | ||
1998 | #define hdr_pp_align_SHIFT 16 | ||
1999 | #define hdr_pp_align_MASK 0x0000ffff | ||
2000 | #define hdr_pp_align_WORD word11 | ||
2001 | uint32_t word12; | ||
2002 | #define sgl_pages_SHIFT 0 | ||
2003 | #define sgl_pages_MASK 0x0000000f | ||
2004 | #define sgl_pages_WORD word12 | ||
2005 | #define sgl_pp_align_SHIFT 16 | ||
2006 | #define sgl_pp_align_MASK 0x0000ffff | ||
2007 | #define sgl_pp_align_WORD word12 | ||
2008 | uint32_t rsvd_13_63[51]; | ||
2009 | }; | ||
2010 | |||
1759 | /* Mailbox Completion Queue Error Messages */ | 2011 | /* Mailbox Completion Queue Error Messages */ |
1760 | #define MB_CQE_STATUS_SUCCESS 0x0 | 2012 | #define MB_CQE_STATUS_SUCCESS 0x0 |
1761 | #define MB_CQE_STATUS_INSUFFICIENT_PRIVILEGES 0x1 | 2013 | #define MB_CQE_STATUS_INSUFFICIENT_PRIVILEGES 0x1 |
@@ -1785,6 +2037,7 @@ struct lpfc_mqe { | |||
1785 | struct lpfc_mbx_read_fcf_tbl read_fcf_tbl; | 2037 | struct lpfc_mbx_read_fcf_tbl read_fcf_tbl; |
1786 | struct lpfc_mbx_add_fcf_tbl_entry add_fcf_entry; | 2038 | struct lpfc_mbx_add_fcf_tbl_entry add_fcf_entry; |
1787 | struct lpfc_mbx_del_fcf_tbl_entry del_fcf_entry; | 2039 | struct lpfc_mbx_del_fcf_tbl_entry del_fcf_entry; |
2040 | struct lpfc_mbx_redisc_fcf_tbl redisc_fcf_tbl; | ||
1788 | struct lpfc_mbx_reg_fcfi reg_fcfi; | 2041 | struct lpfc_mbx_reg_fcfi reg_fcfi; |
1789 | struct lpfc_mbx_unreg_fcfi unreg_fcfi; | 2042 | struct lpfc_mbx_unreg_fcfi unreg_fcfi; |
1790 | struct lpfc_mbx_mq_create mq_create; | 2043 | struct lpfc_mbx_mq_create mq_create; |
@@ -1804,6 +2057,9 @@ struct lpfc_mqe { | |||
1804 | struct lpfc_mbx_read_config rd_config; | 2057 | struct lpfc_mbx_read_config rd_config; |
1805 | struct lpfc_mbx_request_features req_ftrs; | 2058 | struct lpfc_mbx_request_features req_ftrs; |
1806 | struct lpfc_mbx_post_hdr_tmpl hdr_tmpl; | 2059 | struct lpfc_mbx_post_hdr_tmpl hdr_tmpl; |
2060 | struct lpfc_mbx_query_fw_cfg query_fw_cfg; | ||
2061 | struct lpfc_mbx_supp_pages supp_pages; | ||
2062 | struct lpfc_mbx_sli4_params sli4_params; | ||
1807 | struct lpfc_mbx_nop nop; | 2063 | struct lpfc_mbx_nop nop; |
1808 | } un; | 2064 | } un; |
1809 | }; | 2065 | }; |
@@ -1880,12 +2136,15 @@ struct lpfc_acqe_link { | |||
1880 | #define LPFC_ASYNC_LINK_FAULT_NONE 0x0 | 2136 | #define LPFC_ASYNC_LINK_FAULT_NONE 0x0 |
1881 | #define LPFC_ASYNC_LINK_FAULT_LOCAL 0x1 | 2137 | #define LPFC_ASYNC_LINK_FAULT_LOCAL 0x1 |
1882 | #define LPFC_ASYNC_LINK_FAULT_REMOTE 0x2 | 2138 | #define LPFC_ASYNC_LINK_FAULT_REMOTE 0x2 |
2139 | #define lpfc_acqe_qos_link_speed_SHIFT 16 | ||
2140 | #define lpfc_acqe_qos_link_speed_MASK 0x0000FFFF | ||
2141 | #define lpfc_acqe_qos_link_speed_WORD word1 | ||
1883 | uint32_t event_tag; | 2142 | uint32_t event_tag; |
1884 | uint32_t trailer; | 2143 | uint32_t trailer; |
1885 | }; | 2144 | }; |
1886 | 2145 | ||
1887 | struct lpfc_acqe_fcoe { | 2146 | struct lpfc_acqe_fcoe { |
1888 | uint32_t fcf_index; | 2147 | uint32_t index; |
1889 | uint32_t word1; | 2148 | uint32_t word1; |
1890 | #define lpfc_acqe_fcoe_fcf_count_SHIFT 0 | 2149 | #define lpfc_acqe_fcoe_fcf_count_SHIFT 0 |
1891 | #define lpfc_acqe_fcoe_fcf_count_MASK 0x0000FFFF | 2150 | #define lpfc_acqe_fcoe_fcf_count_MASK 0x0000FFFF |
@@ -1896,6 +2155,8 @@ struct lpfc_acqe_fcoe { | |||
1896 | #define LPFC_FCOE_EVENT_TYPE_NEW_FCF 0x1 | 2155 | #define LPFC_FCOE_EVENT_TYPE_NEW_FCF 0x1 |
1897 | #define LPFC_FCOE_EVENT_TYPE_FCF_TABLE_FULL 0x2 | 2156 | #define LPFC_FCOE_EVENT_TYPE_FCF_TABLE_FULL 0x2 |
1898 | #define LPFC_FCOE_EVENT_TYPE_FCF_DEAD 0x3 | 2157 | #define LPFC_FCOE_EVENT_TYPE_FCF_DEAD 0x3 |
2158 | #define LPFC_FCOE_EVENT_TYPE_CVL 0x4 | ||
2159 | #define LPFC_FCOE_EVENT_TYPE_FCF_PARAM_MOD 0x5 | ||
1899 | uint32_t event_tag; | 2160 | uint32_t event_tag; |
1900 | uint32_t trailer; | 2161 | uint32_t trailer; |
1901 | }; | 2162 | }; |
@@ -1921,12 +2182,13 @@ struct lpfc_bmbx_create { | |||
1921 | #define SGL_ALIGN_SZ 64 | 2182 | #define SGL_ALIGN_SZ 64 |
1922 | #define SGL_PAGE_SIZE 4096 | 2183 | #define SGL_PAGE_SIZE 4096 |
1923 | /* align SGL addr on a size boundary - adjust address up */ | 2184 | /* align SGL addr on a size boundary - adjust address up */ |
1924 | #define NO_XRI ((uint16_t)-1) | 2185 | #define NO_XRI ((uint16_t)-1) |
2186 | |||
1925 | struct wqe_common { | 2187 | struct wqe_common { |
1926 | uint32_t word6; | 2188 | uint32_t word6; |
1927 | #define wqe_xri_SHIFT 0 | 2189 | #define wqe_xri_tag_SHIFT 0 |
1928 | #define wqe_xri_MASK 0x0000FFFF | 2190 | #define wqe_xri_tag_MASK 0x0000FFFF |
1929 | #define wqe_xri_WORD word6 | 2191 | #define wqe_xri_tag_WORD word6 |
1930 | #define wqe_ctxt_tag_SHIFT 16 | 2192 | #define wqe_ctxt_tag_SHIFT 16 |
1931 | #define wqe_ctxt_tag_MASK 0x0000FFFF | 2193 | #define wqe_ctxt_tag_MASK 0x0000FFFF |
1932 | #define wqe_ctxt_tag_WORD word6 | 2194 | #define wqe_ctxt_tag_WORD word6 |
@@ -1987,7 +2249,7 @@ struct wqe_common { | |||
1987 | #define wqe_wqec_MASK 0x00000001 | 2249 | #define wqe_wqec_MASK 0x00000001 |
1988 | #define wqe_wqec_WORD word11 | 2250 | #define wqe_wqec_WORD word11 |
1989 | #define wqe_cqid_SHIFT 16 | 2251 | #define wqe_cqid_SHIFT 16 |
1990 | #define wqe_cqid_MASK 0x000003ff | 2252 | #define wqe_cqid_MASK 0x0000ffff |
1991 | #define wqe_cqid_WORD word11 | 2253 | #define wqe_cqid_WORD word11 |
1992 | }; | 2254 | }; |
1993 | 2255 | ||
@@ -1996,6 +2258,9 @@ struct wqe_did { | |||
1996 | #define wqe_els_did_SHIFT 0 | 2258 | #define wqe_els_did_SHIFT 0 |
1997 | #define wqe_els_did_MASK 0x00FFFFFF | 2259 | #define wqe_els_did_MASK 0x00FFFFFF |
1998 | #define wqe_els_did_WORD word5 | 2260 | #define wqe_els_did_WORD word5 |
2261 | #define wqe_xmit_bls_pt_SHIFT 28 | ||
2262 | #define wqe_xmit_bls_pt_MASK 0x00000003 | ||
2263 | #define wqe_xmit_bls_pt_WORD word5 | ||
1999 | #define wqe_xmit_bls_ar_SHIFT 30 | 2264 | #define wqe_xmit_bls_ar_SHIFT 30 |
2000 | #define wqe_xmit_bls_ar_MASK 0x00000001 | 2265 | #define wqe_xmit_bls_ar_MASK 0x00000001 |
2001 | #define wqe_xmit_bls_ar_WORD word5 | 2266 | #define wqe_xmit_bls_ar_WORD word5 |
@@ -2044,6 +2309,23 @@ struct xmit_els_rsp64_wqe { | |||
2044 | 2309 | ||
2045 | struct xmit_bls_rsp64_wqe { | 2310 | struct xmit_bls_rsp64_wqe { |
2046 | uint32_t payload0; | 2311 | uint32_t payload0; |
2312 | /* Payload0 for BA_ACC */ | ||
2313 | #define xmit_bls_rsp64_acc_seq_id_SHIFT 16 | ||
2314 | #define xmit_bls_rsp64_acc_seq_id_MASK 0x000000ff | ||
2315 | #define xmit_bls_rsp64_acc_seq_id_WORD payload0 | ||
2316 | #define xmit_bls_rsp64_acc_seq_id_vald_SHIFT 24 | ||
2317 | #define xmit_bls_rsp64_acc_seq_id_vald_MASK 0x000000ff | ||
2318 | #define xmit_bls_rsp64_acc_seq_id_vald_WORD payload0 | ||
2319 | /* Payload0 for BA_RJT */ | ||
2320 | #define xmit_bls_rsp64_rjt_vspec_SHIFT 0 | ||
2321 | #define xmit_bls_rsp64_rjt_vspec_MASK 0x000000ff | ||
2322 | #define xmit_bls_rsp64_rjt_vspec_WORD payload0 | ||
2323 | #define xmit_bls_rsp64_rjt_expc_SHIFT 8 | ||
2324 | #define xmit_bls_rsp64_rjt_expc_MASK 0x000000ff | ||
2325 | #define xmit_bls_rsp64_rjt_expc_WORD payload0 | ||
2326 | #define xmit_bls_rsp64_rjt_rsnc_SHIFT 16 | ||
2327 | #define xmit_bls_rsp64_rjt_rsnc_MASK 0x000000ff | ||
2328 | #define xmit_bls_rsp64_rjt_rsnc_WORD payload0 | ||
2047 | uint32_t word1; | 2329 | uint32_t word1; |
2048 | #define xmit_bls_rsp64_rxid_SHIFT 0 | 2330 | #define xmit_bls_rsp64_rxid_SHIFT 0 |
2049 | #define xmit_bls_rsp64_rxid_MASK 0x0000ffff | 2331 | #define xmit_bls_rsp64_rxid_MASK 0x0000ffff |
@@ -2052,18 +2334,19 @@ struct xmit_bls_rsp64_wqe { | |||
2052 | #define xmit_bls_rsp64_oxid_MASK 0x0000ffff | 2334 | #define xmit_bls_rsp64_oxid_MASK 0x0000ffff |
2053 | #define xmit_bls_rsp64_oxid_WORD word1 | 2335 | #define xmit_bls_rsp64_oxid_WORD word1 |
2054 | uint32_t word2; | 2336 | uint32_t word2; |
2055 | #define xmit_bls_rsp64_seqcntlo_SHIFT 0 | 2337 | #define xmit_bls_rsp64_seqcnthi_SHIFT 0 |
2056 | #define xmit_bls_rsp64_seqcntlo_MASK 0x0000ffff | ||
2057 | #define xmit_bls_rsp64_seqcntlo_WORD word2 | ||
2058 | #define xmit_bls_rsp64_seqcnthi_SHIFT 16 | ||
2059 | #define xmit_bls_rsp64_seqcnthi_MASK 0x0000ffff | 2338 | #define xmit_bls_rsp64_seqcnthi_MASK 0x0000ffff |
2060 | #define xmit_bls_rsp64_seqcnthi_WORD word2 | 2339 | #define xmit_bls_rsp64_seqcnthi_WORD word2 |
2340 | #define xmit_bls_rsp64_seqcntlo_SHIFT 16 | ||
2341 | #define xmit_bls_rsp64_seqcntlo_MASK 0x0000ffff | ||
2342 | #define xmit_bls_rsp64_seqcntlo_WORD word2 | ||
2061 | uint32_t rsrvd3; | 2343 | uint32_t rsrvd3; |
2062 | uint32_t rsrvd4; | 2344 | uint32_t rsrvd4; |
2063 | struct wqe_did wqe_dest; | 2345 | struct wqe_did wqe_dest; |
2064 | struct wqe_common wqe_com; /* words 6-11 */ | 2346 | struct wqe_common wqe_com; /* words 6-11 */ |
2065 | uint32_t rsvd_12_15[4]; | 2347 | uint32_t rsvd_12_15[4]; |
2066 | }; | 2348 | }; |
2349 | |||
2067 | struct wqe_rctl_dfctl { | 2350 | struct wqe_rctl_dfctl { |
2068 | uint32_t word5; | 2351 | uint32_t word5; |
2069 | #define wqe_si_SHIFT 2 | 2352 | #define wqe_si_SHIFT 2 |