aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hw4.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hw4.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_hw4.h131
1 files changed, 116 insertions, 15 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 3689eee04535..1585148a17e5 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -194,6 +194,26 @@ struct lpfc_sli4_flags {
194#define lpfc_fip_flag_WORD word0 194#define lpfc_fip_flag_WORD word0
195}; 195};
196 196
197struct sli4_bls_acc {
198 uint32_t word0_rsvd; /* Word0 must be reserved */
199 uint32_t word1;
200#define lpfc_abts_orig_SHIFT 0
201#define lpfc_abts_orig_MASK 0x00000001
202#define lpfc_abts_orig_WORD word1
203#define LPFC_ABTS_UNSOL_RSP 1
204#define LPFC_ABTS_UNSOL_INT 0
205 uint32_t word2;
206#define lpfc_abts_rxid_SHIFT 0
207#define lpfc_abts_rxid_MASK 0x0000FFFF
208#define lpfc_abts_rxid_WORD word2
209#define lpfc_abts_oxid_SHIFT 16
210#define lpfc_abts_oxid_MASK 0x0000FFFF
211#define lpfc_abts_oxid_WORD word2
212 uint32_t word3;
213 uint32_t word4;
214 uint32_t word5_rsvd; /* Word5 must be reserved */
215};
216
197/* event queue entry structure */ 217/* event queue entry structure */
198struct lpfc_eqe { 218struct lpfc_eqe {
199 uint32_t word0; 219 uint32_t word0;
@@ -425,7 +445,7 @@ struct lpfc_wqe_generic{
425#define lpfc_wqe_gen_status_MASK 0x0000000F 445#define lpfc_wqe_gen_status_MASK 0x0000000F
426#define lpfc_wqe_gen_status_WORD word7 446#define lpfc_wqe_gen_status_WORD word7
427#define lpfc_wqe_gen_ct_SHIFT 2 447#define lpfc_wqe_gen_ct_SHIFT 2
428#define lpfc_wqe_gen_ct_MASK 0x00000007 448#define lpfc_wqe_gen_ct_MASK 0x00000003
429#define lpfc_wqe_gen_ct_WORD word7 449#define lpfc_wqe_gen_ct_WORD word7
430 uint32_t abort_tag; 450 uint32_t abort_tag;
431 uint32_t word9; 451 uint32_t word9;
@@ -453,6 +473,13 @@ struct lpfc_wqe_generic{
453#define lpfc_wqe_gen_wqec_SHIFT 7 473#define lpfc_wqe_gen_wqec_SHIFT 7
454#define lpfc_wqe_gen_wqec_MASK 0x00000001 474#define lpfc_wqe_gen_wqec_MASK 0x00000001
455#define lpfc_wqe_gen_wqec_WORD word11 475#define lpfc_wqe_gen_wqec_WORD word11
476#define ELS_ID_FLOGI 3
477#define ELS_ID_FDISC 2
478#define ELS_ID_LOGO 1
479#define ELS_ID_DEFAULT 0
480#define lpfc_wqe_gen_els_id_SHIFT 4
481#define lpfc_wqe_gen_els_id_MASK 0x00000003
482#define lpfc_wqe_gen_els_id_WORD word11
456#define lpfc_wqe_gen_cmd_type_SHIFT 0 483#define lpfc_wqe_gen_cmd_type_SHIFT 0
457#define lpfc_wqe_gen_cmd_type_MASK 0x0000000F 484#define lpfc_wqe_gen_cmd_type_MASK 0x0000000F
458#define lpfc_wqe_gen_cmd_type_WORD word11 485#define lpfc_wqe_gen_cmd_type_WORD word11
@@ -487,8 +514,8 @@ struct lpfc_register {
487 514
488#define LPFC_UERR_STATUS_HI 0x00A4 515#define LPFC_UERR_STATUS_HI 0x00A4
489#define LPFC_UERR_STATUS_LO 0x00A0 516#define LPFC_UERR_STATUS_LO 0x00A0
490#define LPFC_ONLINE0 0x00B0 517#define LPFC_UE_MASK_HI 0x00AC
491#define LPFC_ONLINE1 0x00B4 518#define LPFC_UE_MASK_LO 0x00A8
492#define LPFC_SCRATCHPAD 0x0058 519#define LPFC_SCRATCHPAD 0x0058
493 520
494/* BAR0 Registers */ 521/* BAR0 Registers */
@@ -760,6 +787,7 @@ struct mbox_header {
760#define LPFC_MBOX_OPCODE_MQ_DESTROY 0x35 787#define LPFC_MBOX_OPCODE_MQ_DESTROY 0x35
761#define LPFC_MBOX_OPCODE_CQ_DESTROY 0x36 788#define LPFC_MBOX_OPCODE_CQ_DESTROY 0x36
762#define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37 789#define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37
790#define LPFC_MBOX_OPCODE_QUERY_FW_CFG 0x3A
763#define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D 791#define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D
764 792
765/* FCoE Opcodes */ 793/* FCoE Opcodes */
@@ -1273,6 +1301,51 @@ struct lpfc_mbx_del_fcf_tbl_entry {
1273#define lpfc_mbx_del_fcf_tbl_index_WORD word10 1301#define lpfc_mbx_del_fcf_tbl_index_WORD word10
1274}; 1302};
1275 1303
1304struct lpfc_mbx_query_fw_cfg {
1305 struct mbox_header header;
1306 uint32_t config_number;
1307 uint32_t asic_rev;
1308 uint32_t phys_port;
1309 uint32_t function_mode;
1310/* firmware Function Mode */
1311#define lpfc_function_mode_toe_SHIFT 0
1312#define lpfc_function_mode_toe_MASK 0x00000001
1313#define lpfc_function_mode_toe_WORD function_mode
1314#define lpfc_function_mode_nic_SHIFT 1
1315#define lpfc_function_mode_nic_MASK 0x00000001
1316#define lpfc_function_mode_nic_WORD function_mode
1317#define lpfc_function_mode_rdma_SHIFT 2
1318#define lpfc_function_mode_rdma_MASK 0x00000001
1319#define lpfc_function_mode_rdma_WORD function_mode
1320#define lpfc_function_mode_vm_SHIFT 3
1321#define lpfc_function_mode_vm_MASK 0x00000001
1322#define lpfc_function_mode_vm_WORD function_mode
1323#define lpfc_function_mode_iscsi_i_SHIFT 4
1324#define lpfc_function_mode_iscsi_i_MASK 0x00000001
1325#define lpfc_function_mode_iscsi_i_WORD function_mode
1326#define lpfc_function_mode_iscsi_t_SHIFT 5
1327#define lpfc_function_mode_iscsi_t_MASK 0x00000001
1328#define lpfc_function_mode_iscsi_t_WORD function_mode
1329#define lpfc_function_mode_fcoe_i_SHIFT 6
1330#define lpfc_function_mode_fcoe_i_MASK 0x00000001
1331#define lpfc_function_mode_fcoe_i_WORD function_mode
1332#define lpfc_function_mode_fcoe_t_SHIFT 7
1333#define lpfc_function_mode_fcoe_t_MASK 0x00000001
1334#define lpfc_function_mode_fcoe_t_WORD function_mode
1335#define lpfc_function_mode_dal_SHIFT 8
1336#define lpfc_function_mode_dal_MASK 0x00000001
1337#define lpfc_function_mode_dal_WORD function_mode
1338#define lpfc_function_mode_lro_SHIFT 9
1339#define lpfc_function_mode_lro_MASK 0x00000001
1340#define lpfc_function_mode_lro_WORD function_mode9
1341#define lpfc_function_mode_flex10_SHIFT 10
1342#define lpfc_function_mode_flex10_MASK 0x00000001
1343#define lpfc_function_mode_flex10_WORD function_mode
1344#define lpfc_function_mode_ncsi_SHIFT 11
1345#define lpfc_function_mode_ncsi_MASK 0x00000001
1346#define lpfc_function_mode_ncsi_WORD function_mode
1347};
1348
1276/* Status field for embedded SLI_CONFIG mailbox command */ 1349/* Status field for embedded SLI_CONFIG mailbox command */
1277#define STATUS_SUCCESS 0x0 1350#define STATUS_SUCCESS 0x0
1278#define STATUS_FAILED 0x1 1351#define STATUS_FAILED 0x1
@@ -1349,8 +1422,7 @@ struct lpfc_mbx_reg_vfi {
1349#define lpfc_reg_vfi_fcfi_SHIFT 0 1422#define lpfc_reg_vfi_fcfi_SHIFT 0
1350#define lpfc_reg_vfi_fcfi_MASK 0x0000FFFF 1423#define lpfc_reg_vfi_fcfi_MASK 0x0000FFFF
1351#define lpfc_reg_vfi_fcfi_WORD word2 1424#define lpfc_reg_vfi_fcfi_WORD word2
1352 uint32_t word3_rsvd; 1425 uint32_t wwn[2];
1353 uint32_t word4_rsvd;
1354 struct ulp_bde64 bde; 1426 struct ulp_bde64 bde;
1355 uint32_t word8_rsvd; 1427 uint32_t word8_rsvd;
1356 uint32_t word9_rsvd; 1428 uint32_t word9_rsvd;
@@ -1555,6 +1627,11 @@ struct lpfc_mbx_read_rev {
1555#define lpfc_mbx_rd_rev_fcoe_SHIFT 20 1627#define lpfc_mbx_rd_rev_fcoe_SHIFT 20
1556#define lpfc_mbx_rd_rev_fcoe_MASK 0x00000001 1628#define lpfc_mbx_rd_rev_fcoe_MASK 0x00000001
1557#define lpfc_mbx_rd_rev_fcoe_WORD word1 1629#define lpfc_mbx_rd_rev_fcoe_WORD word1
1630#define lpfc_mbx_rd_rev_cee_ver_SHIFT 21
1631#define lpfc_mbx_rd_rev_cee_ver_MASK 0x00000003
1632#define lpfc_mbx_rd_rev_cee_ver_WORD word1
1633#define LPFC_PREDCBX_CEE_MODE 0
1634#define LPFC_DCBX_CEE_MODE 1
1558#define lpfc_mbx_rd_rev_vpd_SHIFT 29 1635#define lpfc_mbx_rd_rev_vpd_SHIFT 29
1559#define lpfc_mbx_rd_rev_vpd_MASK 0x00000001 1636#define lpfc_mbx_rd_rev_vpd_MASK 0x00000001
1560#define lpfc_mbx_rd_rev_vpd_WORD word1 1637#define lpfc_mbx_rd_rev_vpd_WORD word1
@@ -1804,6 +1881,7 @@ struct lpfc_mqe {
1804 struct lpfc_mbx_read_config rd_config; 1881 struct lpfc_mbx_read_config rd_config;
1805 struct lpfc_mbx_request_features req_ftrs; 1882 struct lpfc_mbx_request_features req_ftrs;
1806 struct lpfc_mbx_post_hdr_tmpl hdr_tmpl; 1883 struct lpfc_mbx_post_hdr_tmpl hdr_tmpl;
1884 struct lpfc_mbx_query_fw_cfg query_fw_cfg;
1807 struct lpfc_mbx_nop nop; 1885 struct lpfc_mbx_nop nop;
1808 } un; 1886 } un;
1809}; 1887};
@@ -1885,7 +1963,7 @@ struct lpfc_acqe_link {
1885}; 1963};
1886 1964
1887struct lpfc_acqe_fcoe { 1965struct lpfc_acqe_fcoe {
1888 uint32_t fcf_index; 1966 uint32_t index;
1889 uint32_t word1; 1967 uint32_t word1;
1890#define lpfc_acqe_fcoe_fcf_count_SHIFT 0 1968#define lpfc_acqe_fcoe_fcf_count_SHIFT 0
1891#define lpfc_acqe_fcoe_fcf_count_MASK 0x0000FFFF 1969#define lpfc_acqe_fcoe_fcf_count_MASK 0x0000FFFF
@@ -1896,6 +1974,7 @@ struct lpfc_acqe_fcoe {
1896#define LPFC_FCOE_EVENT_TYPE_NEW_FCF 0x1 1974#define LPFC_FCOE_EVENT_TYPE_NEW_FCF 0x1
1897#define LPFC_FCOE_EVENT_TYPE_FCF_TABLE_FULL 0x2 1975#define LPFC_FCOE_EVENT_TYPE_FCF_TABLE_FULL 0x2
1898#define LPFC_FCOE_EVENT_TYPE_FCF_DEAD 0x3 1976#define LPFC_FCOE_EVENT_TYPE_FCF_DEAD 0x3
1977#define LPFC_FCOE_EVENT_TYPE_CVL 0x4
1899 uint32_t event_tag; 1978 uint32_t event_tag;
1900 uint32_t trailer; 1979 uint32_t trailer;
1901}; 1980};
@@ -1921,12 +2000,13 @@ struct lpfc_bmbx_create {
1921#define SGL_ALIGN_SZ 64 2000#define SGL_ALIGN_SZ 64
1922#define SGL_PAGE_SIZE 4096 2001#define SGL_PAGE_SIZE 4096
1923/* align SGL addr on a size boundary - adjust address up */ 2002/* align SGL addr on a size boundary - adjust address up */
1924#define NO_XRI ((uint16_t)-1) 2003#define NO_XRI ((uint16_t)-1)
2004
1925struct wqe_common { 2005struct wqe_common {
1926 uint32_t word6; 2006 uint32_t word6;
1927#define wqe_xri_SHIFT 0 2007#define wqe_xri_tag_SHIFT 0
1928#define wqe_xri_MASK 0x0000FFFF 2008#define wqe_xri_tag_MASK 0x0000FFFF
1929#define wqe_xri_WORD word6 2009#define wqe_xri_tag_WORD word6
1930#define wqe_ctxt_tag_SHIFT 16 2010#define wqe_ctxt_tag_SHIFT 16
1931#define wqe_ctxt_tag_MASK 0x0000FFFF 2011#define wqe_ctxt_tag_MASK 0x0000FFFF
1932#define wqe_ctxt_tag_WORD word6 2012#define wqe_ctxt_tag_WORD word6
@@ -1987,7 +2067,7 @@ struct wqe_common {
1987#define wqe_wqec_MASK 0x00000001 2067#define wqe_wqec_MASK 0x00000001
1988#define wqe_wqec_WORD word11 2068#define wqe_wqec_WORD word11
1989#define wqe_cqid_SHIFT 16 2069#define wqe_cqid_SHIFT 16
1990#define wqe_cqid_MASK 0x000003ff 2070#define wqe_cqid_MASK 0x0000ffff
1991#define wqe_cqid_WORD word11 2071#define wqe_cqid_WORD word11
1992}; 2072};
1993 2073
@@ -1996,6 +2076,9 @@ struct wqe_did {
1996#define wqe_els_did_SHIFT 0 2076#define wqe_els_did_SHIFT 0
1997#define wqe_els_did_MASK 0x00FFFFFF 2077#define wqe_els_did_MASK 0x00FFFFFF
1998#define wqe_els_did_WORD word5 2078#define wqe_els_did_WORD word5
2079#define wqe_xmit_bls_pt_SHIFT 28
2080#define wqe_xmit_bls_pt_MASK 0x00000003
2081#define wqe_xmit_bls_pt_WORD word5
1999#define wqe_xmit_bls_ar_SHIFT 30 2082#define wqe_xmit_bls_ar_SHIFT 30
2000#define wqe_xmit_bls_ar_MASK 0x00000001 2083#define wqe_xmit_bls_ar_MASK 0x00000001
2001#define wqe_xmit_bls_ar_WORD word5 2084#define wqe_xmit_bls_ar_WORD word5
@@ -2044,6 +2127,23 @@ struct xmit_els_rsp64_wqe {
2044 2127
2045struct xmit_bls_rsp64_wqe { 2128struct xmit_bls_rsp64_wqe {
2046 uint32_t payload0; 2129 uint32_t payload0;
2130/* Payload0 for BA_ACC */
2131#define xmit_bls_rsp64_acc_seq_id_SHIFT 16
2132#define xmit_bls_rsp64_acc_seq_id_MASK 0x000000ff
2133#define xmit_bls_rsp64_acc_seq_id_WORD payload0
2134#define xmit_bls_rsp64_acc_seq_id_vald_SHIFT 24
2135#define xmit_bls_rsp64_acc_seq_id_vald_MASK 0x000000ff
2136#define xmit_bls_rsp64_acc_seq_id_vald_WORD payload0
2137/* Payload0 for BA_RJT */
2138#define xmit_bls_rsp64_rjt_vspec_SHIFT 0
2139#define xmit_bls_rsp64_rjt_vspec_MASK 0x000000ff
2140#define xmit_bls_rsp64_rjt_vspec_WORD payload0
2141#define xmit_bls_rsp64_rjt_expc_SHIFT 8
2142#define xmit_bls_rsp64_rjt_expc_MASK 0x000000ff
2143#define xmit_bls_rsp64_rjt_expc_WORD payload0
2144#define xmit_bls_rsp64_rjt_rsnc_SHIFT 16
2145#define xmit_bls_rsp64_rjt_rsnc_MASK 0x000000ff
2146#define xmit_bls_rsp64_rjt_rsnc_WORD payload0
2047 uint32_t word1; 2147 uint32_t word1;
2048#define xmit_bls_rsp64_rxid_SHIFT 0 2148#define xmit_bls_rsp64_rxid_SHIFT 0
2049#define xmit_bls_rsp64_rxid_MASK 0x0000ffff 2149#define xmit_bls_rsp64_rxid_MASK 0x0000ffff
@@ -2052,18 +2152,19 @@ struct xmit_bls_rsp64_wqe {
2052#define xmit_bls_rsp64_oxid_MASK 0x0000ffff 2152#define xmit_bls_rsp64_oxid_MASK 0x0000ffff
2053#define xmit_bls_rsp64_oxid_WORD word1 2153#define xmit_bls_rsp64_oxid_WORD word1
2054 uint32_t word2; 2154 uint32_t word2;
2055#define xmit_bls_rsp64_seqcntlo_SHIFT 0 2155#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 2156#define xmit_bls_rsp64_seqcnthi_MASK 0x0000ffff
2060#define xmit_bls_rsp64_seqcnthi_WORD word2 2157#define xmit_bls_rsp64_seqcnthi_WORD word2
2158#define xmit_bls_rsp64_seqcntlo_SHIFT 16
2159#define xmit_bls_rsp64_seqcntlo_MASK 0x0000ffff
2160#define xmit_bls_rsp64_seqcntlo_WORD word2
2061 uint32_t rsrvd3; 2161 uint32_t rsrvd3;
2062 uint32_t rsrvd4; 2162 uint32_t rsrvd4;
2063 struct wqe_did wqe_dest; 2163 struct wqe_did wqe_dest;
2064 struct wqe_common wqe_com; /* words 6-11 */ 2164 struct wqe_common wqe_com; /* words 6-11 */
2065 uint32_t rsvd_12_15[4]; 2165 uint32_t rsvd_12_15[4];
2066}; 2166};
2167
2067struct wqe_rctl_dfctl { 2168struct wqe_rctl_dfctl {
2068 uint32_t word5; 2169 uint32_t word5;
2069#define wqe_si_SHIFT 2 2170#define wqe_si_SHIFT 2