Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2005-2010 Brocade Communications Systems, Inc. |
| 3 | * All rights reserved |
| 4 | * www.brocade.com |
| 5 | * |
| 6 | * Linux driver for Brocade Fibre Channel Host Bus Adapter. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU General Public License (GPL) Version 2 as |
| 10 | * published by the Free Software Foundation |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | */ |
| 17 | #ifndef BFAD_BSG_H |
| 18 | #define BFAD_BSG_H |
| 19 | |
| 20 | #include "bfa_defs.h" |
| 21 | #include "bfa_defs_fcs.h" |
| 22 | |
| 23 | /* Definitions of vendor unique structures and command codes passed in |
| 24 | * using FC_BSG_HST_VENDOR message code. |
| 25 | */ |
| 26 | enum { |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 27 | IOCMD_IOC_ENABLE = 0x1, |
| 28 | IOCMD_IOC_DISABLE, |
| 29 | IOCMD_IOC_GET_ATTR, |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 30 | IOCMD_IOC_GET_INFO, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 31 | IOCMD_IOC_GET_STATS, |
| 32 | IOCMD_IOC_GET_FWSTATS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 33 | IOCMD_IOC_RESET_STATS, |
| 34 | IOCMD_IOC_RESET_FWSTATS, |
| 35 | IOCMD_IOC_SET_ADAPTER_NAME, |
| 36 | IOCMD_IOC_SET_PORT_NAME, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 37 | IOCMD_IOCFC_GET_ATTR, |
| 38 | IOCMD_IOCFC_SET_INTR, |
| 39 | IOCMD_PORT_ENABLE, |
| 40 | IOCMD_PORT_DISABLE, |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 41 | IOCMD_PORT_GET_ATTR, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 42 | IOCMD_PORT_GET_STATS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 43 | IOCMD_PORT_RESET_STATS, |
| 44 | IOCMD_PORT_CFG_TOPO, |
| 45 | IOCMD_PORT_CFG_SPEED, |
| 46 | IOCMD_PORT_CFG_ALPA, |
| 47 | IOCMD_PORT_CFG_MAXFRSZ, |
| 48 | IOCMD_PORT_CLR_ALPA, |
| 49 | IOCMD_PORT_BBSC_ENABLE, |
| 50 | IOCMD_PORT_BBSC_DISABLE, |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 51 | IOCMD_LPORT_GET_ATTR, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 52 | IOCMD_LPORT_GET_RPORTS, |
| 53 | IOCMD_LPORT_GET_STATS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 54 | IOCMD_LPORT_RESET_STATS, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 55 | IOCMD_LPORT_GET_IOSTATS, |
| 56 | IOCMD_RPORT_GET_ATTR, |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 57 | IOCMD_RPORT_GET_ADDR, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 58 | IOCMD_RPORT_GET_STATS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 59 | IOCMD_RPORT_RESET_STATS, |
| 60 | IOCMD_RPORT_SET_SPEED, |
| 61 | IOCMD_VPORT_GET_ATTR, |
| 62 | IOCMD_VPORT_GET_STATS, |
| 63 | IOCMD_VPORT_RESET_STATS, |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 64 | IOCMD_FABRIC_GET_LPORTS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 65 | IOCMD_RATELIM_ENABLE, |
| 66 | IOCMD_RATELIM_DISABLE, |
| 67 | IOCMD_RATELIM_DEF_SPEED, |
| 68 | IOCMD_FCPIM_FAILOVER, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 69 | IOCMD_FCPIM_MODSTATS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 70 | IOCMD_FCPIM_MODSTATSCLR, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 71 | IOCMD_FCPIM_DEL_ITN_STATS, |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 72 | IOCMD_ITNIM_GET_ATTR, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 73 | IOCMD_ITNIM_GET_IOSTATS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 74 | IOCMD_ITNIM_RESET_STATS, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 75 | IOCMD_ITNIM_GET_ITNSTATS, |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 76 | IOCMD_IOC_PCIFN_CFG, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 77 | IOCMD_FCPORT_ENABLE, |
| 78 | IOCMD_FCPORT_DISABLE, |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 79 | IOCMD_PCIFN_CREATE, |
| 80 | IOCMD_PCIFN_DELETE, |
| 81 | IOCMD_PCIFN_BW, |
| 82 | IOCMD_ADAPTER_CFG_MODE, |
| 83 | IOCMD_PORT_CFG_MODE, |
| 84 | IOCMD_FLASH_ENABLE_OPTROM, |
| 85 | IOCMD_FLASH_DISABLE_OPTROM, |
Krishna Gudipati | a714134 | 2011-06-24 20:23:19 -0700 | [diff] [blame] | 86 | IOCMD_FAA_QUERY, |
Krishna Gudipati | 148d610 | 2011-06-24 20:25:36 -0700 | [diff] [blame] | 87 | IOCMD_CEE_GET_ATTR, |
| 88 | IOCMD_CEE_GET_STATS, |
| 89 | IOCMD_CEE_RESET_STATS, |
Krishna Gudipati | 51e569a | 2011-06-24 20:26:25 -0700 | [diff] [blame] | 90 | IOCMD_SFP_MEDIA, |
| 91 | IOCMD_SFP_SPEED, |
Krishna Gudipati | 5a54b1d | 2011-06-24 20:27:13 -0700 | [diff] [blame] | 92 | IOCMD_FLASH_GET_ATTR, |
| 93 | IOCMD_FLASH_ERASE_PART, |
| 94 | IOCMD_FLASH_UPDATE_PART, |
| 95 | IOCMD_FLASH_READ_PART, |
Krishna Gudipati | 3d7fc66 | 2011-06-24 20:28:17 -0700 | [diff] [blame] | 96 | IOCMD_DIAG_TEMP, |
| 97 | IOCMD_DIAG_MEMTEST, |
| 98 | IOCMD_DIAG_LOOPBACK, |
| 99 | IOCMD_DIAG_FWPING, |
| 100 | IOCMD_DIAG_QUEUETEST, |
| 101 | IOCMD_DIAG_SFP, |
| 102 | IOCMD_DIAG_LED, |
| 103 | IOCMD_DIAG_BEACON_LPORT, |
| 104 | IOCMD_DIAG_LB_STAT, |
Krishna Gudipati | 3350d98 | 2011-06-24 20:28:37 -0700 | [diff] [blame] | 105 | IOCMD_PHY_GET_ATTR, |
| 106 | IOCMD_PHY_GET_STATS, |
| 107 | IOCMD_PHY_UPDATE_FW, |
| 108 | IOCMD_PHY_READ_FW, |
Krishna Gudipati | 61e62e2 | 2011-06-24 20:29:07 -0700 | [diff] [blame] | 109 | IOCMD_VHBA_QUERY, |
| 110 | IOCMD_DEBUG_PORTLOG, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 111 | IOCMD_DEBUG_FW_CORE, |
| 112 | IOCMD_DEBUG_FW_STATE_CLR, |
| 113 | IOCMD_DEBUG_PORTLOG_CLR, |
| 114 | IOCMD_DEBUG_START_DTRC, |
| 115 | IOCMD_DEBUG_STOP_DTRC, |
| 116 | IOCMD_DEBUG_PORTLOG_CTL, |
Krishna Gudipati | 42a8e6e | 2011-07-20 17:01:52 -0700 | [diff] [blame] | 117 | IOCMD_FCPIM_PROFILE_ON, |
| 118 | IOCMD_FCPIM_PROFILE_OFF, |
| 119 | IOCMD_ITNIM_GET_IOPROFILE, |
Krishna Gudipati | 37ea055 | 2011-07-20 17:02:11 -0700 | [diff] [blame] | 120 | IOCMD_FCPORT_GET_STATS, |
| 121 | IOCMD_FCPORT_RESET_STATS, |
Krishna Gudipati | a46bd30 | 2011-07-20 17:02:32 -0700 | [diff] [blame] | 122 | IOCMD_BOOT_CFG, |
| 123 | IOCMD_BOOT_QUERY, |
| 124 | IOCMD_PREBOOT_QUERY, |
| 125 | IOCMD_ETHBOOT_CFG, |
| 126 | IOCMD_ETHBOOT_QUERY, |
Krishna Gudipati | 4519123 | 2011-07-20 17:02:50 -0700 | [diff] [blame] | 127 | IOCMD_TRUNK_ENABLE, |
| 128 | IOCMD_TRUNK_DISABLE, |
| 129 | IOCMD_TRUNK_GET_ATTR, |
Krishna Gudipati | 3ec4f2c | 2011-07-20 17:03:09 -0700 | [diff] [blame] | 130 | IOCMD_QOS_ENABLE, |
| 131 | IOCMD_QOS_DISABLE, |
| 132 | IOCMD_QOS_GET_ATTR, |
| 133 | IOCMD_QOS_GET_VC_ATTR, |
| 134 | IOCMD_QOS_GET_STATS, |
| 135 | IOCMD_QOS_RESET_STATS, |
Krishna Gudipati | c0350bf | 2011-07-20 17:03:27 -0700 | [diff] [blame] | 136 | IOCMD_VF_GET_STATS, |
| 137 | IOCMD_VF_RESET_STATS, |
Krishna Gudipati | 4c5d22b | 2011-07-20 17:04:24 -0700 | [diff] [blame] | 138 | IOCMD_FCPIM_LUNMASK_ENABLE, |
| 139 | IOCMD_FCPIM_LUNMASK_DISABLE, |
| 140 | IOCMD_FCPIM_LUNMASK_CLEAR, |
| 141 | IOCMD_FCPIM_LUNMASK_QUERY, |
| 142 | IOCMD_FCPIM_LUNMASK_ADD, |
| 143 | IOCMD_FCPIM_LUNMASK_DELETE, |
Krishna Gudipati | e353546 | 2012-09-21 17:26:07 -0700 | [diff] [blame^] | 144 | IOCMD_DIAG_DPORT_ENABLE, |
| 145 | IOCMD_DIAG_DPORT_DISABLE, |
| 146 | IOCMD_DIAG_DPORT_GET_STATE, |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 147 | }; |
| 148 | |
| 149 | struct bfa_bsg_gen_s { |
| 150 | bfa_status_t status; |
| 151 | u16 bfad_num; |
| 152 | u16 rsvd; |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 153 | }; |
| 154 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 155 | struct bfa_bsg_portlogctl_s { |
| 156 | bfa_status_t status; |
| 157 | u16 bfad_num; |
| 158 | u16 rsvd; |
| 159 | bfa_boolean_t ctl; |
| 160 | int inst_no; |
| 161 | }; |
| 162 | |
Krishna Gudipati | 42a8e6e | 2011-07-20 17:01:52 -0700 | [diff] [blame] | 163 | struct bfa_bsg_fcpim_profile_s { |
| 164 | bfa_status_t status; |
| 165 | u16 bfad_num; |
| 166 | u16 rsvd; |
| 167 | }; |
| 168 | |
| 169 | struct bfa_bsg_itnim_ioprofile_s { |
| 170 | bfa_status_t status; |
| 171 | u16 bfad_num; |
| 172 | u16 vf_id; |
| 173 | wwn_t lpwwn; |
| 174 | wwn_t rpwwn; |
| 175 | struct bfa_itnim_ioprofile_s ioprofile; |
| 176 | }; |
| 177 | |
Krishna Gudipati | 37ea055 | 2011-07-20 17:02:11 -0700 | [diff] [blame] | 178 | struct bfa_bsg_fcport_stats_s { |
| 179 | bfa_status_t status; |
| 180 | u16 bfad_num; |
| 181 | u16 rsvd; |
| 182 | union bfa_fcport_stats_u stats; |
| 183 | }; |
| 184 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 185 | struct bfa_bsg_ioc_name_s { |
| 186 | bfa_status_t status; |
| 187 | u16 bfad_num; |
| 188 | u16 rsvd; |
| 189 | char name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 190 | }; |
| 191 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 192 | struct bfa_bsg_ioc_info_s { |
| 193 | bfa_status_t status; |
| 194 | u16 bfad_num; |
| 195 | u16 rsvd; |
| 196 | char serialnum[64]; |
| 197 | char hwpath[BFA_STRING_32]; |
| 198 | char adapter_hwpath[BFA_STRING_32]; |
| 199 | char guid[BFA_ADAPTER_SYM_NAME_LEN*2]; |
| 200 | char name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 201 | char port_name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 202 | char eth_name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 203 | wwn_t pwwn; |
| 204 | wwn_t nwwn; |
| 205 | wwn_t factorypwwn; |
| 206 | wwn_t factorynwwn; |
| 207 | mac_t mac; |
| 208 | mac_t factory_mac; /* Factory mac address */ |
| 209 | mac_t current_mac; /* Currently assigned mac address */ |
| 210 | enum bfa_ioc_type_e ioc_type; |
| 211 | u16 pvid; /* Port vlan id */ |
| 212 | u16 rsvd1; |
| 213 | u32 host; |
| 214 | u32 bandwidth; /* For PF support */ |
| 215 | u32 rsvd2; |
| 216 | }; |
| 217 | |
| 218 | struct bfa_bsg_ioc_attr_s { |
| 219 | bfa_status_t status; |
| 220 | u16 bfad_num; |
| 221 | u16 rsvd; |
| 222 | struct bfa_ioc_attr_s ioc_attr; |
| 223 | }; |
| 224 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 225 | struct bfa_bsg_ioc_stats_s { |
| 226 | bfa_status_t status; |
| 227 | u16 bfad_num; |
| 228 | u16 rsvd; |
| 229 | struct bfa_ioc_stats_s ioc_stats; |
| 230 | }; |
| 231 | |
| 232 | struct bfa_bsg_ioc_fwstats_s { |
| 233 | bfa_status_t status; |
| 234 | u16 bfad_num; |
| 235 | u16 rsvd; |
| 236 | u32 buf_size; |
| 237 | u32 rsvd1; |
| 238 | u64 buf_ptr; |
| 239 | }; |
| 240 | |
| 241 | struct bfa_bsg_iocfc_attr_s { |
| 242 | bfa_status_t status; |
| 243 | u16 bfad_num; |
| 244 | u16 rsvd; |
| 245 | struct bfa_iocfc_attr_s iocfc_attr; |
| 246 | }; |
| 247 | |
| 248 | struct bfa_bsg_iocfc_intr_s { |
| 249 | bfa_status_t status; |
| 250 | u16 bfad_num; |
| 251 | u16 rsvd; |
| 252 | struct bfa_iocfc_intr_attr_s attr; |
| 253 | }; |
| 254 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 255 | struct bfa_bsg_port_attr_s { |
| 256 | bfa_status_t status; |
| 257 | u16 bfad_num; |
| 258 | u16 rsvd; |
| 259 | struct bfa_port_attr_s attr; |
| 260 | }; |
| 261 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 262 | struct bfa_bsg_port_cfg_s { |
| 263 | bfa_status_t status; |
| 264 | u16 bfad_num; |
| 265 | u16 rsvd; |
| 266 | u32 param; |
| 267 | u32 rsvd1; |
| 268 | }; |
| 269 | |
| 270 | struct bfa_bsg_port_cfg_maxfrsize_s { |
| 271 | bfa_status_t status; |
| 272 | u16 bfad_num; |
| 273 | u16 maxfrsize; |
| 274 | }; |
| 275 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 276 | struct bfa_bsg_port_stats_s { |
| 277 | bfa_status_t status; |
| 278 | u16 bfad_num; |
| 279 | u16 rsvd; |
| 280 | u32 buf_size; |
| 281 | u32 rsvd1; |
| 282 | u64 buf_ptr; |
| 283 | }; |
| 284 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 285 | struct bfa_bsg_lport_attr_s { |
| 286 | bfa_status_t status; |
| 287 | u16 bfad_num; |
| 288 | u16 vf_id; |
| 289 | wwn_t pwwn; |
| 290 | struct bfa_lport_attr_s port_attr; |
| 291 | }; |
| 292 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 293 | struct bfa_bsg_lport_stats_s { |
| 294 | bfa_status_t status; |
| 295 | u16 bfad_num; |
| 296 | u16 vf_id; |
| 297 | wwn_t pwwn; |
| 298 | struct bfa_lport_stats_s port_stats; |
| 299 | }; |
| 300 | |
| 301 | struct bfa_bsg_lport_iostats_s { |
| 302 | bfa_status_t status; |
| 303 | u16 bfad_num; |
| 304 | u16 vf_id; |
| 305 | wwn_t pwwn; |
| 306 | struct bfa_itnim_iostats_s iostats; |
| 307 | }; |
| 308 | |
| 309 | struct bfa_bsg_lport_get_rports_s { |
| 310 | bfa_status_t status; |
| 311 | u16 bfad_num; |
| 312 | u16 vf_id; |
| 313 | wwn_t pwwn; |
| 314 | u64 rbuf_ptr; |
| 315 | u32 nrports; |
| 316 | u32 rsvd; |
| 317 | }; |
| 318 | |
| 319 | struct bfa_bsg_rport_attr_s { |
| 320 | bfa_status_t status; |
| 321 | u16 bfad_num; |
| 322 | u16 vf_id; |
| 323 | wwn_t pwwn; |
| 324 | wwn_t rpwwn; |
Krishna Gudipati | ee1a4a4 | 2012-08-22 19:50:43 -0700 | [diff] [blame] | 325 | u32 pid; |
| 326 | u32 rsvd; |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 327 | struct bfa_rport_attr_s attr; |
| 328 | }; |
| 329 | |
| 330 | struct bfa_bsg_rport_stats_s { |
| 331 | bfa_status_t status; |
| 332 | u16 bfad_num; |
| 333 | u16 vf_id; |
| 334 | wwn_t pwwn; |
| 335 | wwn_t rpwwn; |
| 336 | struct bfa_rport_stats_s stats; |
| 337 | }; |
| 338 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 339 | struct bfa_bsg_rport_scsi_addr_s { |
| 340 | bfa_status_t status; |
| 341 | u16 bfad_num; |
| 342 | u16 vf_id; |
| 343 | wwn_t pwwn; |
| 344 | wwn_t rpwwn; |
| 345 | u32 host; |
| 346 | u32 bus; |
| 347 | u32 target; |
| 348 | u32 lun; |
| 349 | }; |
| 350 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 351 | struct bfa_bsg_rport_reset_stats_s { |
| 352 | bfa_status_t status; |
| 353 | u16 bfad_num; |
| 354 | u16 vf_id; |
| 355 | wwn_t pwwn; |
| 356 | wwn_t rpwwn; |
| 357 | }; |
| 358 | |
| 359 | struct bfa_bsg_rport_set_speed_s { |
| 360 | bfa_status_t status; |
| 361 | u16 bfad_num; |
| 362 | u16 vf_id; |
| 363 | enum bfa_port_speed speed; |
| 364 | u32 rsvd; |
| 365 | wwn_t pwwn; |
| 366 | wwn_t rpwwn; |
| 367 | }; |
| 368 | |
| 369 | struct bfa_bsg_vport_attr_s { |
| 370 | bfa_status_t status; |
| 371 | u16 bfad_num; |
| 372 | u16 vf_id; |
| 373 | wwn_t vpwwn; |
| 374 | struct bfa_vport_attr_s vport_attr; |
| 375 | }; |
| 376 | |
| 377 | struct bfa_bsg_vport_stats_s { |
| 378 | bfa_status_t status; |
| 379 | u16 bfad_num; |
| 380 | u16 vf_id; |
| 381 | wwn_t vpwwn; |
| 382 | struct bfa_vport_stats_s vport_stats; |
| 383 | }; |
| 384 | |
| 385 | struct bfa_bsg_reset_stats_s { |
| 386 | bfa_status_t status; |
| 387 | u16 bfad_num; |
| 388 | u16 vf_id; |
| 389 | wwn_t vpwwn; |
| 390 | }; |
| 391 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 392 | struct bfa_bsg_fabric_get_lports_s { |
| 393 | bfa_status_t status; |
| 394 | u16 bfad_num; |
| 395 | u16 vf_id; |
| 396 | u64 buf_ptr; |
| 397 | u32 nports; |
| 398 | u32 rsvd; |
| 399 | }; |
| 400 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 401 | struct bfa_bsg_trl_speed_s { |
| 402 | bfa_status_t status; |
| 403 | u16 bfad_num; |
| 404 | u16 rsvd; |
| 405 | enum bfa_port_speed speed; |
| 406 | }; |
| 407 | |
| 408 | struct bfa_bsg_fcpim_s { |
| 409 | bfa_status_t status; |
| 410 | u16 bfad_num; |
| 411 | u16 param; |
| 412 | }; |
| 413 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 414 | struct bfa_bsg_fcpim_modstats_s { |
| 415 | bfa_status_t status; |
| 416 | u16 bfad_num; |
| 417 | struct bfa_itnim_iostats_s modstats; |
| 418 | }; |
| 419 | |
| 420 | struct bfa_bsg_fcpim_del_itn_stats_s { |
| 421 | bfa_status_t status; |
| 422 | u16 bfad_num; |
| 423 | struct bfa_fcpim_del_itn_stats_s modstats; |
| 424 | }; |
| 425 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 426 | struct bfa_bsg_fcpim_modstatsclr_s { |
| 427 | bfa_status_t status; |
| 428 | u16 bfad_num; |
| 429 | }; |
| 430 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 431 | struct bfa_bsg_itnim_attr_s { |
| 432 | bfa_status_t status; |
| 433 | u16 bfad_num; |
| 434 | u16 vf_id; |
| 435 | wwn_t lpwwn; |
| 436 | wwn_t rpwwn; |
| 437 | struct bfa_itnim_attr_s attr; |
| 438 | }; |
| 439 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 440 | struct bfa_bsg_itnim_iostats_s { |
| 441 | bfa_status_t status; |
| 442 | u16 bfad_num; |
| 443 | u16 vf_id; |
| 444 | wwn_t lpwwn; |
| 445 | wwn_t rpwwn; |
| 446 | struct bfa_itnim_iostats_s iostats; |
| 447 | }; |
| 448 | |
| 449 | struct bfa_bsg_itnim_itnstats_s { |
| 450 | bfa_status_t status; |
| 451 | u16 bfad_num; |
| 452 | u16 vf_id; |
| 453 | wwn_t lpwwn; |
| 454 | wwn_t rpwwn; |
| 455 | struct bfa_itnim_stats_s itnstats; |
| 456 | }; |
| 457 | |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 458 | struct bfa_bsg_pcifn_cfg_s { |
| 459 | bfa_status_t status; |
| 460 | u16 bfad_num; |
| 461 | u16 rsvd; |
| 462 | struct bfa_ablk_cfg_s pcifn_cfg; |
| 463 | }; |
| 464 | |
| 465 | struct bfa_bsg_pcifn_s { |
| 466 | bfa_status_t status; |
| 467 | u16 bfad_num; |
| 468 | u16 pcifn_id; |
| 469 | u32 bandwidth; |
| 470 | u8 port; |
| 471 | enum bfi_pcifn_class pcifn_class; |
| 472 | u8 rsvd[1]; |
| 473 | }; |
| 474 | |
| 475 | struct bfa_bsg_adapter_cfg_mode_s { |
| 476 | bfa_status_t status; |
| 477 | u16 bfad_num; |
| 478 | u16 rsvd; |
| 479 | struct bfa_adapter_cfg_mode_s cfg; |
| 480 | }; |
| 481 | |
| 482 | struct bfa_bsg_port_cfg_mode_s { |
| 483 | bfa_status_t status; |
| 484 | u16 bfad_num; |
| 485 | u16 instance; |
| 486 | struct bfa_port_cfg_mode_s cfg; |
| 487 | }; |
| 488 | |
Krishna Gudipati | a714134 | 2011-06-24 20:23:19 -0700 | [diff] [blame] | 489 | struct bfa_bsg_faa_attr_s { |
| 490 | bfa_status_t status; |
| 491 | u16 bfad_num; |
| 492 | u16 rsvd; |
| 493 | struct bfa_faa_attr_s faa_attr; |
| 494 | }; |
| 495 | |
Krishna Gudipati | 148d610 | 2011-06-24 20:25:36 -0700 | [diff] [blame] | 496 | struct bfa_bsg_cee_attr_s { |
| 497 | bfa_status_t status; |
| 498 | u16 bfad_num; |
| 499 | u16 rsvd; |
| 500 | u32 buf_size; |
| 501 | u32 rsvd1; |
| 502 | u64 buf_ptr; |
| 503 | }; |
| 504 | |
| 505 | struct bfa_bsg_cee_stats_s { |
| 506 | bfa_status_t status; |
| 507 | u16 bfad_num; |
| 508 | u16 rsvd; |
| 509 | u32 buf_size; |
| 510 | u32 rsvd1; |
| 511 | u64 buf_ptr; |
| 512 | }; |
| 513 | |
Krishna Gudipati | 51e569a | 2011-06-24 20:26:25 -0700 | [diff] [blame] | 514 | struct bfa_bsg_sfp_media_s { |
| 515 | bfa_status_t status; |
| 516 | u16 bfad_num; |
| 517 | u16 rsvd; |
| 518 | enum bfa_defs_sfp_media_e media; |
| 519 | }; |
| 520 | |
| 521 | struct bfa_bsg_sfp_speed_s { |
| 522 | bfa_status_t status; |
| 523 | u16 bfad_num; |
| 524 | u16 rsvd; |
| 525 | enum bfa_port_speed speed; |
| 526 | }; |
| 527 | |
Krishna Gudipati | 5a54b1d | 2011-06-24 20:27:13 -0700 | [diff] [blame] | 528 | struct bfa_bsg_flash_attr_s { |
| 529 | bfa_status_t status; |
| 530 | u16 bfad_num; |
| 531 | u16 rsvd; |
| 532 | struct bfa_flash_attr_s attr; |
| 533 | }; |
| 534 | |
| 535 | struct bfa_bsg_flash_s { |
| 536 | bfa_status_t status; |
| 537 | u16 bfad_num; |
| 538 | u8 instance; |
| 539 | u8 rsvd; |
| 540 | enum bfa_flash_part_type type; |
| 541 | int bufsz; |
| 542 | u64 buf_ptr; |
| 543 | }; |
| 544 | |
Krishna Gudipati | 3d7fc66 | 2011-06-24 20:28:17 -0700 | [diff] [blame] | 545 | struct bfa_bsg_diag_get_temp_s { |
| 546 | bfa_status_t status; |
| 547 | u16 bfad_num; |
| 548 | u16 rsvd; |
| 549 | struct bfa_diag_results_tempsensor_s result; |
| 550 | }; |
| 551 | |
| 552 | struct bfa_bsg_diag_memtest_s { |
| 553 | bfa_status_t status; |
| 554 | u16 bfad_num; |
| 555 | u16 rsvd[3]; |
| 556 | u32 pat; |
| 557 | struct bfa_diag_memtest_result result; |
| 558 | struct bfa_diag_memtest_s memtest; |
| 559 | }; |
| 560 | |
| 561 | struct bfa_bsg_diag_loopback_s { |
| 562 | bfa_status_t status; |
| 563 | u16 bfad_num; |
| 564 | u16 rsvd; |
| 565 | enum bfa_port_opmode opmode; |
| 566 | enum bfa_port_speed speed; |
| 567 | u32 lpcnt; |
| 568 | u32 pat; |
| 569 | struct bfa_diag_loopback_result_s result; |
| 570 | }; |
| 571 | |
| 572 | struct bfa_bsg_diag_fwping_s { |
| 573 | bfa_status_t status; |
| 574 | u16 bfad_num; |
| 575 | u16 rsvd; |
| 576 | u32 cnt; |
| 577 | u32 pattern; |
| 578 | struct bfa_diag_results_fwping result; |
| 579 | }; |
| 580 | |
| 581 | struct bfa_bsg_diag_qtest_s { |
| 582 | bfa_status_t status; |
| 583 | u16 bfad_num; |
| 584 | u16 rsvd; |
| 585 | u32 force; |
| 586 | u32 queue; |
| 587 | struct bfa_diag_qtest_result_s result; |
| 588 | }; |
| 589 | |
| 590 | struct bfa_bsg_sfp_show_s { |
| 591 | bfa_status_t status; |
| 592 | u16 bfad_num; |
| 593 | u16 rsvd; |
| 594 | struct sfp_mem_s sfp; |
| 595 | }; |
| 596 | |
| 597 | struct bfa_bsg_diag_led_s { |
| 598 | bfa_status_t status; |
| 599 | u16 bfad_num; |
| 600 | u16 rsvd; |
| 601 | struct bfa_diag_ledtest_s ledtest; |
| 602 | }; |
| 603 | |
| 604 | struct bfa_bsg_diag_beacon_s { |
| 605 | bfa_status_t status; |
| 606 | u16 bfad_num; |
| 607 | u16 rsvd; |
| 608 | bfa_boolean_t beacon; |
| 609 | bfa_boolean_t link_e2e_beacon; |
| 610 | u32 second; |
| 611 | }; |
| 612 | |
| 613 | struct bfa_bsg_diag_lb_stat_s { |
| 614 | bfa_status_t status; |
| 615 | u16 bfad_num; |
| 616 | u16 rsvd; |
| 617 | }; |
| 618 | |
Krishna Gudipati | e353546 | 2012-09-21 17:26:07 -0700 | [diff] [blame^] | 619 | struct bfa_bsg_diag_dport_get_state_s { |
| 620 | bfa_status_t status; |
| 621 | u16 bfad_num; |
| 622 | u16 rsvd; |
| 623 | enum bfa_dport_state state; |
| 624 | }; |
| 625 | |
Krishna Gudipati | 3350d98 | 2011-06-24 20:28:37 -0700 | [diff] [blame] | 626 | struct bfa_bsg_phy_attr_s { |
| 627 | bfa_status_t status; |
| 628 | u16 bfad_num; |
| 629 | u16 instance; |
| 630 | struct bfa_phy_attr_s attr; |
| 631 | }; |
| 632 | |
| 633 | struct bfa_bsg_phy_s { |
| 634 | bfa_status_t status; |
| 635 | u16 bfad_num; |
| 636 | u16 instance; |
| 637 | u64 bufsz; |
| 638 | u64 buf_ptr; |
| 639 | }; |
| 640 | |
Krishna Gudipati | 61e62e2 | 2011-06-24 20:29:07 -0700 | [diff] [blame] | 641 | struct bfa_bsg_debug_s { |
| 642 | bfa_status_t status; |
| 643 | u16 bfad_num; |
| 644 | u16 rsvd; |
| 645 | u32 bufsz; |
| 646 | int inst_no; |
| 647 | u64 buf_ptr; |
| 648 | u64 offset; |
| 649 | }; |
| 650 | |
Krishna Gudipati | 3350d98 | 2011-06-24 20:28:37 -0700 | [diff] [blame] | 651 | struct bfa_bsg_phy_stats_s { |
| 652 | bfa_status_t status; |
| 653 | u16 bfad_num; |
| 654 | u16 instance; |
| 655 | struct bfa_phy_stats_s stats; |
| 656 | }; |
| 657 | |
Krishna Gudipati | 61e62e2 | 2011-06-24 20:29:07 -0700 | [diff] [blame] | 658 | struct bfa_bsg_vhba_attr_s { |
| 659 | bfa_status_t status; |
| 660 | u16 bfad_num; |
| 661 | u16 pcifn_id; |
| 662 | struct bfa_vhba_attr_s attr; |
| 663 | }; |
| 664 | |
Krishna Gudipati | a46bd30 | 2011-07-20 17:02:32 -0700 | [diff] [blame] | 665 | struct bfa_bsg_boot_s { |
| 666 | bfa_status_t status; |
| 667 | u16 bfad_num; |
| 668 | u16 rsvd; |
| 669 | struct bfa_boot_cfg_s cfg; |
| 670 | }; |
| 671 | |
| 672 | struct bfa_bsg_preboot_s { |
| 673 | bfa_status_t status; |
| 674 | u16 bfad_num; |
| 675 | u16 rsvd; |
| 676 | struct bfa_boot_pbc_s cfg; |
| 677 | }; |
| 678 | |
| 679 | struct bfa_bsg_ethboot_s { |
| 680 | bfa_status_t status; |
| 681 | u16 bfad_num; |
| 682 | u16 rsvd; |
| 683 | struct bfa_ethboot_cfg_s cfg; |
| 684 | }; |
| 685 | |
Krishna Gudipati | 4519123 | 2011-07-20 17:02:50 -0700 | [diff] [blame] | 686 | struct bfa_bsg_trunk_attr_s { |
| 687 | bfa_status_t status; |
| 688 | u16 bfad_num; |
| 689 | u16 rsvd; |
| 690 | struct bfa_trunk_attr_s attr; |
| 691 | }; |
| 692 | |
Krishna Gudipati | 3ec4f2c | 2011-07-20 17:03:09 -0700 | [diff] [blame] | 693 | struct bfa_bsg_qos_attr_s { |
| 694 | bfa_status_t status; |
| 695 | u16 bfad_num; |
| 696 | u16 rsvd; |
| 697 | struct bfa_qos_attr_s attr; |
| 698 | }; |
| 699 | |
| 700 | struct bfa_bsg_qos_vc_attr_s { |
| 701 | bfa_status_t status; |
| 702 | u16 bfad_num; |
| 703 | u16 rsvd; |
| 704 | struct bfa_qos_vc_attr_s attr; |
| 705 | }; |
| 706 | |
Krishna Gudipati | c0350bf | 2011-07-20 17:03:27 -0700 | [diff] [blame] | 707 | struct bfa_bsg_vf_stats_s { |
| 708 | bfa_status_t status; |
| 709 | u16 bfad_num; |
| 710 | u16 vf_id; |
| 711 | struct bfa_vf_stats_s stats; |
| 712 | }; |
| 713 | |
| 714 | struct bfa_bsg_vf_reset_stats_s { |
| 715 | bfa_status_t status; |
| 716 | u16 bfad_num; |
| 717 | u16 vf_id; |
| 718 | }; |
| 719 | |
Krishna Gudipati | 4c5d22b | 2011-07-20 17:04:24 -0700 | [diff] [blame] | 720 | struct bfa_bsg_fcpim_lunmask_query_s { |
| 721 | bfa_status_t status; |
| 722 | u16 bfad_num; |
| 723 | struct bfa_lunmask_cfg_s lun_mask; |
| 724 | }; |
| 725 | |
| 726 | struct bfa_bsg_fcpim_lunmask_s { |
| 727 | bfa_status_t status; |
| 728 | u16 bfad_num; |
| 729 | u16 vf_id; |
| 730 | wwn_t pwwn; |
| 731 | wwn_t rpwwn; |
| 732 | struct scsi_lun lun; |
| 733 | }; |
| 734 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 735 | struct bfa_bsg_fcpt_s { |
| 736 | bfa_status_t status; |
| 737 | u16 vf_id; |
| 738 | wwn_t lpwwn; |
| 739 | wwn_t dpwwn; |
| 740 | u32 tsecs; |
| 741 | int cts; |
| 742 | enum fc_cos cos; |
| 743 | struct fchs_s fchs; |
| 744 | }; |
| 745 | #define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s |
| 746 | |
| 747 | struct bfa_bsg_data { |
| 748 | int payload_len; |
| 749 | void *payload; |
| 750 | }; |
| 751 | |
| 752 | #define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \ |
| 753 | (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \ |
| 754 | BFA_STATUS_FAILED : BFA_STATUS_OK) |
| 755 | |
| 756 | #endif /* BFAD_BSG_H */ |