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.h60
1 files changed, 58 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 820015fbc4d6..bbdcf96800f6 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -41,8 +41,14 @@
41 * Or clear that bit field: 41 * Or clear that bit field:
42 * bf_set(example_bit_field, &t1, 0); 42 * bf_set(example_bit_field, &t1, 0);
43 */ 43 */
44#define bf_get_le32(name, ptr) \
45 ((le32_to_cpu((ptr)->name##_WORD) >> name##_SHIFT) & name##_MASK)
44#define bf_get(name, ptr) \ 46#define bf_get(name, ptr) \
45 (((ptr)->name##_WORD >> name##_SHIFT) & name##_MASK) 47 (((ptr)->name##_WORD >> name##_SHIFT) & name##_MASK)
48#define bf_set_le32(name, ptr, value) \
49 ((ptr)->name##_WORD = cpu_to_le32(((((value) & \
50 name##_MASK) << name##_SHIFT) | (le32_to_cpu((ptr)->name##_WORD) & \
51 ~(name##_MASK << name##_SHIFT)))))
46#define bf_set(name, ptr, value) \ 52#define bf_set(name, ptr, value) \
47 ((ptr)->name##_WORD = ((((value) & name##_MASK) << name##_SHIFT) | \ 53 ((ptr)->name##_WORD = ((((value) & name##_MASK) << name##_SHIFT) | \
48 ((ptr)->name##_WORD & ~(name##_MASK << name##_SHIFT)))) 54 ((ptr)->name##_WORD & ~(name##_MASK << name##_SHIFT))))
@@ -781,6 +787,7 @@ struct mbox_header {
781#define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37 787#define LPFC_MBOX_OPCODE_EQ_DESTROY 0x37
782#define LPFC_MBOX_OPCODE_QUERY_FW_CFG 0x3A 788#define LPFC_MBOX_OPCODE_QUERY_FW_CFG 0x3A
783#define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D 789#define LPFC_MBOX_OPCODE_FUNCTION_RESET 0x3D
790#define LPFC_MBOX_OPCODE_MQ_CREATE_EXT 0x5A
784 791
785/* FCoE Opcodes */ 792/* FCoE Opcodes */
786#define LPFC_MBOX_OPCODE_FCOE_WQ_CREATE 0x01 793#define LPFC_MBOX_OPCODE_FCOE_WQ_CREATE 0x01
@@ -1102,6 +1109,39 @@ struct lpfc_mbx_mq_create {
1102 } u; 1109 } u;
1103}; 1110};
1104 1111
1112struct lpfc_mbx_mq_create_ext {
1113 struct mbox_header header;
1114 union {
1115 struct {
1116 uint32_t word0;
1117#define lpfc_mbx_mq_create_ext_num_pages_SHIFT 0
1118#define lpfc_mbx_mq_create_ext_num_pages_MASK 0x0000FFFF
1119#define lpfc_mbx_mq_create_ext_num_pages_WORD word0
1120 uint32_t async_evt_bmap;
1121#define lpfc_mbx_mq_create_ext_async_evt_link_SHIFT LPFC_TRAILER_CODE_LINK
1122#define lpfc_mbx_mq_create_ext_async_evt_link_MASK 0x00000001
1123#define lpfc_mbx_mq_create_ext_async_evt_link_WORD async_evt_bmap
1124#define lpfc_mbx_mq_create_ext_async_evt_fcfste_SHIFT LPFC_TRAILER_CODE_FCOE
1125#define lpfc_mbx_mq_create_ext_async_evt_fcfste_MASK 0x00000001
1126#define lpfc_mbx_mq_create_ext_async_evt_fcfste_WORD async_evt_bmap
1127#define lpfc_mbx_mq_create_ext_async_evt_group5_SHIFT LPFC_TRAILER_CODE_GRP5
1128#define lpfc_mbx_mq_create_ext_async_evt_group5_MASK 0x00000001
1129#define lpfc_mbx_mq_create_ext_async_evt_group5_WORD async_evt_bmap
1130 struct mq_context context;
1131 struct dma_address page[LPFC_MAX_MQ_PAGE];
1132 } request;
1133 struct {
1134 uint32_t word0;
1135#define lpfc_mbx_mq_create_q_id_SHIFT 0
1136#define lpfc_mbx_mq_create_q_id_MASK 0x0000FFFF
1137#define lpfc_mbx_mq_create_q_id_WORD word0
1138 } response;
1139 } u;
1140#define LPFC_ASYNC_EVENT_LINK_STATE 0x2
1141#define LPFC_ASYNC_EVENT_FCF_STATE 0x4
1142#define LPFC_ASYNC_EVENT_GROUP5 0x20
1143};
1144
1105struct lpfc_mbx_mq_destroy { 1145struct lpfc_mbx_mq_destroy {
1106 struct mbox_header header; 1146 struct mbox_header header;
1107 union { 1147 union {
@@ -1428,8 +1468,8 @@ struct lpfc_mbx_reg_vfi {
1428#define lpfc_reg_vfi_fcfi_WORD word2 1468#define lpfc_reg_vfi_fcfi_WORD word2
1429 uint32_t wwn[2]; 1469 uint32_t wwn[2];
1430 struct ulp_bde64 bde; 1470 struct ulp_bde64 bde;
1431 uint32_t word8_rsvd; 1471 uint32_t e_d_tov;
1432 uint32_t word9_rsvd; 1472 uint32_t r_a_tov;
1433 uint32_t word10; 1473 uint32_t word10;
1434#define lpfc_reg_vfi_nport_id_SHIFT 0 1474#define lpfc_reg_vfi_nport_id_SHIFT 0
1435#define lpfc_reg_vfi_nport_id_MASK 0x00FFFFFF 1475#define lpfc_reg_vfi_nport_id_MASK 0x00FFFFFF
@@ -1940,6 +1980,7 @@ struct lpfc_mbx_sli4_params {
1940#define rdma_MASK 0x00000001 1980#define rdma_MASK 0x00000001
1941#define rdma_WORD word3 1981#define rdma_WORD word3
1942 uint32_t sge_supp_len; 1982 uint32_t sge_supp_len;
1983#define SLI4_PAGE_SIZE 4096
1943 uint32_t word5; 1984 uint32_t word5;
1944#define if_page_sz_SHIFT 0 1985#define if_page_sz_SHIFT 0
1945#define if_page_sz_MASK 0x0000ffff 1986#define if_page_sz_MASK 0x0000ffff
@@ -2041,6 +2082,7 @@ struct lpfc_mqe {
2041 struct lpfc_mbx_reg_fcfi reg_fcfi; 2082 struct lpfc_mbx_reg_fcfi reg_fcfi;
2042 struct lpfc_mbx_unreg_fcfi unreg_fcfi; 2083 struct lpfc_mbx_unreg_fcfi unreg_fcfi;
2043 struct lpfc_mbx_mq_create mq_create; 2084 struct lpfc_mbx_mq_create mq_create;
2085 struct lpfc_mbx_mq_create_ext mq_create_ext;
2044 struct lpfc_mbx_eq_create eq_create; 2086 struct lpfc_mbx_eq_create eq_create;
2045 struct lpfc_mbx_cq_create cq_create; 2087 struct lpfc_mbx_cq_create cq_create;
2046 struct lpfc_mbx_wq_create wq_create; 2088 struct lpfc_mbx_wq_create wq_create;
@@ -2099,6 +2141,7 @@ struct lpfc_mcqe {
2099#define LPFC_TRAILER_CODE_LINK 0x1 2141#define LPFC_TRAILER_CODE_LINK 0x1
2100#define LPFC_TRAILER_CODE_FCOE 0x2 2142#define LPFC_TRAILER_CODE_FCOE 0x2
2101#define LPFC_TRAILER_CODE_DCBX 0x3 2143#define LPFC_TRAILER_CODE_DCBX 0x3
2144#define LPFC_TRAILER_CODE_GRP5 0x5
2102}; 2145};
2103 2146
2104struct lpfc_acqe_link { 2147struct lpfc_acqe_link {
@@ -2168,6 +2211,19 @@ struct lpfc_acqe_dcbx {
2168 uint32_t trailer; 2211 uint32_t trailer;
2169}; 2212};
2170 2213
2214struct lpfc_acqe_grp5 {
2215 uint32_t word0;
2216#define lpfc_acqe_grp5_pport_SHIFT 0
2217#define lpfc_acqe_grp5_pport_MASK 0x000000FF
2218#define lpfc_acqe_grp5_pport_WORD word0
2219 uint32_t word1;
2220#define lpfc_acqe_grp5_llink_spd_SHIFT 16
2221#define lpfc_acqe_grp5_llink_spd_MASK 0x0000FFFF
2222#define lpfc_acqe_grp5_llink_spd_WORD word1
2223 uint32_t event_tag;
2224 uint32_t trailer;
2225};
2226
2171/* 2227/*
2172 * Define the bootstrap mailbox (bmbx) region used to communicate 2228 * Define the bootstrap mailbox (bmbx) region used to communicate
2173 * mailbox command between the host and port. The mailbox consists 2229 * mailbox command between the host and port. The mailbox consists