| .. | .. |
|---|
| 1 | 1 | /******************************************************************* |
|---|
| 2 | 2 | * This file is part of the Emulex Linux Device Driver for * |
|---|
| 3 | 3 | * Fibre Channel Host Bus Adapters. * |
|---|
| 4 | | - * Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term * |
|---|
| 4 | + * Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term * |
|---|
| 5 | 5 | * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * |
|---|
| 6 | 6 | * Copyright (C) 2010-2015 Emulex. All rights reserved. * |
|---|
| 7 | 7 | * EMULEX and SLI are trademarks of Emulex. * |
|---|
| .. | .. |
|---|
| 38 | 38 | #define LPFC_BSG_VENDOR_DIAG_MODE_END 10 |
|---|
| 39 | 39 | #define LPFC_BSG_VENDOR_LINK_DIAG_TEST 11 |
|---|
| 40 | 40 | #define LPFC_BSG_VENDOR_FORCED_LINK_SPEED 14 |
|---|
| 41 | +#define LPFC_BSG_VENDOR_RAS_GET_LWPD 16 |
|---|
| 42 | +#define LPFC_BSG_VENDOR_RAS_GET_FWLOG 17 |
|---|
| 43 | +#define LPFC_BSG_VENDOR_RAS_GET_CONFIG 18 |
|---|
| 44 | +#define LPFC_BSG_VENDOR_RAS_SET_CONFIG 19 |
|---|
| 45 | +#define LPFC_BSG_VENDOR_GET_TRUNK_INFO 20 |
|---|
| 41 | 46 | |
|---|
| 42 | 47 | struct set_ct_event { |
|---|
| 43 | 48 | uint32_t command; |
|---|
| .. | .. |
|---|
| 63 | 68 | }; |
|---|
| 64 | 69 | |
|---|
| 65 | 70 | |
|---|
| 71 | +#define DISABLE_LOOP_BACK 0x0 /* disables loop back */ |
|---|
| 66 | 72 | #define INTERNAL_LOOP_BACK 0x1 /* adapter short cuts the loop internally */ |
|---|
| 67 | 73 | #define EXTERNAL_LOOP_BACK 0x2 /* requires an external loopback plug */ |
|---|
| 68 | 74 | |
|---|
| .. | .. |
|---|
| 70 | 76 | uint32_t command; |
|---|
| 71 | 77 | uint32_t type; |
|---|
| 72 | 78 | uint32_t timeout; |
|---|
| 79 | + uint32_t physical_link; |
|---|
| 73 | 80 | }; |
|---|
| 74 | 81 | |
|---|
| 75 | 82 | struct sli4_link_diag { |
|---|
| .. | .. |
|---|
| 218 | 225 | uint32_t reserved5; |
|---|
| 219 | 226 | }; |
|---|
| 220 | 227 | |
|---|
| 228 | +#define LPFC_CSF_BOOT_DEV 0x1D |
|---|
| 229 | +#define LPFC_CSF_QUERY 0 |
|---|
| 230 | +#define LPFC_CSF_SAVE 1 |
|---|
| 231 | + |
|---|
| 221 | 232 | struct lpfc_sli_config_emb0_subsys { |
|---|
| 222 | 233 | struct lpfc_sli_config_hdr sli_config_hdr; |
|---|
| 223 | 234 | #define LPFC_MBX_SLI_CONFIG_MAX_MSE 19 |
|---|
| .. | .. |
|---|
| 236 | 247 | #define FCOE_OPCODE_ADD_FCF 0x09 |
|---|
| 237 | 248 | #define FCOE_OPCODE_SET_DPORT_MODE 0x27 |
|---|
| 238 | 249 | #define FCOE_OPCODE_GET_DPORT_RESULTS 0x28 |
|---|
| 250 | + uint32_t timeout; /* comn_set_feature timeout */ |
|---|
| 251 | + uint32_t request_length; /* comn_set_feature request len */ |
|---|
| 252 | + uint32_t version; /* comn_set_feature version */ |
|---|
| 253 | + uint32_t csf_feature; /* comn_set_feature feature */ |
|---|
| 254 | + uint32_t word69; /* comn_set_feature parameter len */ |
|---|
| 255 | + uint32_t word70; /* comn_set_feature parameter val0 */ |
|---|
| 256 | +#define lpfc_emb0_subcmnd_csf_p0_SHIFT 0 |
|---|
| 257 | +#define lpfc_emb0_subcmnd_csf_p0_MASK 0x3 |
|---|
| 258 | +#define lpfc_emb0_subcmnd_csf_p0_WORD word70 |
|---|
| 239 | 259 | }; |
|---|
| 240 | 260 | |
|---|
| 241 | 261 | struct lpfc_sli_config_emb1_subsys { |
|---|
| .. | .. |
|---|
| 254 | 274 | #define COMN_OPCODE_WRITE_OBJECT 0xAC |
|---|
| 255 | 275 | #define COMN_OPCODE_READ_OBJECT_LIST 0xAD |
|---|
| 256 | 276 | #define COMN_OPCODE_DELETE_OBJECT 0xAE |
|---|
| 277 | +#define COMN_OPCODE_SET_FEATURES 0xBF |
|---|
| 257 | 278 | #define COMN_OPCODE_GET_CNTL_ADDL_ATTRIBUTES 0x79 |
|---|
| 258 | 279 | #define COMN_OPCODE_GET_CNTL_ATTRIBUTES 0x20 |
|---|
| 259 | 280 | uint32_t timeout; |
|---|
| .. | .. |
|---|
| 296 | 317 | uint8_t supported; |
|---|
| 297 | 318 | }; |
|---|
| 298 | 319 | |
|---|
| 320 | +struct lpfc_bsg_ras_req { |
|---|
| 321 | + uint32_t command; |
|---|
| 322 | +}; |
|---|
| 323 | + |
|---|
| 324 | +struct lpfc_bsg_get_fwlog_req { |
|---|
| 325 | + uint32_t command; |
|---|
| 326 | + uint32_t read_size; |
|---|
| 327 | + uint32_t read_offset; |
|---|
| 328 | +}; |
|---|
| 329 | + |
|---|
| 330 | +struct lpfc_bsg_get_ras_lwpd { |
|---|
| 331 | + uint32_t offset; |
|---|
| 332 | + uint32_t wrap_count; |
|---|
| 333 | +}; |
|---|
| 334 | + |
|---|
| 335 | +struct lpfc_bsg_set_ras_config_req { |
|---|
| 336 | + uint32_t command; |
|---|
| 337 | + uint8_t action; |
|---|
| 338 | +#define LPFC_RASACTION_STOP_LOGGING 0x00 |
|---|
| 339 | +#define LPFC_RASACTION_START_LOGGING 0x01 |
|---|
| 340 | + uint8_t log_level; |
|---|
| 341 | +}; |
|---|
| 342 | + |
|---|
| 343 | +struct lpfc_bsg_get_ras_config_reply { |
|---|
| 344 | + uint8_t state; |
|---|
| 345 | +#define LPFC_RASLOG_STATE_STOPPED 0x00 |
|---|
| 346 | +#define LPFC_RASLOG_STATE_RUNNING 0x01 |
|---|
| 347 | + uint8_t log_level; |
|---|
| 348 | + uint32_t log_buff_sz; |
|---|
| 349 | +}; |
|---|
| 350 | + |
|---|
| 351 | +struct lpfc_trunk_info { |
|---|
| 352 | + uint32_t word0; |
|---|
| 353 | +#define lpfc_trunk_info_link_status_SHIFT 0 |
|---|
| 354 | +#define lpfc_trunk_info_link_status_MASK 1 |
|---|
| 355 | +#define lpfc_trunk_info_link_status_WORD word0 |
|---|
| 356 | +#define lpfc_trunk_info_trunk_active0_SHIFT 8 |
|---|
| 357 | +#define lpfc_trunk_info_trunk_active0_MASK 1 |
|---|
| 358 | +#define lpfc_trunk_info_trunk_active0_WORD word0 |
|---|
| 359 | +#define lpfc_trunk_info_trunk_active1_SHIFT 9 |
|---|
| 360 | +#define lpfc_trunk_info_trunk_active1_MASK 1 |
|---|
| 361 | +#define lpfc_trunk_info_trunk_active1_WORD word0 |
|---|
| 362 | +#define lpfc_trunk_info_trunk_active2_SHIFT 10 |
|---|
| 363 | +#define lpfc_trunk_info_trunk_active2_MASK 1 |
|---|
| 364 | +#define lpfc_trunk_info_trunk_active2_WORD word0 |
|---|
| 365 | +#define lpfc_trunk_info_trunk_active3_SHIFT 11 |
|---|
| 366 | +#define lpfc_trunk_info_trunk_active3_MASK 1 |
|---|
| 367 | +#define lpfc_trunk_info_trunk_active3_WORD word0 |
|---|
| 368 | +#define lpfc_trunk_info_trunk_config0_SHIFT 12 |
|---|
| 369 | +#define lpfc_trunk_info_trunk_config0_MASK 1 |
|---|
| 370 | +#define lpfc_trunk_info_trunk_config0_WORD word0 |
|---|
| 371 | +#define lpfc_trunk_info_trunk_config1_SHIFT 13 |
|---|
| 372 | +#define lpfc_trunk_info_trunk_config1_MASK 1 |
|---|
| 373 | +#define lpfc_trunk_info_trunk_config1_WORD word0 |
|---|
| 374 | +#define lpfc_trunk_info_trunk_config2_SHIFT 14 |
|---|
| 375 | +#define lpfc_trunk_info_trunk_config2_MASK 1 |
|---|
| 376 | +#define lpfc_trunk_info_trunk_config2_WORD word0 |
|---|
| 377 | +#define lpfc_trunk_info_trunk_config3_SHIFT 15 |
|---|
| 378 | +#define lpfc_trunk_info_trunk_config3_MASK 1 |
|---|
| 379 | +#define lpfc_trunk_info_trunk_config3_WORD word0 |
|---|
| 380 | + uint16_t port_speed; |
|---|
| 381 | + uint16_t logical_speed; |
|---|
| 382 | + uint32_t reserved3; |
|---|
| 383 | +}; |
|---|
| 384 | + |
|---|
| 385 | +struct get_trunk_info_req { |
|---|
| 386 | + uint32_t command; |
|---|
| 387 | +}; |
|---|
| 388 | + |
|---|
| 299 | 389 | /* driver only */ |
|---|
| 300 | 390 | #define SLI_CONFIG_NOT_HANDLED 0 |
|---|
| 301 | 391 | #define SLI_CONFIG_HANDLED 1 |
|---|