diff options
author | James Smart <James.Smart@Emulex.Com> | 2009-10-02 15:16:45 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-04 13:01:40 -0500 |
commit | 6669f9bb902b8c3f5e33cb8c32c8c0eec6ed68ed (patch) | |
tree | e143e916abc71ff3c7edb7a5508d480391efc1ee /drivers/scsi/lpfc/lpfc_hw4.h | |
parent | 4d9ab994e214d35107017c342aca42477b137316 (diff) |
[SCSI] lpfc 8.3.5: fix VPI registration, error clean up and add support for vlink events
This patch includes the following fixes and new features:
- Fix mask size for CT field in WQE
- Fix VPI base not used when unregistering VPI on port 1.
- Fix UNREG_VPI mailbox command to unreg the correct VPI
- Fixed Check for aborted els command
- Fix error when trying to load driver with wrong firmware on FCoE HBA.
- Fix bug with probe_one routines not putting the Scsi_Host back upon error
- Add support for Clear Virtual Link Async Events
- Add support for unsolicited CT exchange sequence abort
- Add 0x0714 OCeXXXXX PCI ID
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hw4.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw4.h | 89 |
1 files changed, 79 insertions, 10 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index 3689eee04535..0c65091110cc 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h | |||
@@ -425,7 +425,7 @@ struct lpfc_wqe_generic{ | |||
425 | #define lpfc_wqe_gen_status_MASK 0x0000000F | 425 | #define lpfc_wqe_gen_status_MASK 0x0000000F |
426 | #define lpfc_wqe_gen_status_WORD word7 | 426 | #define lpfc_wqe_gen_status_WORD word7 |
427 | #define lpfc_wqe_gen_ct_SHIFT 2 | 427 | #define lpfc_wqe_gen_ct_SHIFT 2 |
428 | #define lpfc_wqe_gen_ct_MASK 0x00000007 | 428 | #define lpfc_wqe_gen_ct_MASK 0x00000003 |
429 | #define lpfc_wqe_gen_ct_WORD word7 | 429 | #define lpfc_wqe_gen_ct_WORD word7 |
430 | uint32_t abort_tag; | 430 | uint32_t abort_tag; |
431 | uint32_t word9; | 431 | uint32_t word9; |
@@ -760,6 +760,7 @@ struct mbox_header { | |||
760 | #define LPFC_MBOX_OPCODE_MQ_DESTROY 0x35 | 760 | #define LPFC_MBOX_OPCODE_MQ_DESTROY 0x35 |
761 | #define LPFC_MBOX_OPCODE_CQ_DESTROY 0x36 | 761 | #define LPFC_MBOX_OPCODE_CQ_DESTROY 0x36 |
762 | #define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37 | 762 | #define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37 |
763 | #define LPFC_MBOX_OPCODE_QUERY_FW_CFG 0x3A | ||
763 | #define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D | 764 | #define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D |
764 | 765 | ||
765 | /* FCoE Opcodes */ | 766 | /* FCoE Opcodes */ |
@@ -1273,6 +1274,51 @@ struct lpfc_mbx_del_fcf_tbl_entry { | |||
1273 | #define lpfc_mbx_del_fcf_tbl_index_WORD word10 | 1274 | #define lpfc_mbx_del_fcf_tbl_index_WORD word10 |
1274 | }; | 1275 | }; |
1275 | 1276 | ||
1277 | struct lpfc_mbx_query_fw_cfg { | ||
1278 | struct mbox_header header; | ||
1279 | uint32_t config_number; | ||
1280 | uint32_t asic_rev; | ||
1281 | uint32_t phys_port; | ||
1282 | uint32_t function_mode; | ||
1283 | /* firmware Function Mode */ | ||
1284 | #define lpfc_function_mode_toe_SHIFT 0 | ||
1285 | #define lpfc_function_mode_toe_MASK 0x00000001 | ||
1286 | #define lpfc_function_mode_toe_WORD function_mode | ||
1287 | #define lpfc_function_mode_nic_SHIFT 1 | ||
1288 | #define lpfc_function_mode_nic_MASK 0x00000001 | ||
1289 | #define lpfc_function_mode_nic_WORD function_mode | ||
1290 | #define lpfc_function_mode_rdma_SHIFT 2 | ||
1291 | #define lpfc_function_mode_rdma_MASK 0x00000001 | ||
1292 | #define lpfc_function_mode_rdma_WORD function_mode | ||
1293 | #define lpfc_function_mode_vm_SHIFT 3 | ||
1294 | #define lpfc_function_mode_vm_MASK 0x00000001 | ||
1295 | #define lpfc_function_mode_vm_WORD function_mode | ||
1296 | #define lpfc_function_mode_iscsi_i_SHIFT 4 | ||
1297 | #define lpfc_function_mode_iscsi_i_MASK 0x00000001 | ||
1298 | #define lpfc_function_mode_iscsi_i_WORD function_mode | ||
1299 | #define lpfc_function_mode_iscsi_t_SHIFT 5 | ||
1300 | #define lpfc_function_mode_iscsi_t_MASK 0x00000001 | ||
1301 | #define lpfc_function_mode_iscsi_t_WORD function_mode | ||
1302 | #define lpfc_function_mode_fcoe_i_SHIFT 6 | ||
1303 | #define lpfc_function_mode_fcoe_i_MASK 0x00000001 | ||
1304 | #define lpfc_function_mode_fcoe_i_WORD function_mode | ||
1305 | #define lpfc_function_mode_fcoe_t_SHIFT 7 | ||
1306 | #define lpfc_function_mode_fcoe_t_MASK 0x00000001 | ||
1307 | #define lpfc_function_mode_fcoe_t_WORD function_mode | ||
1308 | #define lpfc_function_mode_dal_SHIFT 8 | ||
1309 | #define lpfc_function_mode_dal_MASK 0x00000001 | ||
1310 | #define lpfc_function_mode_dal_WORD function_mode | ||
1311 | #define lpfc_function_mode_lro_SHIFT 9 | ||
1312 | #define lpfc_function_mode_lro_MASK 0x00000001 | ||
1313 | #define lpfc_function_mode_lro_WORD function_mode9 | ||
1314 | #define lpfc_function_mode_flex10_SHIFT 10 | ||
1315 | #define lpfc_function_mode_flex10_MASK 0x00000001 | ||
1316 | #define lpfc_function_mode_flex10_WORD function_mode | ||
1317 | #define lpfc_function_mode_ncsi_SHIFT 11 | ||
1318 | #define lpfc_function_mode_ncsi_MASK 0x00000001 | ||
1319 | #define lpfc_function_mode_ncsi_WORD function_mode | ||
1320 | }; | ||
1321 | |||
1276 | /* Status field for embedded SLI_CONFIG mailbox command */ | 1322 | /* Status field for embedded SLI_CONFIG mailbox command */ |
1277 | #define STATUS_SUCCESS 0x0 | 1323 | #define STATUS_SUCCESS 0x0 |
1278 | #define STATUS_FAILED 0x1 | 1324 | #define STATUS_FAILED 0x1 |
@@ -1804,6 +1850,7 @@ struct lpfc_mqe { | |||
1804 | struct lpfc_mbx_read_config rd_config; | 1850 | struct lpfc_mbx_read_config rd_config; |
1805 | struct lpfc_mbx_request_features req_ftrs; | 1851 | struct lpfc_mbx_request_features req_ftrs; |
1806 | struct lpfc_mbx_post_hdr_tmpl hdr_tmpl; | 1852 | struct lpfc_mbx_post_hdr_tmpl hdr_tmpl; |
1853 | struct lpfc_mbx_query_fw_cfg query_fw_cfg; | ||
1807 | struct lpfc_mbx_nop nop; | 1854 | struct lpfc_mbx_nop nop; |
1808 | } un; | 1855 | } un; |
1809 | }; | 1856 | }; |
@@ -1885,7 +1932,7 @@ struct lpfc_acqe_link { | |||
1885 | }; | 1932 | }; |
1886 | 1933 | ||
1887 | struct lpfc_acqe_fcoe { | 1934 | struct lpfc_acqe_fcoe { |
1888 | uint32_t fcf_index; | 1935 | uint32_t index; |
1889 | uint32_t word1; | 1936 | uint32_t word1; |
1890 | #define lpfc_acqe_fcoe_fcf_count_SHIFT 0 | 1937 | #define lpfc_acqe_fcoe_fcf_count_SHIFT 0 |
1891 | #define lpfc_acqe_fcoe_fcf_count_MASK 0x0000FFFF | 1938 | #define lpfc_acqe_fcoe_fcf_count_MASK 0x0000FFFF |
@@ -1896,6 +1943,7 @@ struct lpfc_acqe_fcoe { | |||
1896 | #define LPFC_FCOE_EVENT_TYPE_NEW_FCF 0x1 | 1943 | #define LPFC_FCOE_EVENT_TYPE_NEW_FCF 0x1 |
1897 | #define LPFC_FCOE_EVENT_TYPE_FCF_TABLE_FULL 0x2 | 1944 | #define LPFC_FCOE_EVENT_TYPE_FCF_TABLE_FULL 0x2 |
1898 | #define LPFC_FCOE_EVENT_TYPE_FCF_DEAD 0x3 | 1945 | #define LPFC_FCOE_EVENT_TYPE_FCF_DEAD 0x3 |
1946 | #define LPFC_FCOE_EVENT_TYPE_CVL 0x4 | ||
1899 | uint32_t event_tag; | 1947 | uint32_t event_tag; |
1900 | uint32_t trailer; | 1948 | uint32_t trailer; |
1901 | }; | 1949 | }; |
@@ -1924,9 +1972,9 @@ struct lpfc_bmbx_create { | |||
1924 | #define NO_XRI ((uint16_t)-1) | 1972 | #define NO_XRI ((uint16_t)-1) |
1925 | struct wqe_common { | 1973 | struct wqe_common { |
1926 | uint32_t word6; | 1974 | uint32_t word6; |
1927 | #define wqe_xri_SHIFT 0 | 1975 | #define wqe_xri_tag_SHIFT 0 |
1928 | #define wqe_xri_MASK 0x0000FFFF | 1976 | #define wqe_xri_tag_MASK 0x0000FFFF |
1929 | #define wqe_xri_WORD word6 | 1977 | #define wqe_xri_tag_WORD word6 |
1930 | #define wqe_ctxt_tag_SHIFT 16 | 1978 | #define wqe_ctxt_tag_SHIFT 16 |
1931 | #define wqe_ctxt_tag_MASK 0x0000FFFF | 1979 | #define wqe_ctxt_tag_MASK 0x0000FFFF |
1932 | #define wqe_ctxt_tag_WORD word6 | 1980 | #define wqe_ctxt_tag_WORD word6 |
@@ -1987,7 +2035,7 @@ struct wqe_common { | |||
1987 | #define wqe_wqec_MASK 0x00000001 | 2035 | #define wqe_wqec_MASK 0x00000001 |
1988 | #define wqe_wqec_WORD word11 | 2036 | #define wqe_wqec_WORD word11 |
1989 | #define wqe_cqid_SHIFT 16 | 2037 | #define wqe_cqid_SHIFT 16 |
1990 | #define wqe_cqid_MASK 0x000003ff | 2038 | #define wqe_cqid_MASK 0x0000ffff |
1991 | #define wqe_cqid_WORD word11 | 2039 | #define wqe_cqid_WORD word11 |
1992 | }; | 2040 | }; |
1993 | 2041 | ||
@@ -1996,6 +2044,9 @@ struct wqe_did { | |||
1996 | #define wqe_els_did_SHIFT 0 | 2044 | #define wqe_els_did_SHIFT 0 |
1997 | #define wqe_els_did_MASK 0x00FFFFFF | 2045 | #define wqe_els_did_MASK 0x00FFFFFF |
1998 | #define wqe_els_did_WORD word5 | 2046 | #define wqe_els_did_WORD word5 |
2047 | #define wqe_xmit_bls_pt_SHIFT 28 | ||
2048 | #define wqe_xmit_bls_pt_MASK 0x00000003 | ||
2049 | #define wqe_xmit_bls_pt_WORD word5 | ||
1999 | #define wqe_xmit_bls_ar_SHIFT 30 | 2050 | #define wqe_xmit_bls_ar_SHIFT 30 |
2000 | #define wqe_xmit_bls_ar_MASK 0x00000001 | 2051 | #define wqe_xmit_bls_ar_MASK 0x00000001 |
2001 | #define wqe_xmit_bls_ar_WORD word5 | 2052 | #define wqe_xmit_bls_ar_WORD word5 |
@@ -2044,6 +2095,23 @@ struct xmit_els_rsp64_wqe { | |||
2044 | 2095 | ||
2045 | struct xmit_bls_rsp64_wqe { | 2096 | struct xmit_bls_rsp64_wqe { |
2046 | uint32_t payload0; | 2097 | uint32_t payload0; |
2098 | /* Payload0 for BA_ACC */ | ||
2099 | #define xmit_bls_rsp64_acc_seq_id_SHIFT 16 | ||
2100 | #define xmit_bls_rsp64_acc_seq_id_MASK 0x000000ff | ||
2101 | #define xmit_bls_rsp64_acc_seq_id_WORD payload0 | ||
2102 | #define xmit_bls_rsp64_acc_seq_id_vald_SHIFT 24 | ||
2103 | #define xmit_bls_rsp64_acc_seq_id_vald_MASK 0x000000ff | ||
2104 | #define xmit_bls_rsp64_acc_seq_id_vald_WORD payload0 | ||
2105 | /* Payload0 for BA_RJT */ | ||
2106 | #define xmit_bls_rsp64_rjt_vspec_SHIFT 0 | ||
2107 | #define xmit_bls_rsp64_rjt_vspec_MASK 0x000000ff | ||
2108 | #define xmit_bls_rsp64_rjt_vspec_WORD payload0 | ||
2109 | #define xmit_bls_rsp64_rjt_expc_SHIFT 8 | ||
2110 | #define xmit_bls_rsp64_rjt_expc_MASK 0x000000ff | ||
2111 | #define xmit_bls_rsp64_rjt_expc_WORD payload0 | ||
2112 | #define xmit_bls_rsp64_rjt_rsnc_SHIFT 16 | ||
2113 | #define xmit_bls_rsp64_rjt_rsnc_MASK 0x000000ff | ||
2114 | #define xmit_bls_rsp64_rjt_rsnc_WORD payload0 | ||
2047 | uint32_t word1; | 2115 | uint32_t word1; |
2048 | #define xmit_bls_rsp64_rxid_SHIFT 0 | 2116 | #define xmit_bls_rsp64_rxid_SHIFT 0 |
2049 | #define xmit_bls_rsp64_rxid_MASK 0x0000ffff | 2117 | #define xmit_bls_rsp64_rxid_MASK 0x0000ffff |
@@ -2052,18 +2120,19 @@ struct xmit_bls_rsp64_wqe { | |||
2052 | #define xmit_bls_rsp64_oxid_MASK 0x0000ffff | 2120 | #define xmit_bls_rsp64_oxid_MASK 0x0000ffff |
2053 | #define xmit_bls_rsp64_oxid_WORD word1 | 2121 | #define xmit_bls_rsp64_oxid_WORD word1 |
2054 | uint32_t word2; | 2122 | uint32_t word2; |
2055 | #define xmit_bls_rsp64_seqcntlo_SHIFT 0 | 2123 | #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 | 2124 | #define xmit_bls_rsp64_seqcnthi_MASK 0x0000ffff |
2060 | #define xmit_bls_rsp64_seqcnthi_WORD word2 | 2125 | #define xmit_bls_rsp64_seqcnthi_WORD word2 |
2126 | #define xmit_bls_rsp64_seqcntlo_SHIFT 16 | ||
2127 | #define xmit_bls_rsp64_seqcntlo_MASK 0x0000ffff | ||
2128 | #define xmit_bls_rsp64_seqcntlo_WORD word2 | ||
2061 | uint32_t rsrvd3; | 2129 | uint32_t rsrvd3; |
2062 | uint32_t rsrvd4; | 2130 | uint32_t rsrvd4; |
2063 | struct wqe_did wqe_dest; | 2131 | struct wqe_did wqe_dest; |
2064 | struct wqe_common wqe_com; /* words 6-11 */ | 2132 | struct wqe_common wqe_com; /* words 6-11 */ |
2065 | uint32_t rsvd_12_15[4]; | 2133 | uint32_t rsvd_12_15[4]; |
2066 | }; | 2134 | }; |
2135 | |||
2067 | struct wqe_rctl_dfctl { | 2136 | struct wqe_rctl_dfctl { |
2068 | uint32_t word5; | 2137 | uint32_t word5; |
2069 | #define wqe_si_SHIFT 2 | 2138 | #define wqe_si_SHIFT 2 |