aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_hw4.h
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2011-02-16 12:39:24 -0500
committerJames Bottomley <James.Bottomley@suse.de>2011-02-18 13:39:18 -0500
commitfedd3b7b93302c7789bd3eeb190653cfb0fe7645 (patch)
treed4fef56133462b9879c63d15be391b9ea3490d19 /drivers/scsi/lpfc/lpfc_hw4.h
parent382be668c5a284844f9dcbb5b1cb8ffba2386d80 (diff)
[SCSI] lpfc 8.3.21: Critical Errors and Bug Fixes
Critical Errors: - Correctly handle non-zero return lpfc_workq_post_event and return ENOMEM - Save the irq level when locking the host_lock in lpfc_findnode_did Bug Fixes: - Adjust payload_length and request_length for sli4_config mailbox commands. - Add the freed sgl/XRI to the tail of the list rather than to the head. - Set the FC_VPORT_NEEDS_INIT_VPI on vport deletes and check it before issuing a fdisc on an els retry. - Only call lpfc_hba_init_link() if phba->cfg_suppress_link_up is LPFC_INITIALIZE_LINK. - Add support for SLI-4 Performance Hints Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com> 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.h104
1 files changed, 100 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 94c1aa1136de..c7178d60c7bf 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -778,6 +778,7 @@ struct mbox_header {
778#define LPFC_MBOX_OPCODE_QUERY_FW_CFG 0x3A 778#define LPFC_MBOX_OPCODE_QUERY_FW_CFG 0x3A
779#define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D 779#define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D
780#define LPFC_MBOX_OPCODE_MQ_CREATE_EXT 0x5A 780#define LPFC_MBOX_OPCODE_MQ_CREATE_EXT 0x5A
781#define LPFC_MBOX_OPCODE_GET_SLI4_PARAMETERS 0xB5
781 782
782/* FCoE Opcodes */ 783/* FCoE Opcodes */
783#define LPFC_MBOX_OPCODE_FCOE_WQ_CREATE 0x01 784#define LPFC_MBOX_OPCODE_FCOE_WQ_CREATE 0x01
@@ -1852,6 +1853,9 @@ struct lpfc_mbx_request_features {
1852#define lpfc_mbx_rq_ftr_rq_ifip_SHIFT 7 1853#define lpfc_mbx_rq_ftr_rq_ifip_SHIFT 7
1853#define lpfc_mbx_rq_ftr_rq_ifip_MASK 0x00000001 1854#define lpfc_mbx_rq_ftr_rq_ifip_MASK 0x00000001
1854#define lpfc_mbx_rq_ftr_rq_ifip_WORD word2 1855#define lpfc_mbx_rq_ftr_rq_ifip_WORD word2
1856#define lpfc_mbx_rq_ftr_rq_perfh_SHIFT 11
1857#define lpfc_mbx_rq_ftr_rq_perfh_MASK 0x00000001
1858#define lpfc_mbx_rq_ftr_rq_perfh_WORD word2
1855 uint32_t word3; 1859 uint32_t word3;
1856#define lpfc_mbx_rq_ftr_rsp_iaab_SHIFT 0 1860#define lpfc_mbx_rq_ftr_rsp_iaab_SHIFT 0
1857#define lpfc_mbx_rq_ftr_rsp_iaab_MASK 0x00000001 1861#define lpfc_mbx_rq_ftr_rsp_iaab_MASK 0x00000001
@@ -1877,6 +1881,9 @@ struct lpfc_mbx_request_features {
1877#define lpfc_mbx_rq_ftr_rsp_ifip_SHIFT 7 1881#define lpfc_mbx_rq_ftr_rsp_ifip_SHIFT 7
1878#define lpfc_mbx_rq_ftr_rsp_ifip_MASK 0x00000001 1882#define lpfc_mbx_rq_ftr_rsp_ifip_MASK 0x00000001
1879#define lpfc_mbx_rq_ftr_rsp_ifip_WORD word3 1883#define lpfc_mbx_rq_ftr_rsp_ifip_WORD word3
1884#define lpfc_mbx_rq_ftr_rsp_perfh_SHIFT 11
1885#define lpfc_mbx_rq_ftr_rsp_perfh_MASK 0x00000001
1886#define lpfc_mbx_rq_ftr_rsp_perfh_WORD word3
1880}; 1887};
1881 1888
1882struct lpfc_mbx_supp_pages { 1889struct lpfc_mbx_supp_pages {
@@ -1935,7 +1942,7 @@ struct lpfc_mbx_supp_pages {
1935#define LPFC_SLI4_PARAMETERS 2 1942#define LPFC_SLI4_PARAMETERS 2
1936}; 1943};
1937 1944
1938struct lpfc_mbx_sli4_params { 1945struct lpfc_mbx_pc_sli4_params {
1939 uint32_t word1; 1946 uint32_t word1;
1940#define qs_SHIFT 0 1947#define qs_SHIFT 0
1941#define qs_MASK 0x00000001 1948#define qs_MASK 0x00000001
@@ -2051,6 +2058,88 @@ struct lpfc_mbx_sli4_params {
2051 uint32_t rsvd_13_63[51]; 2058 uint32_t rsvd_13_63[51];
2052}; 2059};
2053 2060
2061struct lpfc_sli4_parameters {
2062 uint32_t word0;
2063#define cfg_prot_type_SHIFT 0
2064#define cfg_prot_type_MASK 0x000000FF
2065#define cfg_prot_type_WORD word0
2066 uint32_t word1;
2067#define cfg_ft_SHIFT 0
2068#define cfg_ft_MASK 0x00000001
2069#define cfg_ft_WORD word1
2070#define cfg_sli_rev_SHIFT 4
2071#define cfg_sli_rev_MASK 0x0000000f
2072#define cfg_sli_rev_WORD word1
2073#define cfg_sli_family_SHIFT 8
2074#define cfg_sli_family_MASK 0x0000000f
2075#define cfg_sli_family_WORD word1
2076#define cfg_if_type_SHIFT 12
2077#define cfg_if_type_MASK 0x0000000f
2078#define cfg_if_type_WORD word1
2079#define cfg_sli_hint_1_SHIFT 16
2080#define cfg_sli_hint_1_MASK 0x000000ff
2081#define cfg_sli_hint_1_WORD word1
2082#define cfg_sli_hint_2_SHIFT 24
2083#define cfg_sli_hint_2_MASK 0x0000001f
2084#define cfg_sli_hint_2_WORD word1
2085 uint32_t word2;
2086 uint32_t word3;
2087 uint32_t word4;
2088#define cfg_cqv_SHIFT 14
2089#define cfg_cqv_MASK 0x00000003
2090#define cfg_cqv_WORD word4
2091 uint32_t word5;
2092 uint32_t word6;
2093#define cfg_mqv_SHIFT 14
2094#define cfg_mqv_MASK 0x00000003
2095#define cfg_mqv_WORD word6
2096 uint32_t word7;
2097 uint32_t word8;
2098#define cfg_wqv_SHIFT 14
2099#define cfg_wqv_MASK 0x00000003
2100#define cfg_wqv_WORD word8
2101 uint32_t word9;
2102 uint32_t word10;
2103#define cfg_rqv_SHIFT 14
2104#define cfg_rqv_MASK 0x00000003
2105#define cfg_rqv_WORD word10
2106 uint32_t word11;
2107#define cfg_rq_db_window_SHIFT 28
2108#define cfg_rq_db_window_MASK 0x0000000f
2109#define cfg_rq_db_window_WORD word11
2110 uint32_t word12;
2111#define cfg_fcoe_SHIFT 0
2112#define cfg_fcoe_MASK 0x00000001
2113#define cfg_fcoe_WORD word12
2114#define cfg_phwq_SHIFT 15
2115#define cfg_phwq_MASK 0x00000001
2116#define cfg_phwq_WORD word12
2117#define cfg_loopbk_scope_SHIFT 28
2118#define cfg_loopbk_scope_MASK 0x0000000f
2119#define cfg_loopbk_scope_WORD word12
2120 uint32_t sge_supp_len;
2121 uint32_t word14;
2122#define cfg_sgl_page_cnt_SHIFT 0
2123#define cfg_sgl_page_cnt_MASK 0x0000000f
2124#define cfg_sgl_page_cnt_WORD word14
2125#define cfg_sgl_page_size_SHIFT 8
2126#define cfg_sgl_page_size_MASK 0x000000ff
2127#define cfg_sgl_page_size_WORD word14
2128#define cfg_sgl_pp_align_SHIFT 16
2129#define cfg_sgl_pp_align_MASK 0x000000ff
2130#define cfg_sgl_pp_align_WORD word14
2131 uint32_t word15;
2132 uint32_t word16;
2133 uint32_t word17;
2134 uint32_t word18;
2135 uint32_t word19;
2136};
2137
2138struct lpfc_mbx_get_sli4_parameters {
2139 struct mbox_header header;
2140 struct lpfc_sli4_parameters sli4_parameters;
2141};
2142
2054/* Mailbox Completion Queue Error Messages */ 2143/* Mailbox Completion Queue Error Messages */
2055#define MB_CQE_STATUS_SUCCESS 0x0 2144#define MB_CQE_STATUS_SUCCESS 0x0
2056#define MB_CQE_STATUS_INSUFFICIENT_PRIVILEGES 0x1 2145#define MB_CQE_STATUS_INSUFFICIENT_PRIVILEGES 0x1
@@ -2103,7 +2192,8 @@ struct lpfc_mqe {
2103 struct lpfc_mbx_post_hdr_tmpl hdr_tmpl; 2192 struct lpfc_mbx_post_hdr_tmpl hdr_tmpl;
2104 struct lpfc_mbx_query_fw_cfg query_fw_cfg; 2193 struct lpfc_mbx_query_fw_cfg query_fw_cfg;
2105 struct lpfc_mbx_supp_pages supp_pages; 2194 struct lpfc_mbx_supp_pages supp_pages;
2106 struct lpfc_mbx_sli4_params sli4_params; 2195 struct lpfc_mbx_pc_sli4_params sli4_params;
2196 struct lpfc_mbx_get_sli4_parameters get_sli4_parameters;
2107 struct lpfc_mbx_nop nop; 2197 struct lpfc_mbx_nop nop;
2108 } un; 2198 } un;
2109}; 2199};
@@ -2381,6 +2471,10 @@ struct wqe_common {
2381#define wqe_wqes_SHIFT 15 2471#define wqe_wqes_SHIFT 15
2382#define wqe_wqes_MASK 0x00000001 2472#define wqe_wqes_MASK 0x00000001
2383#define wqe_wqes_WORD word10 2473#define wqe_wqes_WORD word10
2474/* Note that this field overlaps above fields */
2475#define wqe_wqid_SHIFT 1
2476#define wqe_wqid_MASK 0x0000007f
2477#define wqe_wqid_WORD word10
2384#define wqe_pri_SHIFT 16 2478#define wqe_pri_SHIFT 16
2385#define wqe_pri_MASK 0x00000007 2479#define wqe_pri_MASK 0x00000007
2386#define wqe_pri_WORD word10 2480#define wqe_pri_WORD word10
@@ -2599,7 +2693,8 @@ struct fcp_iwrite64_wqe {
2599 uint32_t total_xfer_len; 2693 uint32_t total_xfer_len;
2600 uint32_t initial_xfer_len; 2694 uint32_t initial_xfer_len;
2601 struct wqe_common wqe_com; /* words 6-11 */ 2695 struct wqe_common wqe_com; /* words 6-11 */
2602 uint32_t rsvd_12_15[4]; /* word 12-15 */ 2696 uint32_t rsrvd12;
2697 struct ulp_bde64 ph_bde; /* words 13-15 */
2603}; 2698};
2604 2699
2605struct fcp_iread64_wqe { 2700struct fcp_iread64_wqe {
@@ -2608,7 +2703,8 @@ struct fcp_iread64_wqe {
2608 uint32_t total_xfer_len; /* word 4 */ 2703 uint32_t total_xfer_len; /* word 4 */
2609 uint32_t rsrvd5; /* word 5 */ 2704 uint32_t rsrvd5; /* word 5 */
2610 struct wqe_common wqe_com; /* words 6-11 */ 2705 struct wqe_common wqe_com; /* words 6-11 */
2611 uint32_t rsvd_12_15[4]; /* word 12-15 */ 2706 uint32_t rsrvd12;
2707 struct ulp_bde64 ph_bde; /* words 13-15 */
2612}; 2708};
2613 2709
2614struct fcp_icmnd64_wqe { 2710struct fcp_icmnd64_wqe {