diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_bsg.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_bsg.h | 87 |
1 files changed, 65 insertions, 22 deletions
diff --git a/drivers/scsi/lpfc/lpfc_bsg.h b/drivers/scsi/lpfc/lpfc_bsg.h index b542aca6f5ae..c8c2b47ea886 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.h +++ b/drivers/scsi/lpfc/lpfc_bsg.h | |||
@@ -24,15 +24,17 @@ | |||
24 | * These are the vendor unique structures passed in using the bsg | 24 | * These are the vendor unique structures passed in using the bsg |
25 | * FC_BSG_HST_VENDOR message code type. | 25 | * FC_BSG_HST_VENDOR message code type. |
26 | */ | 26 | */ |
27 | #define LPFC_BSG_VENDOR_SET_CT_EVENT 1 | 27 | #define LPFC_BSG_VENDOR_SET_CT_EVENT 1 |
28 | #define LPFC_BSG_VENDOR_GET_CT_EVENT 2 | 28 | #define LPFC_BSG_VENDOR_GET_CT_EVENT 2 |
29 | #define LPFC_BSG_VENDOR_SEND_MGMT_RESP 3 | 29 | #define LPFC_BSG_VENDOR_SEND_MGMT_RESP 3 |
30 | #define LPFC_BSG_VENDOR_DIAG_MODE 4 | 30 | #define LPFC_BSG_VENDOR_DIAG_MODE 4 |
31 | #define LPFC_BSG_VENDOR_DIAG_TEST 5 | 31 | #define LPFC_BSG_VENDOR_DIAG_RUN_LOOPBACK 5 |
32 | #define LPFC_BSG_VENDOR_GET_MGMT_REV 6 | 32 | #define LPFC_BSG_VENDOR_GET_MGMT_REV 6 |
33 | #define LPFC_BSG_VENDOR_MBOX 7 | 33 | #define LPFC_BSG_VENDOR_MBOX 7 |
34 | #define LPFC_BSG_VENDOR_MENLO_CMD 8 | 34 | #define LPFC_BSG_VENDOR_MENLO_CMD 8 |
35 | #define LPFC_BSG_VENDOR_MENLO_DATA 9 | 35 | #define LPFC_BSG_VENDOR_MENLO_DATA 9 |
36 | #define LPFC_BSG_VENDOR_DIAG_MODE_END 10 | ||
37 | #define LPFC_BSG_VENDOR_LINK_DIAG_TEST 11 | ||
36 | 38 | ||
37 | struct set_ct_event { | 39 | struct set_ct_event { |
38 | uint32_t command; | 40 | uint32_t command; |
@@ -67,10 +69,25 @@ struct diag_mode_set { | |||
67 | uint32_t timeout; | 69 | uint32_t timeout; |
68 | }; | 70 | }; |
69 | 71 | ||
72 | struct sli4_link_diag { | ||
73 | uint32_t command; | ||
74 | uint32_t timeout; | ||
75 | uint32_t test_id; | ||
76 | uint32_t loops; | ||
77 | uint32_t test_version; | ||
78 | uint32_t error_action; | ||
79 | }; | ||
80 | |||
70 | struct diag_mode_test { | 81 | struct diag_mode_test { |
71 | uint32_t command; | 82 | uint32_t command; |
72 | }; | 83 | }; |
73 | 84 | ||
85 | struct diag_status { | ||
86 | uint32_t mbox_status; | ||
87 | uint32_t shdr_status; | ||
88 | uint32_t shdr_add_status; | ||
89 | }; | ||
90 | |||
74 | #define LPFC_WWNN_TYPE 0 | 91 | #define LPFC_WWNN_TYPE 0 |
75 | #define LPFC_WWPN_TYPE 1 | 92 | #define LPFC_WWPN_TYPE 1 |
76 | 93 | ||
@@ -92,11 +109,15 @@ struct get_mgmt_rev_reply { | |||
92 | }; | 109 | }; |
93 | 110 | ||
94 | #define BSG_MBOX_SIZE 4096 /* mailbox command plus extended data */ | 111 | #define BSG_MBOX_SIZE 4096 /* mailbox command plus extended data */ |
112 | |||
113 | /* BSG mailbox request header */ | ||
95 | struct dfc_mbox_req { | 114 | struct dfc_mbox_req { |
96 | uint32_t command; | 115 | uint32_t command; |
97 | uint32_t mbOffset; | 116 | uint32_t mbOffset; |
98 | uint32_t inExtWLen; | 117 | uint32_t inExtWLen; |
99 | uint32_t outExtWLen; | 118 | uint32_t outExtWLen; |
119 | uint32_t extMboxTag; | ||
120 | uint32_t extSeqNum; | ||
100 | }; | 121 | }; |
101 | 122 | ||
102 | /* Used for menlo command or menlo data. The xri is only used for menlo data */ | 123 | /* Used for menlo command or menlo data. The xri is only used for menlo data */ |
@@ -171,7 +192,7 @@ struct lpfc_sli_config_mse { | |||
171 | #define lpfc_mbox_sli_config_mse_len_WORD buf_len | 192 | #define lpfc_mbox_sli_config_mse_len_WORD buf_len |
172 | }; | 193 | }; |
173 | 194 | ||
174 | struct lpfc_sli_config_subcmd_hbd { | 195 | struct lpfc_sli_config_hbd { |
175 | uint32_t buf_len; | 196 | uint32_t buf_len; |
176 | #define lpfc_mbox_sli_config_ecmn_hbd_len_SHIFT 0 | 197 | #define lpfc_mbox_sli_config_ecmn_hbd_len_SHIFT 0 |
177 | #define lpfc_mbox_sli_config_ecmn_hbd_len_MASK 0xffffff | 198 | #define lpfc_mbox_sli_config_ecmn_hbd_len_MASK 0xffffff |
@@ -194,21 +215,39 @@ struct lpfc_sli_config_hdr { | |||
194 | uint32_t reserved5; | 215 | uint32_t reserved5; |
195 | }; | 216 | }; |
196 | 217 | ||
197 | struct lpfc_sli_config_generic { | 218 | struct lpfc_sli_config_emb0_subsys { |
198 | struct lpfc_sli_config_hdr sli_config_hdr; | 219 | struct lpfc_sli_config_hdr sli_config_hdr; |
199 | #define LPFC_MBX_SLI_CONFIG_MAX_MSE 19 | 220 | #define LPFC_MBX_SLI_CONFIG_MAX_MSE 19 |
200 | struct lpfc_sli_config_mse mse[LPFC_MBX_SLI_CONFIG_MAX_MSE]; | 221 | struct lpfc_sli_config_mse mse[LPFC_MBX_SLI_CONFIG_MAX_MSE]; |
222 | uint32_t padding; | ||
223 | uint32_t word64; | ||
224 | #define lpfc_emb0_subcmnd_opcode_SHIFT 0 | ||
225 | #define lpfc_emb0_subcmnd_opcode_MASK 0xff | ||
226 | #define lpfc_emb0_subcmnd_opcode_WORD word64 | ||
227 | #define lpfc_emb0_subcmnd_subsys_SHIFT 8 | ||
228 | #define lpfc_emb0_subcmnd_subsys_MASK 0xff | ||
229 | #define lpfc_emb0_subcmnd_subsys_WORD word64 | ||
230 | /* Subsystem FCOE (0x0C) OpCodes */ | ||
231 | #define SLI_CONFIG_SUBSYS_FCOE 0x0C | ||
232 | #define FCOE_OPCODE_READ_FCF 0x08 | ||
233 | #define FCOE_OPCODE_ADD_FCF 0x09 | ||
201 | }; | 234 | }; |
202 | 235 | ||
203 | struct lpfc_sli_config_subcmnd { | 236 | struct lpfc_sli_config_emb1_subsys { |
204 | struct lpfc_sli_config_hdr sli_config_hdr; | 237 | struct lpfc_sli_config_hdr sli_config_hdr; |
205 | uint32_t word6; | 238 | uint32_t word6; |
206 | #define lpfc_subcmnd_opcode_SHIFT 0 | 239 | #define lpfc_emb1_subcmnd_opcode_SHIFT 0 |
207 | #define lpfc_subcmnd_opcode_MASK 0xff | 240 | #define lpfc_emb1_subcmnd_opcode_MASK 0xff |
208 | #define lpfc_subcmnd_opcode_WORD word6 | 241 | #define lpfc_emb1_subcmnd_opcode_WORD word6 |
209 | #define lpfc_subcmnd_subsys_SHIFT 8 | 242 | #define lpfc_emb1_subcmnd_subsys_SHIFT 8 |
210 | #define lpfc_subcmnd_subsys_MASK 0xff | 243 | #define lpfc_emb1_subcmnd_subsys_MASK 0xff |
211 | #define lpfc_subcmnd_subsys_WORD word6 | 244 | #define lpfc_emb1_subcmnd_subsys_WORD word6 |
245 | /* Subsystem COMN (0x01) OpCodes */ | ||
246 | #define SLI_CONFIG_SUBSYS_COMN 0x01 | ||
247 | #define COMN_OPCODE_READ_OBJECT 0xAB | ||
248 | #define COMN_OPCODE_WRITE_OBJECT 0xAC | ||
249 | #define COMN_OPCODE_READ_OBJECT_LIST 0xAD | ||
250 | #define COMN_OPCODE_DELETE_OBJECT 0xAE | ||
212 | uint32_t timeout; | 251 | uint32_t timeout; |
213 | uint32_t request_length; | 252 | uint32_t request_length; |
214 | uint32_t word9; | 253 | uint32_t word9; |
@@ -222,8 +261,8 @@ struct lpfc_sli_config_subcmnd { | |||
222 | uint32_t rd_offset; | 261 | uint32_t rd_offset; |
223 | uint32_t obj_name[26]; | 262 | uint32_t obj_name[26]; |
224 | uint32_t hbd_count; | 263 | uint32_t hbd_count; |
225 | #define LPFC_MBX_SLI_CONFIG_MAX_HBD 10 | 264 | #define LPFC_MBX_SLI_CONFIG_MAX_HBD 8 |
226 | struct lpfc_sli_config_subcmd_hbd hbd[LPFC_MBX_SLI_CONFIG_MAX_HBD]; | 265 | struct lpfc_sli_config_hbd hbd[LPFC_MBX_SLI_CONFIG_MAX_HBD]; |
227 | }; | 266 | }; |
228 | 267 | ||
229 | struct lpfc_sli_config_mbox { | 268 | struct lpfc_sli_config_mbox { |
@@ -235,7 +274,11 @@ struct lpfc_sli_config_mbox { | |||
235 | #define lpfc_mqe_command_MASK 0x000000FF | 274 | #define lpfc_mqe_command_MASK 0x000000FF |
236 | #define lpfc_mqe_command_WORD word0 | 275 | #define lpfc_mqe_command_WORD word0 |
237 | union { | 276 | union { |
238 | struct lpfc_sli_config_generic sli_config_generic; | 277 | struct lpfc_sli_config_emb0_subsys sli_config_emb0_subsys; |
239 | struct lpfc_sli_config_subcmnd sli_config_subcmnd; | 278 | struct lpfc_sli_config_emb1_subsys sli_config_emb1_subsys; |
240 | } un; | 279 | } un; |
241 | }; | 280 | }; |
281 | |||
282 | /* driver only */ | ||
283 | #define SLI_CONFIG_NOT_HANDLED 0 | ||
284 | #define SLI_CONFIG_HANDLED 1 | ||