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 | 6894f01 | 2012-09-21 17:26:31 -0700 | [diff] [blame^] | 147 | IOCMD_QOS_SET_BW, |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 148 | }; |
| 149 | |
| 150 | struct bfa_bsg_gen_s { |
| 151 | bfa_status_t status; |
| 152 | u16 bfad_num; |
| 153 | u16 rsvd; |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 154 | }; |
| 155 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 156 | struct bfa_bsg_portlogctl_s { |
| 157 | bfa_status_t status; |
| 158 | u16 bfad_num; |
| 159 | u16 rsvd; |
| 160 | bfa_boolean_t ctl; |
| 161 | int inst_no; |
| 162 | }; |
| 163 | |
Krishna Gudipati | 42a8e6e | 2011-07-20 17:01:52 -0700 | [diff] [blame] | 164 | struct bfa_bsg_fcpim_profile_s { |
| 165 | bfa_status_t status; |
| 166 | u16 bfad_num; |
| 167 | u16 rsvd; |
| 168 | }; |
| 169 | |
| 170 | struct bfa_bsg_itnim_ioprofile_s { |
| 171 | bfa_status_t status; |
| 172 | u16 bfad_num; |
| 173 | u16 vf_id; |
| 174 | wwn_t lpwwn; |
| 175 | wwn_t rpwwn; |
| 176 | struct bfa_itnim_ioprofile_s ioprofile; |
| 177 | }; |
| 178 | |
Krishna Gudipati | 37ea055 | 2011-07-20 17:02:11 -0700 | [diff] [blame] | 179 | struct bfa_bsg_fcport_stats_s { |
| 180 | bfa_status_t status; |
| 181 | u16 bfad_num; |
| 182 | u16 rsvd; |
| 183 | union bfa_fcport_stats_u stats; |
| 184 | }; |
| 185 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 186 | struct bfa_bsg_ioc_name_s { |
| 187 | bfa_status_t status; |
| 188 | u16 bfad_num; |
| 189 | u16 rsvd; |
| 190 | char name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 191 | }; |
| 192 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 193 | struct bfa_bsg_ioc_info_s { |
| 194 | bfa_status_t status; |
| 195 | u16 bfad_num; |
| 196 | u16 rsvd; |
| 197 | char serialnum[64]; |
| 198 | char hwpath[BFA_STRING_32]; |
| 199 | char adapter_hwpath[BFA_STRING_32]; |
| 200 | char guid[BFA_ADAPTER_SYM_NAME_LEN*2]; |
| 201 | char name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 202 | char port_name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 203 | char eth_name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 204 | wwn_t pwwn; |
| 205 | wwn_t nwwn; |
| 206 | wwn_t factorypwwn; |
| 207 | wwn_t factorynwwn; |
| 208 | mac_t mac; |
| 209 | mac_t factory_mac; /* Factory mac address */ |
| 210 | mac_t current_mac; /* Currently assigned mac address */ |
| 211 | enum bfa_ioc_type_e ioc_type; |
| 212 | u16 pvid; /* Port vlan id */ |
| 213 | u16 rsvd1; |
| 214 | u32 host; |
| 215 | u32 bandwidth; /* For PF support */ |
| 216 | u32 rsvd2; |
| 217 | }; |
| 218 | |
| 219 | struct bfa_bsg_ioc_attr_s { |
| 220 | bfa_status_t status; |
| 221 | u16 bfad_num; |
| 222 | u16 rsvd; |
| 223 | struct bfa_ioc_attr_s ioc_attr; |
| 224 | }; |
| 225 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 226 | struct bfa_bsg_ioc_stats_s { |
| 227 | bfa_status_t status; |
| 228 | u16 bfad_num; |
| 229 | u16 rsvd; |
| 230 | struct bfa_ioc_stats_s ioc_stats; |
| 231 | }; |
| 232 | |
| 233 | struct bfa_bsg_ioc_fwstats_s { |
| 234 | bfa_status_t status; |
| 235 | u16 bfad_num; |
| 236 | u16 rsvd; |
| 237 | u32 buf_size; |
| 238 | u32 rsvd1; |
| 239 | u64 buf_ptr; |
| 240 | }; |
| 241 | |
| 242 | struct bfa_bsg_iocfc_attr_s { |
| 243 | bfa_status_t status; |
| 244 | u16 bfad_num; |
| 245 | u16 rsvd; |
| 246 | struct bfa_iocfc_attr_s iocfc_attr; |
| 247 | }; |
| 248 | |
| 249 | struct bfa_bsg_iocfc_intr_s { |
| 250 | bfa_status_t status; |
| 251 | u16 bfad_num; |
| 252 | u16 rsvd; |
| 253 | struct bfa_iocfc_intr_attr_s attr; |
| 254 | }; |
| 255 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 256 | struct bfa_bsg_port_attr_s { |
| 257 | bfa_status_t status; |
| 258 | u16 bfad_num; |
| 259 | u16 rsvd; |
| 260 | struct bfa_port_attr_s attr; |
| 261 | }; |
| 262 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 263 | struct bfa_bsg_port_cfg_s { |
| 264 | bfa_status_t status; |
| 265 | u16 bfad_num; |
| 266 | u16 rsvd; |
| 267 | u32 param; |
| 268 | u32 rsvd1; |
| 269 | }; |
| 270 | |
| 271 | struct bfa_bsg_port_cfg_maxfrsize_s { |
| 272 | bfa_status_t status; |
| 273 | u16 bfad_num; |
| 274 | u16 maxfrsize; |
| 275 | }; |
| 276 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 277 | struct bfa_bsg_port_stats_s { |
| 278 | bfa_status_t status; |
| 279 | u16 bfad_num; |
| 280 | u16 rsvd; |
| 281 | u32 buf_size; |
| 282 | u32 rsvd1; |
| 283 | u64 buf_ptr; |
| 284 | }; |
| 285 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 286 | struct bfa_bsg_lport_attr_s { |
| 287 | bfa_status_t status; |
| 288 | u16 bfad_num; |
| 289 | u16 vf_id; |
| 290 | wwn_t pwwn; |
| 291 | struct bfa_lport_attr_s port_attr; |
| 292 | }; |
| 293 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 294 | struct bfa_bsg_lport_stats_s { |
| 295 | bfa_status_t status; |
| 296 | u16 bfad_num; |
| 297 | u16 vf_id; |
| 298 | wwn_t pwwn; |
| 299 | struct bfa_lport_stats_s port_stats; |
| 300 | }; |
| 301 | |
| 302 | struct bfa_bsg_lport_iostats_s { |
| 303 | bfa_status_t status; |
| 304 | u16 bfad_num; |
| 305 | u16 vf_id; |
| 306 | wwn_t pwwn; |
| 307 | struct bfa_itnim_iostats_s iostats; |
| 308 | }; |
| 309 | |
| 310 | struct bfa_bsg_lport_get_rports_s { |
| 311 | bfa_status_t status; |
| 312 | u16 bfad_num; |
| 313 | u16 vf_id; |
| 314 | wwn_t pwwn; |
| 315 | u64 rbuf_ptr; |
| 316 | u32 nrports; |
| 317 | u32 rsvd; |
| 318 | }; |
| 319 | |
| 320 | struct bfa_bsg_rport_attr_s { |
| 321 | bfa_status_t status; |
| 322 | u16 bfad_num; |
| 323 | u16 vf_id; |
| 324 | wwn_t pwwn; |
| 325 | wwn_t rpwwn; |
Krishna Gudipati | ee1a4a4 | 2012-08-22 19:50:43 -0700 | [diff] [blame] | 326 | u32 pid; |
| 327 | u32 rsvd; |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 328 | struct bfa_rport_attr_s attr; |
| 329 | }; |
| 330 | |
| 331 | struct bfa_bsg_rport_stats_s { |
| 332 | bfa_status_t status; |
| 333 | u16 bfad_num; |
| 334 | u16 vf_id; |
| 335 | wwn_t pwwn; |
| 336 | wwn_t rpwwn; |
| 337 | struct bfa_rport_stats_s stats; |
| 338 | }; |
| 339 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 340 | struct bfa_bsg_rport_scsi_addr_s { |
| 341 | bfa_status_t status; |
| 342 | u16 bfad_num; |
| 343 | u16 vf_id; |
| 344 | wwn_t pwwn; |
| 345 | wwn_t rpwwn; |
| 346 | u32 host; |
| 347 | u32 bus; |
| 348 | u32 target; |
| 349 | u32 lun; |
| 350 | }; |
| 351 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 352 | struct bfa_bsg_rport_reset_stats_s { |
| 353 | bfa_status_t status; |
| 354 | u16 bfad_num; |
| 355 | u16 vf_id; |
| 356 | wwn_t pwwn; |
| 357 | wwn_t rpwwn; |
| 358 | }; |
| 359 | |
| 360 | struct bfa_bsg_rport_set_speed_s { |
| 361 | bfa_status_t status; |
| 362 | u16 bfad_num; |
| 363 | u16 vf_id; |
| 364 | enum bfa_port_speed speed; |
| 365 | u32 rsvd; |
| 366 | wwn_t pwwn; |
| 367 | wwn_t rpwwn; |
| 368 | }; |
| 369 | |
| 370 | struct bfa_bsg_vport_attr_s { |
| 371 | bfa_status_t status; |
| 372 | u16 bfad_num; |
| 373 | u16 vf_id; |
| 374 | wwn_t vpwwn; |
| 375 | struct bfa_vport_attr_s vport_attr; |
| 376 | }; |
| 377 | |
| 378 | struct bfa_bsg_vport_stats_s { |
| 379 | bfa_status_t status; |
| 380 | u16 bfad_num; |
| 381 | u16 vf_id; |
| 382 | wwn_t vpwwn; |
| 383 | struct bfa_vport_stats_s vport_stats; |
| 384 | }; |
| 385 | |
| 386 | struct bfa_bsg_reset_stats_s { |
| 387 | bfa_status_t status; |
| 388 | u16 bfad_num; |
| 389 | u16 vf_id; |
| 390 | wwn_t vpwwn; |
| 391 | }; |
| 392 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 393 | struct bfa_bsg_fabric_get_lports_s { |
| 394 | bfa_status_t status; |
| 395 | u16 bfad_num; |
| 396 | u16 vf_id; |
| 397 | u64 buf_ptr; |
| 398 | u32 nports; |
| 399 | u32 rsvd; |
| 400 | }; |
| 401 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 402 | struct bfa_bsg_trl_speed_s { |
| 403 | bfa_status_t status; |
| 404 | u16 bfad_num; |
| 405 | u16 rsvd; |
| 406 | enum bfa_port_speed speed; |
| 407 | }; |
| 408 | |
| 409 | struct bfa_bsg_fcpim_s { |
| 410 | bfa_status_t status; |
| 411 | u16 bfad_num; |
| 412 | u16 param; |
| 413 | }; |
| 414 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 415 | struct bfa_bsg_fcpim_modstats_s { |
| 416 | bfa_status_t status; |
| 417 | u16 bfad_num; |
| 418 | struct bfa_itnim_iostats_s modstats; |
| 419 | }; |
| 420 | |
| 421 | struct bfa_bsg_fcpim_del_itn_stats_s { |
| 422 | bfa_status_t status; |
| 423 | u16 bfad_num; |
| 424 | struct bfa_fcpim_del_itn_stats_s modstats; |
| 425 | }; |
| 426 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 427 | struct bfa_bsg_fcpim_modstatsclr_s { |
| 428 | bfa_status_t status; |
| 429 | u16 bfad_num; |
| 430 | }; |
| 431 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 432 | struct bfa_bsg_itnim_attr_s { |
| 433 | bfa_status_t status; |
| 434 | u16 bfad_num; |
| 435 | u16 vf_id; |
| 436 | wwn_t lpwwn; |
| 437 | wwn_t rpwwn; |
| 438 | struct bfa_itnim_attr_s attr; |
| 439 | }; |
| 440 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 441 | struct bfa_bsg_itnim_iostats_s { |
| 442 | bfa_status_t status; |
| 443 | u16 bfad_num; |
| 444 | u16 vf_id; |
| 445 | wwn_t lpwwn; |
| 446 | wwn_t rpwwn; |
| 447 | struct bfa_itnim_iostats_s iostats; |
| 448 | }; |
| 449 | |
| 450 | struct bfa_bsg_itnim_itnstats_s { |
| 451 | bfa_status_t status; |
| 452 | u16 bfad_num; |
| 453 | u16 vf_id; |
| 454 | wwn_t lpwwn; |
| 455 | wwn_t rpwwn; |
| 456 | struct bfa_itnim_stats_s itnstats; |
| 457 | }; |
| 458 | |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 459 | struct bfa_bsg_pcifn_cfg_s { |
| 460 | bfa_status_t status; |
| 461 | u16 bfad_num; |
| 462 | u16 rsvd; |
| 463 | struct bfa_ablk_cfg_s pcifn_cfg; |
| 464 | }; |
| 465 | |
| 466 | struct bfa_bsg_pcifn_s { |
| 467 | bfa_status_t status; |
| 468 | u16 bfad_num; |
| 469 | u16 pcifn_id; |
| 470 | u32 bandwidth; |
| 471 | u8 port; |
| 472 | enum bfi_pcifn_class pcifn_class; |
| 473 | u8 rsvd[1]; |
| 474 | }; |
| 475 | |
| 476 | struct bfa_bsg_adapter_cfg_mode_s { |
| 477 | bfa_status_t status; |
| 478 | u16 bfad_num; |
| 479 | u16 rsvd; |
| 480 | struct bfa_adapter_cfg_mode_s cfg; |
| 481 | }; |
| 482 | |
| 483 | struct bfa_bsg_port_cfg_mode_s { |
| 484 | bfa_status_t status; |
| 485 | u16 bfad_num; |
| 486 | u16 instance; |
| 487 | struct bfa_port_cfg_mode_s cfg; |
| 488 | }; |
| 489 | |
Krishna Gudipati | a714134 | 2011-06-24 20:23:19 -0700 | [diff] [blame] | 490 | struct bfa_bsg_faa_attr_s { |
| 491 | bfa_status_t status; |
| 492 | u16 bfad_num; |
| 493 | u16 rsvd; |
| 494 | struct bfa_faa_attr_s faa_attr; |
| 495 | }; |
| 496 | |
Krishna Gudipati | 148d610 | 2011-06-24 20:25:36 -0700 | [diff] [blame] | 497 | struct bfa_bsg_cee_attr_s { |
| 498 | bfa_status_t status; |
| 499 | u16 bfad_num; |
| 500 | u16 rsvd; |
| 501 | u32 buf_size; |
| 502 | u32 rsvd1; |
| 503 | u64 buf_ptr; |
| 504 | }; |
| 505 | |
| 506 | struct bfa_bsg_cee_stats_s { |
| 507 | bfa_status_t status; |
| 508 | u16 bfad_num; |
| 509 | u16 rsvd; |
| 510 | u32 buf_size; |
| 511 | u32 rsvd1; |
| 512 | u64 buf_ptr; |
| 513 | }; |
| 514 | |
Krishna Gudipati | 51e569a | 2011-06-24 20:26:25 -0700 | [diff] [blame] | 515 | struct bfa_bsg_sfp_media_s { |
| 516 | bfa_status_t status; |
| 517 | u16 bfad_num; |
| 518 | u16 rsvd; |
| 519 | enum bfa_defs_sfp_media_e media; |
| 520 | }; |
| 521 | |
| 522 | struct bfa_bsg_sfp_speed_s { |
| 523 | bfa_status_t status; |
| 524 | u16 bfad_num; |
| 525 | u16 rsvd; |
| 526 | enum bfa_port_speed speed; |
| 527 | }; |
| 528 | |
Krishna Gudipati | 5a54b1d | 2011-06-24 20:27:13 -0700 | [diff] [blame] | 529 | struct bfa_bsg_flash_attr_s { |
| 530 | bfa_status_t status; |
| 531 | u16 bfad_num; |
| 532 | u16 rsvd; |
| 533 | struct bfa_flash_attr_s attr; |
| 534 | }; |
| 535 | |
| 536 | struct bfa_bsg_flash_s { |
| 537 | bfa_status_t status; |
| 538 | u16 bfad_num; |
| 539 | u8 instance; |
| 540 | u8 rsvd; |
| 541 | enum bfa_flash_part_type type; |
| 542 | int bufsz; |
| 543 | u64 buf_ptr; |
| 544 | }; |
| 545 | |
Krishna Gudipati | 3d7fc66 | 2011-06-24 20:28:17 -0700 | [diff] [blame] | 546 | struct bfa_bsg_diag_get_temp_s { |
| 547 | bfa_status_t status; |
| 548 | u16 bfad_num; |
| 549 | u16 rsvd; |
| 550 | struct bfa_diag_results_tempsensor_s result; |
| 551 | }; |
| 552 | |
| 553 | struct bfa_bsg_diag_memtest_s { |
| 554 | bfa_status_t status; |
| 555 | u16 bfad_num; |
| 556 | u16 rsvd[3]; |
| 557 | u32 pat; |
| 558 | struct bfa_diag_memtest_result result; |
| 559 | struct bfa_diag_memtest_s memtest; |
| 560 | }; |
| 561 | |
| 562 | struct bfa_bsg_diag_loopback_s { |
| 563 | bfa_status_t status; |
| 564 | u16 bfad_num; |
| 565 | u16 rsvd; |
| 566 | enum bfa_port_opmode opmode; |
| 567 | enum bfa_port_speed speed; |
| 568 | u32 lpcnt; |
| 569 | u32 pat; |
| 570 | struct bfa_diag_loopback_result_s result; |
| 571 | }; |
| 572 | |
| 573 | struct bfa_bsg_diag_fwping_s { |
| 574 | bfa_status_t status; |
| 575 | u16 bfad_num; |
| 576 | u16 rsvd; |
| 577 | u32 cnt; |
| 578 | u32 pattern; |
| 579 | struct bfa_diag_results_fwping result; |
| 580 | }; |
| 581 | |
| 582 | struct bfa_bsg_diag_qtest_s { |
| 583 | bfa_status_t status; |
| 584 | u16 bfad_num; |
| 585 | u16 rsvd; |
| 586 | u32 force; |
| 587 | u32 queue; |
| 588 | struct bfa_diag_qtest_result_s result; |
| 589 | }; |
| 590 | |
| 591 | struct bfa_bsg_sfp_show_s { |
| 592 | bfa_status_t status; |
| 593 | u16 bfad_num; |
| 594 | u16 rsvd; |
| 595 | struct sfp_mem_s sfp; |
| 596 | }; |
| 597 | |
| 598 | struct bfa_bsg_diag_led_s { |
| 599 | bfa_status_t status; |
| 600 | u16 bfad_num; |
| 601 | u16 rsvd; |
| 602 | struct bfa_diag_ledtest_s ledtest; |
| 603 | }; |
| 604 | |
| 605 | struct bfa_bsg_diag_beacon_s { |
| 606 | bfa_status_t status; |
| 607 | u16 bfad_num; |
| 608 | u16 rsvd; |
| 609 | bfa_boolean_t beacon; |
| 610 | bfa_boolean_t link_e2e_beacon; |
| 611 | u32 second; |
| 612 | }; |
| 613 | |
| 614 | struct bfa_bsg_diag_lb_stat_s { |
| 615 | bfa_status_t status; |
| 616 | u16 bfad_num; |
| 617 | u16 rsvd; |
| 618 | }; |
| 619 | |
Krishna Gudipati | e353546 | 2012-09-21 17:26:07 -0700 | [diff] [blame] | 620 | struct bfa_bsg_diag_dport_get_state_s { |
| 621 | bfa_status_t status; |
| 622 | u16 bfad_num; |
| 623 | u16 rsvd; |
| 624 | enum bfa_dport_state state; |
| 625 | }; |
| 626 | |
Krishna Gudipati | 3350d98 | 2011-06-24 20:28:37 -0700 | [diff] [blame] | 627 | struct bfa_bsg_phy_attr_s { |
| 628 | bfa_status_t status; |
| 629 | u16 bfad_num; |
| 630 | u16 instance; |
| 631 | struct bfa_phy_attr_s attr; |
| 632 | }; |
| 633 | |
| 634 | struct bfa_bsg_phy_s { |
| 635 | bfa_status_t status; |
| 636 | u16 bfad_num; |
| 637 | u16 instance; |
| 638 | u64 bufsz; |
| 639 | u64 buf_ptr; |
| 640 | }; |
| 641 | |
Krishna Gudipati | 61e62e2 | 2011-06-24 20:29:07 -0700 | [diff] [blame] | 642 | struct bfa_bsg_debug_s { |
| 643 | bfa_status_t status; |
| 644 | u16 bfad_num; |
| 645 | u16 rsvd; |
| 646 | u32 bufsz; |
| 647 | int inst_no; |
| 648 | u64 buf_ptr; |
| 649 | u64 offset; |
| 650 | }; |
| 651 | |
Krishna Gudipati | 3350d98 | 2011-06-24 20:28:37 -0700 | [diff] [blame] | 652 | struct bfa_bsg_phy_stats_s { |
| 653 | bfa_status_t status; |
| 654 | u16 bfad_num; |
| 655 | u16 instance; |
| 656 | struct bfa_phy_stats_s stats; |
| 657 | }; |
| 658 | |
Krishna Gudipati | 61e62e2 | 2011-06-24 20:29:07 -0700 | [diff] [blame] | 659 | struct bfa_bsg_vhba_attr_s { |
| 660 | bfa_status_t status; |
| 661 | u16 bfad_num; |
| 662 | u16 pcifn_id; |
| 663 | struct bfa_vhba_attr_s attr; |
| 664 | }; |
| 665 | |
Krishna Gudipati | a46bd30 | 2011-07-20 17:02:32 -0700 | [diff] [blame] | 666 | struct bfa_bsg_boot_s { |
| 667 | bfa_status_t status; |
| 668 | u16 bfad_num; |
| 669 | u16 rsvd; |
| 670 | struct bfa_boot_cfg_s cfg; |
| 671 | }; |
| 672 | |
| 673 | struct bfa_bsg_preboot_s { |
| 674 | bfa_status_t status; |
| 675 | u16 bfad_num; |
| 676 | u16 rsvd; |
| 677 | struct bfa_boot_pbc_s cfg; |
| 678 | }; |
| 679 | |
| 680 | struct bfa_bsg_ethboot_s { |
| 681 | bfa_status_t status; |
| 682 | u16 bfad_num; |
| 683 | u16 rsvd; |
| 684 | struct bfa_ethboot_cfg_s cfg; |
| 685 | }; |
| 686 | |
Krishna Gudipati | 4519123 | 2011-07-20 17:02:50 -0700 | [diff] [blame] | 687 | struct bfa_bsg_trunk_attr_s { |
| 688 | bfa_status_t status; |
| 689 | u16 bfad_num; |
| 690 | u16 rsvd; |
| 691 | struct bfa_trunk_attr_s attr; |
| 692 | }; |
| 693 | |
Krishna Gudipati | 3ec4f2c | 2011-07-20 17:03:09 -0700 | [diff] [blame] | 694 | struct bfa_bsg_qos_attr_s { |
| 695 | bfa_status_t status; |
| 696 | u16 bfad_num; |
| 697 | u16 rsvd; |
| 698 | struct bfa_qos_attr_s attr; |
| 699 | }; |
| 700 | |
| 701 | struct bfa_bsg_qos_vc_attr_s { |
| 702 | bfa_status_t status; |
| 703 | u16 bfad_num; |
| 704 | u16 rsvd; |
| 705 | struct bfa_qos_vc_attr_s attr; |
| 706 | }; |
| 707 | |
Krishna Gudipati | 6894f01 | 2012-09-21 17:26:31 -0700 | [diff] [blame^] | 708 | struct bfa_bsg_qos_bw_s { |
| 709 | bfa_status_t status; |
| 710 | u16 bfad_num; |
| 711 | u16 rsvd; |
| 712 | struct bfa_qos_bw_s qos_bw; |
| 713 | }; |
| 714 | |
Krishna Gudipati | c0350bf | 2011-07-20 17:03:27 -0700 | [diff] [blame] | 715 | struct bfa_bsg_vf_stats_s { |
| 716 | bfa_status_t status; |
| 717 | u16 bfad_num; |
| 718 | u16 vf_id; |
| 719 | struct bfa_vf_stats_s stats; |
| 720 | }; |
| 721 | |
| 722 | struct bfa_bsg_vf_reset_stats_s { |
| 723 | bfa_status_t status; |
| 724 | u16 bfad_num; |
| 725 | u16 vf_id; |
| 726 | }; |
| 727 | |
Krishna Gudipati | 4c5d22b | 2011-07-20 17:04:24 -0700 | [diff] [blame] | 728 | struct bfa_bsg_fcpim_lunmask_query_s { |
| 729 | bfa_status_t status; |
| 730 | u16 bfad_num; |
| 731 | struct bfa_lunmask_cfg_s lun_mask; |
| 732 | }; |
| 733 | |
| 734 | struct bfa_bsg_fcpim_lunmask_s { |
| 735 | bfa_status_t status; |
| 736 | u16 bfad_num; |
| 737 | u16 vf_id; |
| 738 | wwn_t pwwn; |
| 739 | wwn_t rpwwn; |
| 740 | struct scsi_lun lun; |
| 741 | }; |
| 742 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 743 | struct bfa_bsg_fcpt_s { |
| 744 | bfa_status_t status; |
| 745 | u16 vf_id; |
| 746 | wwn_t lpwwn; |
| 747 | wwn_t dpwwn; |
| 748 | u32 tsecs; |
| 749 | int cts; |
| 750 | enum fc_cos cos; |
| 751 | struct fchs_s fchs; |
| 752 | }; |
| 753 | #define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s |
| 754 | |
| 755 | struct bfa_bsg_data { |
| 756 | int payload_len; |
| 757 | void *payload; |
| 758 | }; |
| 759 | |
| 760 | #define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \ |
| 761 | (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \ |
| 762 | BFA_STATUS_FAILED : BFA_STATUS_OK) |
| 763 | |
| 764 | #endif /* BFAD_BSG_H */ |