1c79c1292SJames Smart /******************************************************************* 2c79c1292SJames Smart * This file is part of the Emulex Linux Device Driver for * 3c79c1292SJames Smart * Fibre Channel Host Bus Adapters. * 495df18c2SJames Smart * Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term * 54ae2ebdeSJames Smart * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. * 6f25e8e79SJames Smart * Copyright (C) 2010-2015 Emulex. All rights reserved. * 7c79c1292SJames Smart * EMULEX and SLI are trademarks of Emulex. * 8d080abe0SJames Smart * www.broadcom.com * 9c79c1292SJames Smart * * 10c79c1292SJames Smart * This program is free software; you can redistribute it and/or * 11c79c1292SJames Smart * modify it under the terms of version 2 of the GNU General * 12c79c1292SJames Smart * Public License as published by the Free Software Foundation. * 13c79c1292SJames Smart * This program is distributed in the hope that it will be useful. * 14c79c1292SJames Smart * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND * 15c79c1292SJames Smart * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, * 16c79c1292SJames Smart * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE * 17c79c1292SJames Smart * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD * 18c79c1292SJames Smart * TO BE LEGALLY INVALID. See the GNU General Public License for * 19c79c1292SJames Smart * more details, a copy of which can be found in the file COPYING * 20c79c1292SJames Smart * included with this package. * 21c79c1292SJames Smart *******************************************************************/ 22c79c1292SJames Smart /* bsg definitions 23c79c1292SJames Smart * No pointers to user data are allowed, all application buffers and sizes will 24c79c1292SJames Smart * derived through the bsg interface. 25c79c1292SJames Smart * 26c79c1292SJames Smart * These are the vendor unique structures passed in using the bsg 27c79c1292SJames Smart * FC_BSG_HST_VENDOR message code type. 28c79c1292SJames Smart */ 29c79c1292SJames Smart #define LPFC_BSG_VENDOR_SET_CT_EVENT 1 30c79c1292SJames Smart #define LPFC_BSG_VENDOR_GET_CT_EVENT 2 31c79c1292SJames Smart #define LPFC_BSG_VENDOR_SEND_MGMT_RESP 3 32c79c1292SJames Smart #define LPFC_BSG_VENDOR_DIAG_MODE 4 337ad20aa9SJames Smart #define LPFC_BSG_VENDOR_DIAG_RUN_LOOPBACK 5 34c79c1292SJames Smart #define LPFC_BSG_VENDOR_GET_MGMT_REV 6 35c79c1292SJames Smart #define LPFC_BSG_VENDOR_MBOX 7 36e2aed29fSJames Smart #define LPFC_BSG_VENDOR_MENLO_CMD 8 37e2aed29fSJames Smart #define LPFC_BSG_VENDOR_MENLO_DATA 9 387ad20aa9SJames Smart #define LPFC_BSG_VENDOR_DIAG_MODE_END 10 397ad20aa9SJames Smart #define LPFC_BSG_VENDOR_LINK_DIAG_TEST 11 40c691816eSJames Smart #define LPFC_BSG_VENDOR_FORCED_LINK_SPEED 14 41d2cc9bcdSJames Smart #define LPFC_BSG_VENDOR_RAS_GET_LWPD 16 42d2cc9bcdSJames Smart #define LPFC_BSG_VENDOR_RAS_GET_FWLOG 17 43d2cc9bcdSJames Smart #define LPFC_BSG_VENDOR_RAS_GET_CONFIG 18 44d2cc9bcdSJames Smart #define LPFC_BSG_VENDOR_RAS_SET_CONFIG 19 451dc5ec24SJames Smart #define LPFC_BSG_VENDOR_GET_TRUNK_INFO 20 46c79c1292SJames Smart 47c79c1292SJames Smart struct set_ct_event { 48c79c1292SJames Smart uint32_t command; 49c79c1292SJames Smart uint32_t type_mask; 50c79c1292SJames Smart uint32_t ev_req_id; 51c79c1292SJames Smart uint32_t ev_reg_id; 52c79c1292SJames Smart }; 53c79c1292SJames Smart 54c79c1292SJames Smart struct get_ct_event { 55c79c1292SJames Smart uint32_t command; 56c79c1292SJames Smart uint32_t ev_reg_id; 57c79c1292SJames Smart uint32_t ev_req_id; 58c79c1292SJames Smart }; 59c79c1292SJames Smart 60c79c1292SJames Smart struct get_ct_event_reply { 61c79c1292SJames Smart uint32_t immed_data; 62c79c1292SJames Smart uint32_t type; 63c79c1292SJames Smart }; 64c79c1292SJames Smart 65c79c1292SJames Smart struct send_mgmt_resp { 66c79c1292SJames Smart uint32_t command; 67c79c1292SJames Smart uint32_t tag; 68c79c1292SJames Smart }; 69c79c1292SJames Smart 70c79c1292SJames Smart 719a66d990SJames Smart #define DISABLE_LOOP_BACK 0x0 /* disables loop back */ 72c79c1292SJames Smart #define INTERNAL_LOOP_BACK 0x1 /* adapter short cuts the loop internally */ 73c79c1292SJames Smart #define EXTERNAL_LOOP_BACK 0x2 /* requires an external loopback plug */ 74c79c1292SJames Smart 75c79c1292SJames Smart struct diag_mode_set { 76c79c1292SJames Smart uint32_t command; 77c79c1292SJames Smart uint32_t type; 78c79c1292SJames Smart uint32_t timeout; 799a66d990SJames Smart uint32_t physical_link; 80c79c1292SJames Smart }; 81c79c1292SJames Smart 827ad20aa9SJames Smart struct sli4_link_diag { 837ad20aa9SJames Smart uint32_t command; 847ad20aa9SJames Smart uint32_t timeout; 857ad20aa9SJames Smart uint32_t test_id; 867ad20aa9SJames Smart uint32_t loops; 877ad20aa9SJames Smart uint32_t test_version; 887ad20aa9SJames Smart uint32_t error_action; 897ad20aa9SJames Smart }; 907ad20aa9SJames Smart 91c79c1292SJames Smart struct diag_mode_test { 92c79c1292SJames Smart uint32_t command; 93c79c1292SJames Smart }; 94c79c1292SJames Smart 957ad20aa9SJames Smart struct diag_status { 967ad20aa9SJames Smart uint32_t mbox_status; 977ad20aa9SJames Smart uint32_t shdr_status; 987ad20aa9SJames Smart uint32_t shdr_add_status; 997ad20aa9SJames Smart }; 1007ad20aa9SJames Smart 101c79c1292SJames Smart #define LPFC_WWNN_TYPE 0 102c79c1292SJames Smart #define LPFC_WWPN_TYPE 1 103c79c1292SJames Smart 104c79c1292SJames Smart struct get_mgmt_rev { 105c79c1292SJames Smart uint32_t command; 106c79c1292SJames Smart }; 107c79c1292SJames Smart 108c79c1292SJames Smart #define MANAGEMENT_MAJOR_REV 1 109026abb87SJames Smart #define MANAGEMENT_MINOR_REV 1 110c79c1292SJames Smart 111c79c1292SJames Smart /* the MgmtRevInfo structure */ 112c79c1292SJames Smart struct MgmtRevInfo { 113c79c1292SJames Smart uint32_t a_Major; 114c79c1292SJames Smart uint32_t a_Minor; 115c79c1292SJames Smart }; 116c79c1292SJames Smart 117c79c1292SJames Smart struct get_mgmt_rev_reply { 118c79c1292SJames Smart struct MgmtRevInfo info; 119c79c1292SJames Smart }; 120c79c1292SJames Smart 12149198b37SJames Smart #define BSG_MBOX_SIZE 4096 /* mailbox command plus extended data */ 1227ad20aa9SJames Smart 1237ad20aa9SJames Smart /* BSG mailbox request header */ 124c79c1292SJames Smart struct dfc_mbox_req { 125c79c1292SJames Smart uint32_t command; 1267a470277SJames Smart uint32_t mbOffset; 127c79c1292SJames Smart uint32_t inExtWLen; 128c7495937SJames Smart uint32_t outExtWLen; 1297ad20aa9SJames Smart uint32_t extMboxTag; 1307ad20aa9SJames Smart uint32_t extSeqNum; 131c79c1292SJames Smart }; 132c79c1292SJames Smart 133e2aed29fSJames Smart /* Used for menlo command or menlo data. The xri is only used for menlo data */ 134e2aed29fSJames Smart struct menlo_command { 135e2aed29fSJames Smart uint32_t cmd; 136e2aed29fSJames Smart uint32_t xri; 137e2aed29fSJames Smart }; 138e2aed29fSJames Smart 139e2aed29fSJames Smart struct menlo_response { 140e2aed29fSJames Smart uint32_t xri; /* return the xri of the iocb exchange */ 141e2aed29fSJames Smart }; 142e2aed29fSJames Smart 143b6e3b9c6SJames Smart /* 144b6e3b9c6SJames Smart * macros and data structures for handling sli-config mailbox command 145b6e3b9c6SJames Smart * pass-through support, this header file is shared between user and 146b6e3b9c6SJames Smart * kernel spaces, note the set of macros are duplicates from lpfc_hw4.h, 147b6e3b9c6SJames Smart * with macro names prefixed with bsg_, as the macros defined in 148b6e3b9c6SJames Smart * lpfc_hw4.h are not accessible from user space. 149b6e3b9c6SJames Smart */ 150b6e3b9c6SJames Smart 151b6e3b9c6SJames Smart /* Macros to deal with bit fields. Each bit field must have 3 #defines 152b6e3b9c6SJames Smart * associated with it (_SHIFT, _MASK, and _WORD). 153b6e3b9c6SJames Smart * EG. For a bit field that is in the 7th bit of the "field4" field of a 154b6e3b9c6SJames Smart * structure and is 2 bits in size the following #defines must exist: 155b6e3b9c6SJames Smart * struct temp { 156b6e3b9c6SJames Smart * uint32_t field1; 157b6e3b9c6SJames Smart * uint32_t field2; 158b6e3b9c6SJames Smart * uint32_t field3; 159b6e3b9c6SJames Smart * uint32_t field4; 160b6e3b9c6SJames Smart * #define example_bit_field_SHIFT 7 161b6e3b9c6SJames Smart * #define example_bit_field_MASK 0x03 162b6e3b9c6SJames Smart * #define example_bit_field_WORD field4 163b6e3b9c6SJames Smart * uint32_t field5; 164b6e3b9c6SJames Smart * }; 165b6e3b9c6SJames Smart * Then the macros below may be used to get or set the value of that field. 166b6e3b9c6SJames Smart * EG. To get the value of the bit field from the above example: 167b6e3b9c6SJames Smart * struct temp t1; 168b6e3b9c6SJames Smart * value = bsg_bf_get(example_bit_field, &t1); 169b6e3b9c6SJames Smart * And then to set that bit field: 170b6e3b9c6SJames Smart * bsg_bf_set(example_bit_field, &t1, 2); 171b6e3b9c6SJames Smart * Or clear that bit field: 172b6e3b9c6SJames Smart * bsg_bf_set(example_bit_field, &t1, 0); 173b6e3b9c6SJames Smart */ 174b6e3b9c6SJames Smart #define bsg_bf_get_le32(name, ptr) \ 175b6e3b9c6SJames Smart ((le32_to_cpu((ptr)->name##_WORD) >> name##_SHIFT) & name##_MASK) 176b6e3b9c6SJames Smart #define bsg_bf_get(name, ptr) \ 177b6e3b9c6SJames Smart (((ptr)->name##_WORD >> name##_SHIFT) & name##_MASK) 178b6e3b9c6SJames Smart #define bsg_bf_set_le32(name, ptr, value) \ 179b6e3b9c6SJames Smart ((ptr)->name##_WORD = cpu_to_le32(((((value) & \ 180b6e3b9c6SJames Smart name##_MASK) << name##_SHIFT) | (le32_to_cpu((ptr)->name##_WORD) & \ 181b6e3b9c6SJames Smart ~(name##_MASK << name##_SHIFT))))) 182b6e3b9c6SJames Smart #define bsg_bf_set(name, ptr, value) \ 183b6e3b9c6SJames Smart ((ptr)->name##_WORD = ((((value) & name##_MASK) << name##_SHIFT) | \ 184b6e3b9c6SJames Smart ((ptr)->name##_WORD & ~(name##_MASK << name##_SHIFT)))) 185b6e3b9c6SJames Smart 186b6e3b9c6SJames Smart /* 187b6e3b9c6SJames Smart * The sli_config structure specified here is based on the following 188b6e3b9c6SJames Smart * restriction: 189b6e3b9c6SJames Smart * 190b6e3b9c6SJames Smart * -- SLI_CONFIG EMB=0, carrying MSEs, will carry subcommands without 191b6e3b9c6SJames Smart * carrying HBD. 192b6e3b9c6SJames Smart * -- SLI_CONFIG EMB=1, not carrying MSE, will carry subcommands with or 193b6e3b9c6SJames Smart * without carrying HBDs. 194b6e3b9c6SJames Smart */ 195b6e3b9c6SJames Smart 196b6e3b9c6SJames Smart struct lpfc_sli_config_mse { 197b6e3b9c6SJames Smart uint32_t pa_lo; 198b6e3b9c6SJames Smart uint32_t pa_hi; 199b6e3b9c6SJames Smart uint32_t buf_len; 200b6e3b9c6SJames Smart #define lpfc_mbox_sli_config_mse_len_SHIFT 0 201b6e3b9c6SJames Smart #define lpfc_mbox_sli_config_mse_len_MASK 0xffffff 202b6e3b9c6SJames Smart #define lpfc_mbox_sli_config_mse_len_WORD buf_len 203b6e3b9c6SJames Smart }; 204b6e3b9c6SJames Smart 2057ad20aa9SJames Smart struct lpfc_sli_config_hbd { 206b6e3b9c6SJames Smart uint32_t buf_len; 207b6e3b9c6SJames Smart #define lpfc_mbox_sli_config_ecmn_hbd_len_SHIFT 0 208b6e3b9c6SJames Smart #define lpfc_mbox_sli_config_ecmn_hbd_len_MASK 0xffffff 209b6e3b9c6SJames Smart #define lpfc_mbox_sli_config_ecmn_hbd_len_WORD buf_len 210b6e3b9c6SJames Smart uint32_t pa_lo; 211b6e3b9c6SJames Smart uint32_t pa_hi; 212b6e3b9c6SJames Smart }; 213b6e3b9c6SJames Smart 214b6e3b9c6SJames Smart struct lpfc_sli_config_hdr { 215b6e3b9c6SJames Smart uint32_t word1; 216b6e3b9c6SJames Smart #define lpfc_mbox_hdr_emb_SHIFT 0 217b6e3b9c6SJames Smart #define lpfc_mbox_hdr_emb_MASK 0x00000001 218b6e3b9c6SJames Smart #define lpfc_mbox_hdr_emb_WORD word1 219b6e3b9c6SJames Smart #define lpfc_mbox_hdr_mse_cnt_SHIFT 3 220b6e3b9c6SJames Smart #define lpfc_mbox_hdr_mse_cnt_MASK 0x0000001f 221b6e3b9c6SJames Smart #define lpfc_mbox_hdr_mse_cnt_WORD word1 222b6e3b9c6SJames Smart uint32_t payload_length; 223b6e3b9c6SJames Smart uint32_t tag_lo; 224b6e3b9c6SJames Smart uint32_t tag_hi; 225b6e3b9c6SJames Smart uint32_t reserved5; 226b6e3b9c6SJames Smart }; 227b6e3b9c6SJames Smart 228*45bc4427SDick Kennedy #define LPFC_CSF_BOOT_DEV 0x1D 229*45bc4427SDick Kennedy #define LPFC_CSF_QUERY 0 230*45bc4427SDick Kennedy #define LPFC_CSF_SAVE 1 231*45bc4427SDick Kennedy 2327ad20aa9SJames Smart struct lpfc_sli_config_emb0_subsys { 233b6e3b9c6SJames Smart struct lpfc_sli_config_hdr sli_config_hdr; 234b6e3b9c6SJames Smart #define LPFC_MBX_SLI_CONFIG_MAX_MSE 19 235b6e3b9c6SJames Smart struct lpfc_sli_config_mse mse[LPFC_MBX_SLI_CONFIG_MAX_MSE]; 2367ad20aa9SJames Smart uint32_t padding; 2377ad20aa9SJames Smart uint32_t word64; 2387ad20aa9SJames Smart #define lpfc_emb0_subcmnd_opcode_SHIFT 0 2397ad20aa9SJames Smart #define lpfc_emb0_subcmnd_opcode_MASK 0xff 2407ad20aa9SJames Smart #define lpfc_emb0_subcmnd_opcode_WORD word64 2417ad20aa9SJames Smart #define lpfc_emb0_subcmnd_subsys_SHIFT 8 2427ad20aa9SJames Smart #define lpfc_emb0_subcmnd_subsys_MASK 0xff 2437ad20aa9SJames Smart #define lpfc_emb0_subcmnd_subsys_WORD word64 2447ad20aa9SJames Smart /* Subsystem FCOE (0x0C) OpCodes */ 2457ad20aa9SJames Smart #define SLI_CONFIG_SUBSYS_FCOE 0x0C 2467ad20aa9SJames Smart #define FCOE_OPCODE_READ_FCF 0x08 2477ad20aa9SJames Smart #define FCOE_OPCODE_ADD_FCF 0x09 2482a2719d3SJames Smart #define FCOE_OPCODE_SET_DPORT_MODE 0x27 2492a2719d3SJames Smart #define FCOE_OPCODE_GET_DPORT_RESULTS 0x28 250*45bc4427SDick Kennedy uint32_t timeout; /* comn_set_feature timeout */ 251*45bc4427SDick Kennedy uint32_t request_length; /* comn_set_feature request len */ 252*45bc4427SDick Kennedy uint32_t version; /* comn_set_feature version */ 253*45bc4427SDick Kennedy uint32_t csf_feature; /* comn_set_feature feature */ 254*45bc4427SDick Kennedy uint32_t word69; /* comn_set_feature parameter len */ 255*45bc4427SDick Kennedy uint32_t word70; /* comn_set_feature parameter val0 */ 256*45bc4427SDick Kennedy #define lpfc_emb0_subcmnd_csf_p0_SHIFT 0 257*45bc4427SDick Kennedy #define lpfc_emb0_subcmnd_csf_p0_MASK 0x3 258*45bc4427SDick Kennedy #define lpfc_emb0_subcmnd_csf_p0_WORD word70 259b6e3b9c6SJames Smart }; 260b6e3b9c6SJames Smart 2617ad20aa9SJames Smart struct lpfc_sli_config_emb1_subsys { 262b6e3b9c6SJames Smart struct lpfc_sli_config_hdr sli_config_hdr; 263b6e3b9c6SJames Smart uint32_t word6; 2647ad20aa9SJames Smart #define lpfc_emb1_subcmnd_opcode_SHIFT 0 2657ad20aa9SJames Smart #define lpfc_emb1_subcmnd_opcode_MASK 0xff 2667ad20aa9SJames Smart #define lpfc_emb1_subcmnd_opcode_WORD word6 2677ad20aa9SJames Smart #define lpfc_emb1_subcmnd_subsys_SHIFT 8 2687ad20aa9SJames Smart #define lpfc_emb1_subcmnd_subsys_MASK 0xff 2697ad20aa9SJames Smart #define lpfc_emb1_subcmnd_subsys_WORD word6 2707ad20aa9SJames Smart /* Subsystem COMN (0x01) OpCodes */ 2717ad20aa9SJames Smart #define SLI_CONFIG_SUBSYS_COMN 0x01 272c6377970SJames Smart #define COMN_OPCODE_GET_PROFILE_CONFIG 0xA4 2737ad20aa9SJames Smart #define COMN_OPCODE_READ_OBJECT 0xAB 2747ad20aa9SJames Smart #define COMN_OPCODE_WRITE_OBJECT 0xAC 2757ad20aa9SJames Smart #define COMN_OPCODE_READ_OBJECT_LIST 0xAD 2767ad20aa9SJames Smart #define COMN_OPCODE_DELETE_OBJECT 0xAE 277*45bc4427SDick Kennedy #define COMN_OPCODE_SET_FEATURES 0xBF 278026abb87SJames Smart #define COMN_OPCODE_GET_CNTL_ADDL_ATTRIBUTES 0x79 279b99570ddSJames Smart #define COMN_OPCODE_GET_CNTL_ATTRIBUTES 0x20 280b6e3b9c6SJames Smart uint32_t timeout; 281b6e3b9c6SJames Smart uint32_t request_length; 282b6e3b9c6SJames Smart uint32_t word9; 283b6e3b9c6SJames Smart #define lpfc_subcmnd_version_SHIFT 0 284b6e3b9c6SJames Smart #define lpfc_subcmnd_version_MASK 0xff 285b6e3b9c6SJames Smart #define lpfc_subcmnd_version_WORD word9 286b6e3b9c6SJames Smart uint32_t word10; 287b6e3b9c6SJames Smart #define lpfc_subcmnd_ask_rd_len_SHIFT 0 288b6e3b9c6SJames Smart #define lpfc_subcmnd_ask_rd_len_MASK 0xffffff 289b6e3b9c6SJames Smart #define lpfc_subcmnd_ask_rd_len_WORD word10 290b6e3b9c6SJames Smart uint32_t rd_offset; 291b6e3b9c6SJames Smart uint32_t obj_name[26]; 292b6e3b9c6SJames Smart uint32_t hbd_count; 2937ad20aa9SJames Smart #define LPFC_MBX_SLI_CONFIG_MAX_HBD 8 2947ad20aa9SJames Smart struct lpfc_sli_config_hbd hbd[LPFC_MBX_SLI_CONFIG_MAX_HBD]; 295b6e3b9c6SJames Smart }; 296b6e3b9c6SJames Smart 297b6e3b9c6SJames Smart struct lpfc_sli_config_mbox { 298b6e3b9c6SJames Smart uint32_t word0; 299b6e3b9c6SJames Smart #define lpfc_mqe_status_SHIFT 16 300b6e3b9c6SJames Smart #define lpfc_mqe_status_MASK 0x0000FFFF 301b6e3b9c6SJames Smart #define lpfc_mqe_status_WORD word0 302b6e3b9c6SJames Smart #define lpfc_mqe_command_SHIFT 8 303b6e3b9c6SJames Smart #define lpfc_mqe_command_MASK 0x000000FF 304b6e3b9c6SJames Smart #define lpfc_mqe_command_WORD word0 305b6e3b9c6SJames Smart union { 3067ad20aa9SJames Smart struct lpfc_sli_config_emb0_subsys sli_config_emb0_subsys; 3077ad20aa9SJames Smart struct lpfc_sli_config_emb1_subsys sli_config_emb1_subsys; 308b6e3b9c6SJames Smart } un; 309b6e3b9c6SJames Smart }; 3107ad20aa9SJames Smart 311c691816eSJames Smart #define LPFC_FORCED_LINK_SPEED_NOT_SUPPORTED 0 312c691816eSJames Smart #define LPFC_FORCED_LINK_SPEED_SUPPORTED 1 313c691816eSJames Smart struct get_forced_link_speed_support { 314c691816eSJames Smart uint32_t command; 315c691816eSJames Smart }; 316c691816eSJames Smart struct forced_link_speed_support_reply { 317c691816eSJames Smart uint8_t supported; 318c691816eSJames Smart }; 319c691816eSJames Smart 320d2cc9bcdSJames Smart struct lpfc_bsg_ras_req { 321d2cc9bcdSJames Smart uint32_t command; 322d2cc9bcdSJames Smart }; 323d2cc9bcdSJames Smart 324d2cc9bcdSJames Smart struct lpfc_bsg_get_fwlog_req { 325d2cc9bcdSJames Smart uint32_t command; 326d2cc9bcdSJames Smart uint32_t read_size; 327d2cc9bcdSJames Smart uint32_t read_offset; 328d2cc9bcdSJames Smart }; 329d2cc9bcdSJames Smart 330d2cc9bcdSJames Smart struct lpfc_bsg_get_ras_lwpd { 331d2cc9bcdSJames Smart uint32_t offset; 332d2cc9bcdSJames Smart uint32_t wrap_count; 333d2cc9bcdSJames Smart }; 334d2cc9bcdSJames Smart 335d2cc9bcdSJames Smart struct lpfc_bsg_set_ras_config_req { 336d2cc9bcdSJames Smart uint32_t command; 337d2cc9bcdSJames Smart uint8_t action; 338d2cc9bcdSJames Smart #define LPFC_RASACTION_STOP_LOGGING 0x00 339d2cc9bcdSJames Smart #define LPFC_RASACTION_START_LOGGING 0x01 340d2cc9bcdSJames Smart uint8_t log_level; 341d2cc9bcdSJames Smart }; 342d2cc9bcdSJames Smart 343d2cc9bcdSJames Smart struct lpfc_bsg_get_ras_config_reply { 344d2cc9bcdSJames Smart uint8_t state; 345d2cc9bcdSJames Smart #define LPFC_RASLOG_STATE_STOPPED 0x00 346d2cc9bcdSJames Smart #define LPFC_RASLOG_STATE_RUNNING 0x01 347d2cc9bcdSJames Smart uint8_t log_level; 348d2cc9bcdSJames Smart uint32_t log_buff_sz; 349d2cc9bcdSJames Smart }; 350d2cc9bcdSJames Smart 3511dc5ec24SJames Smart struct lpfc_trunk_info { 3521dc5ec24SJames Smart uint32_t word0; 3531dc5ec24SJames Smart #define lpfc_trunk_info_link_status_SHIFT 0 3541dc5ec24SJames Smart #define lpfc_trunk_info_link_status_MASK 1 3551dc5ec24SJames Smart #define lpfc_trunk_info_link_status_WORD word0 3561dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active0_SHIFT 8 3571dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active0_MASK 1 3581dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active0_WORD word0 3591dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active1_SHIFT 9 3601dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active1_MASK 1 3611dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active1_WORD word0 3621dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active2_SHIFT 10 3631dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active2_MASK 1 3641dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active2_WORD word0 3651dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active3_SHIFT 11 3661dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active3_MASK 1 3671dc5ec24SJames Smart #define lpfc_trunk_info_trunk_active3_WORD word0 3681dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config0_SHIFT 12 3691dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config0_MASK 1 3701dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config0_WORD word0 3711dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config1_SHIFT 13 3721dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config1_MASK 1 3731dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config1_WORD word0 3741dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config2_SHIFT 14 3751dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config2_MASK 1 3761dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config2_WORD word0 3771dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config3_SHIFT 15 3781dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config3_MASK 1 3791dc5ec24SJames Smart #define lpfc_trunk_info_trunk_config3_WORD word0 3801dc5ec24SJames Smart uint16_t port_speed; 3811dc5ec24SJames Smart uint16_t logical_speed; 3821dc5ec24SJames Smart uint32_t reserved3; 3831dc5ec24SJames Smart }; 3841dc5ec24SJames Smart 3851dc5ec24SJames Smart struct get_trunk_info_req { 3861dc5ec24SJames Smart uint32_t command; 3871dc5ec24SJames Smart }; 388d2cc9bcdSJames Smart 3897ad20aa9SJames Smart /* driver only */ 3907ad20aa9SJames Smart #define SLI_CONFIG_NOT_HANDLED 0 3917ad20aa9SJames Smart #define SLI_CONFIG_HANDLED 1 392