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_ENABLE, |
| 87 | IOCMD_FAA_DISABLE, |
| 88 | IOCMD_FAA_QUERY, |
Krishna Gudipati | 148d610 | 2011-06-24 20:25:36 -0700 | [diff] [blame] | 89 | IOCMD_CEE_GET_ATTR, |
| 90 | IOCMD_CEE_GET_STATS, |
| 91 | IOCMD_CEE_RESET_STATS, |
Krishna Gudipati | 51e569a | 2011-06-24 20:26:25 -0700 | [diff] [blame] | 92 | IOCMD_SFP_MEDIA, |
| 93 | IOCMD_SFP_SPEED, |
Krishna Gudipati | 5a54b1d | 2011-06-24 20:27:13 -0700 | [diff] [blame] | 94 | IOCMD_FLASH_GET_ATTR, |
| 95 | IOCMD_FLASH_ERASE_PART, |
| 96 | IOCMD_FLASH_UPDATE_PART, |
| 97 | IOCMD_FLASH_READ_PART, |
Krishna Gudipati | 3d7fc66 | 2011-06-24 20:28:17 -0700 | [diff] [blame] | 98 | IOCMD_DIAG_TEMP, |
| 99 | IOCMD_DIAG_MEMTEST, |
| 100 | IOCMD_DIAG_LOOPBACK, |
| 101 | IOCMD_DIAG_FWPING, |
| 102 | IOCMD_DIAG_QUEUETEST, |
| 103 | IOCMD_DIAG_SFP, |
| 104 | IOCMD_DIAG_LED, |
| 105 | IOCMD_DIAG_BEACON_LPORT, |
| 106 | IOCMD_DIAG_LB_STAT, |
Krishna Gudipati | 3350d98 | 2011-06-24 20:28:37 -0700 | [diff] [blame] | 107 | IOCMD_PHY_GET_ATTR, |
| 108 | IOCMD_PHY_GET_STATS, |
| 109 | IOCMD_PHY_UPDATE_FW, |
| 110 | IOCMD_PHY_READ_FW, |
Krishna Gudipati | 61e62e2 | 2011-06-24 20:29:07 -0700 | [diff] [blame] | 111 | IOCMD_VHBA_QUERY, |
| 112 | IOCMD_DEBUG_PORTLOG, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 113 | IOCMD_DEBUG_FW_CORE, |
| 114 | IOCMD_DEBUG_FW_STATE_CLR, |
| 115 | IOCMD_DEBUG_PORTLOG_CLR, |
| 116 | IOCMD_DEBUG_START_DTRC, |
| 117 | IOCMD_DEBUG_STOP_DTRC, |
| 118 | IOCMD_DEBUG_PORTLOG_CTL, |
Krishna Gudipati | 42a8e6e | 2011-07-20 17:01:52 -0700 | [diff] [blame^] | 119 | IOCMD_FCPIM_PROFILE_ON, |
| 120 | IOCMD_FCPIM_PROFILE_OFF, |
| 121 | IOCMD_ITNIM_GET_IOPROFILE, |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 122 | }; |
| 123 | |
| 124 | struct bfa_bsg_gen_s { |
| 125 | bfa_status_t status; |
| 126 | u16 bfad_num; |
| 127 | u16 rsvd; |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 128 | }; |
| 129 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 130 | struct bfa_bsg_portlogctl_s { |
| 131 | bfa_status_t status; |
| 132 | u16 bfad_num; |
| 133 | u16 rsvd; |
| 134 | bfa_boolean_t ctl; |
| 135 | int inst_no; |
| 136 | }; |
| 137 | |
Krishna Gudipati | 42a8e6e | 2011-07-20 17:01:52 -0700 | [diff] [blame^] | 138 | struct bfa_bsg_fcpim_profile_s { |
| 139 | bfa_status_t status; |
| 140 | u16 bfad_num; |
| 141 | u16 rsvd; |
| 142 | }; |
| 143 | |
| 144 | struct bfa_bsg_itnim_ioprofile_s { |
| 145 | bfa_status_t status; |
| 146 | u16 bfad_num; |
| 147 | u16 vf_id; |
| 148 | wwn_t lpwwn; |
| 149 | wwn_t rpwwn; |
| 150 | struct bfa_itnim_ioprofile_s ioprofile; |
| 151 | }; |
| 152 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 153 | struct bfa_bsg_ioc_name_s { |
| 154 | bfa_status_t status; |
| 155 | u16 bfad_num; |
| 156 | u16 rsvd; |
| 157 | char name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 158 | }; |
| 159 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 160 | struct bfa_bsg_ioc_info_s { |
| 161 | bfa_status_t status; |
| 162 | u16 bfad_num; |
| 163 | u16 rsvd; |
| 164 | char serialnum[64]; |
| 165 | char hwpath[BFA_STRING_32]; |
| 166 | char adapter_hwpath[BFA_STRING_32]; |
| 167 | char guid[BFA_ADAPTER_SYM_NAME_LEN*2]; |
| 168 | char name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 169 | char port_name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 170 | char eth_name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 171 | wwn_t pwwn; |
| 172 | wwn_t nwwn; |
| 173 | wwn_t factorypwwn; |
| 174 | wwn_t factorynwwn; |
| 175 | mac_t mac; |
| 176 | mac_t factory_mac; /* Factory mac address */ |
| 177 | mac_t current_mac; /* Currently assigned mac address */ |
| 178 | enum bfa_ioc_type_e ioc_type; |
| 179 | u16 pvid; /* Port vlan id */ |
| 180 | u16 rsvd1; |
| 181 | u32 host; |
| 182 | u32 bandwidth; /* For PF support */ |
| 183 | u32 rsvd2; |
| 184 | }; |
| 185 | |
| 186 | struct bfa_bsg_ioc_attr_s { |
| 187 | bfa_status_t status; |
| 188 | u16 bfad_num; |
| 189 | u16 rsvd; |
| 190 | struct bfa_ioc_attr_s ioc_attr; |
| 191 | }; |
| 192 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 193 | struct bfa_bsg_ioc_stats_s { |
| 194 | bfa_status_t status; |
| 195 | u16 bfad_num; |
| 196 | u16 rsvd; |
| 197 | struct bfa_ioc_stats_s ioc_stats; |
| 198 | }; |
| 199 | |
| 200 | struct bfa_bsg_ioc_fwstats_s { |
| 201 | bfa_status_t status; |
| 202 | u16 bfad_num; |
| 203 | u16 rsvd; |
| 204 | u32 buf_size; |
| 205 | u32 rsvd1; |
| 206 | u64 buf_ptr; |
| 207 | }; |
| 208 | |
| 209 | struct bfa_bsg_iocfc_attr_s { |
| 210 | bfa_status_t status; |
| 211 | u16 bfad_num; |
| 212 | u16 rsvd; |
| 213 | struct bfa_iocfc_attr_s iocfc_attr; |
| 214 | }; |
| 215 | |
| 216 | struct bfa_bsg_iocfc_intr_s { |
| 217 | bfa_status_t status; |
| 218 | u16 bfad_num; |
| 219 | u16 rsvd; |
| 220 | struct bfa_iocfc_intr_attr_s attr; |
| 221 | }; |
| 222 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 223 | struct bfa_bsg_port_attr_s { |
| 224 | bfa_status_t status; |
| 225 | u16 bfad_num; |
| 226 | u16 rsvd; |
| 227 | struct bfa_port_attr_s attr; |
| 228 | }; |
| 229 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 230 | struct bfa_bsg_port_cfg_s { |
| 231 | bfa_status_t status; |
| 232 | u16 bfad_num; |
| 233 | u16 rsvd; |
| 234 | u32 param; |
| 235 | u32 rsvd1; |
| 236 | }; |
| 237 | |
| 238 | struct bfa_bsg_port_cfg_maxfrsize_s { |
| 239 | bfa_status_t status; |
| 240 | u16 bfad_num; |
| 241 | u16 maxfrsize; |
| 242 | }; |
| 243 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 244 | struct bfa_bsg_port_stats_s { |
| 245 | bfa_status_t status; |
| 246 | u16 bfad_num; |
| 247 | u16 rsvd; |
| 248 | u32 buf_size; |
| 249 | u32 rsvd1; |
| 250 | u64 buf_ptr; |
| 251 | }; |
| 252 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 253 | struct bfa_bsg_lport_attr_s { |
| 254 | bfa_status_t status; |
| 255 | u16 bfad_num; |
| 256 | u16 vf_id; |
| 257 | wwn_t pwwn; |
| 258 | struct bfa_lport_attr_s port_attr; |
| 259 | }; |
| 260 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 261 | struct bfa_bsg_lport_stats_s { |
| 262 | bfa_status_t status; |
| 263 | u16 bfad_num; |
| 264 | u16 vf_id; |
| 265 | wwn_t pwwn; |
| 266 | struct bfa_lport_stats_s port_stats; |
| 267 | }; |
| 268 | |
| 269 | struct bfa_bsg_lport_iostats_s { |
| 270 | bfa_status_t status; |
| 271 | u16 bfad_num; |
| 272 | u16 vf_id; |
| 273 | wwn_t pwwn; |
| 274 | struct bfa_itnim_iostats_s iostats; |
| 275 | }; |
| 276 | |
| 277 | struct bfa_bsg_lport_get_rports_s { |
| 278 | bfa_status_t status; |
| 279 | u16 bfad_num; |
| 280 | u16 vf_id; |
| 281 | wwn_t pwwn; |
| 282 | u64 rbuf_ptr; |
| 283 | u32 nrports; |
| 284 | u32 rsvd; |
| 285 | }; |
| 286 | |
| 287 | struct bfa_bsg_rport_attr_s { |
| 288 | bfa_status_t status; |
| 289 | u16 bfad_num; |
| 290 | u16 vf_id; |
| 291 | wwn_t pwwn; |
| 292 | wwn_t rpwwn; |
| 293 | struct bfa_rport_attr_s attr; |
| 294 | }; |
| 295 | |
| 296 | struct bfa_bsg_rport_stats_s { |
| 297 | bfa_status_t status; |
| 298 | u16 bfad_num; |
| 299 | u16 vf_id; |
| 300 | wwn_t pwwn; |
| 301 | wwn_t rpwwn; |
| 302 | struct bfa_rport_stats_s stats; |
| 303 | }; |
| 304 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 305 | struct bfa_bsg_rport_scsi_addr_s { |
| 306 | bfa_status_t status; |
| 307 | u16 bfad_num; |
| 308 | u16 vf_id; |
| 309 | wwn_t pwwn; |
| 310 | wwn_t rpwwn; |
| 311 | u32 host; |
| 312 | u32 bus; |
| 313 | u32 target; |
| 314 | u32 lun; |
| 315 | }; |
| 316 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 317 | struct bfa_bsg_rport_reset_stats_s { |
| 318 | bfa_status_t status; |
| 319 | u16 bfad_num; |
| 320 | u16 vf_id; |
| 321 | wwn_t pwwn; |
| 322 | wwn_t rpwwn; |
| 323 | }; |
| 324 | |
| 325 | struct bfa_bsg_rport_set_speed_s { |
| 326 | bfa_status_t status; |
| 327 | u16 bfad_num; |
| 328 | u16 vf_id; |
| 329 | enum bfa_port_speed speed; |
| 330 | u32 rsvd; |
| 331 | wwn_t pwwn; |
| 332 | wwn_t rpwwn; |
| 333 | }; |
| 334 | |
| 335 | struct bfa_bsg_vport_attr_s { |
| 336 | bfa_status_t status; |
| 337 | u16 bfad_num; |
| 338 | u16 vf_id; |
| 339 | wwn_t vpwwn; |
| 340 | struct bfa_vport_attr_s vport_attr; |
| 341 | }; |
| 342 | |
| 343 | struct bfa_bsg_vport_stats_s { |
| 344 | bfa_status_t status; |
| 345 | u16 bfad_num; |
| 346 | u16 vf_id; |
| 347 | wwn_t vpwwn; |
| 348 | struct bfa_vport_stats_s vport_stats; |
| 349 | }; |
| 350 | |
| 351 | struct bfa_bsg_reset_stats_s { |
| 352 | bfa_status_t status; |
| 353 | u16 bfad_num; |
| 354 | u16 vf_id; |
| 355 | wwn_t vpwwn; |
| 356 | }; |
| 357 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 358 | struct bfa_bsg_fabric_get_lports_s { |
| 359 | bfa_status_t status; |
| 360 | u16 bfad_num; |
| 361 | u16 vf_id; |
| 362 | u64 buf_ptr; |
| 363 | u32 nports; |
| 364 | u32 rsvd; |
| 365 | }; |
| 366 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 367 | struct bfa_bsg_trl_speed_s { |
| 368 | bfa_status_t status; |
| 369 | u16 bfad_num; |
| 370 | u16 rsvd; |
| 371 | enum bfa_port_speed speed; |
| 372 | }; |
| 373 | |
| 374 | struct bfa_bsg_fcpim_s { |
| 375 | bfa_status_t status; |
| 376 | u16 bfad_num; |
| 377 | u16 param; |
| 378 | }; |
| 379 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 380 | struct bfa_bsg_fcpim_modstats_s { |
| 381 | bfa_status_t status; |
| 382 | u16 bfad_num; |
| 383 | struct bfa_itnim_iostats_s modstats; |
| 384 | }; |
| 385 | |
| 386 | struct bfa_bsg_fcpim_del_itn_stats_s { |
| 387 | bfa_status_t status; |
| 388 | u16 bfad_num; |
| 389 | struct bfa_fcpim_del_itn_stats_s modstats; |
| 390 | }; |
| 391 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 392 | struct bfa_bsg_fcpim_modstatsclr_s { |
| 393 | bfa_status_t status; |
| 394 | u16 bfad_num; |
| 395 | }; |
| 396 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 397 | struct bfa_bsg_itnim_attr_s { |
| 398 | bfa_status_t status; |
| 399 | u16 bfad_num; |
| 400 | u16 vf_id; |
| 401 | wwn_t lpwwn; |
| 402 | wwn_t rpwwn; |
| 403 | struct bfa_itnim_attr_s attr; |
| 404 | }; |
| 405 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 406 | struct bfa_bsg_itnim_iostats_s { |
| 407 | bfa_status_t status; |
| 408 | u16 bfad_num; |
| 409 | u16 vf_id; |
| 410 | wwn_t lpwwn; |
| 411 | wwn_t rpwwn; |
| 412 | struct bfa_itnim_iostats_s iostats; |
| 413 | }; |
| 414 | |
| 415 | struct bfa_bsg_itnim_itnstats_s { |
| 416 | bfa_status_t status; |
| 417 | u16 bfad_num; |
| 418 | u16 vf_id; |
| 419 | wwn_t lpwwn; |
| 420 | wwn_t rpwwn; |
| 421 | struct bfa_itnim_stats_s itnstats; |
| 422 | }; |
| 423 | |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 424 | struct bfa_bsg_pcifn_cfg_s { |
| 425 | bfa_status_t status; |
| 426 | u16 bfad_num; |
| 427 | u16 rsvd; |
| 428 | struct bfa_ablk_cfg_s pcifn_cfg; |
| 429 | }; |
| 430 | |
| 431 | struct bfa_bsg_pcifn_s { |
| 432 | bfa_status_t status; |
| 433 | u16 bfad_num; |
| 434 | u16 pcifn_id; |
| 435 | u32 bandwidth; |
| 436 | u8 port; |
| 437 | enum bfi_pcifn_class pcifn_class; |
| 438 | u8 rsvd[1]; |
| 439 | }; |
| 440 | |
| 441 | struct bfa_bsg_adapter_cfg_mode_s { |
| 442 | bfa_status_t status; |
| 443 | u16 bfad_num; |
| 444 | u16 rsvd; |
| 445 | struct bfa_adapter_cfg_mode_s cfg; |
| 446 | }; |
| 447 | |
| 448 | struct bfa_bsg_port_cfg_mode_s { |
| 449 | bfa_status_t status; |
| 450 | u16 bfad_num; |
| 451 | u16 instance; |
| 452 | struct bfa_port_cfg_mode_s cfg; |
| 453 | }; |
| 454 | |
Krishna Gudipati | a714134 | 2011-06-24 20:23:19 -0700 | [diff] [blame] | 455 | struct bfa_bsg_faa_attr_s { |
| 456 | bfa_status_t status; |
| 457 | u16 bfad_num; |
| 458 | u16 rsvd; |
| 459 | struct bfa_faa_attr_s faa_attr; |
| 460 | }; |
| 461 | |
Krishna Gudipati | 148d610 | 2011-06-24 20:25:36 -0700 | [diff] [blame] | 462 | struct bfa_bsg_cee_attr_s { |
| 463 | bfa_status_t status; |
| 464 | u16 bfad_num; |
| 465 | u16 rsvd; |
| 466 | u32 buf_size; |
| 467 | u32 rsvd1; |
| 468 | u64 buf_ptr; |
| 469 | }; |
| 470 | |
| 471 | struct bfa_bsg_cee_stats_s { |
| 472 | bfa_status_t status; |
| 473 | u16 bfad_num; |
| 474 | u16 rsvd; |
| 475 | u32 buf_size; |
| 476 | u32 rsvd1; |
| 477 | u64 buf_ptr; |
| 478 | }; |
| 479 | |
Krishna Gudipati | 51e569a | 2011-06-24 20:26:25 -0700 | [diff] [blame] | 480 | struct bfa_bsg_sfp_media_s { |
| 481 | bfa_status_t status; |
| 482 | u16 bfad_num; |
| 483 | u16 rsvd; |
| 484 | enum bfa_defs_sfp_media_e media; |
| 485 | }; |
| 486 | |
| 487 | struct bfa_bsg_sfp_speed_s { |
| 488 | bfa_status_t status; |
| 489 | u16 bfad_num; |
| 490 | u16 rsvd; |
| 491 | enum bfa_port_speed speed; |
| 492 | }; |
| 493 | |
Krishna Gudipati | 5a54b1d | 2011-06-24 20:27:13 -0700 | [diff] [blame] | 494 | struct bfa_bsg_flash_attr_s { |
| 495 | bfa_status_t status; |
| 496 | u16 bfad_num; |
| 497 | u16 rsvd; |
| 498 | struct bfa_flash_attr_s attr; |
| 499 | }; |
| 500 | |
| 501 | struct bfa_bsg_flash_s { |
| 502 | bfa_status_t status; |
| 503 | u16 bfad_num; |
| 504 | u8 instance; |
| 505 | u8 rsvd; |
| 506 | enum bfa_flash_part_type type; |
| 507 | int bufsz; |
| 508 | u64 buf_ptr; |
| 509 | }; |
| 510 | |
Krishna Gudipati | 3d7fc66 | 2011-06-24 20:28:17 -0700 | [diff] [blame] | 511 | struct bfa_bsg_diag_get_temp_s { |
| 512 | bfa_status_t status; |
| 513 | u16 bfad_num; |
| 514 | u16 rsvd; |
| 515 | struct bfa_diag_results_tempsensor_s result; |
| 516 | }; |
| 517 | |
| 518 | struct bfa_bsg_diag_memtest_s { |
| 519 | bfa_status_t status; |
| 520 | u16 bfad_num; |
| 521 | u16 rsvd[3]; |
| 522 | u32 pat; |
| 523 | struct bfa_diag_memtest_result result; |
| 524 | struct bfa_diag_memtest_s memtest; |
| 525 | }; |
| 526 | |
| 527 | struct bfa_bsg_diag_loopback_s { |
| 528 | bfa_status_t status; |
| 529 | u16 bfad_num; |
| 530 | u16 rsvd; |
| 531 | enum bfa_port_opmode opmode; |
| 532 | enum bfa_port_speed speed; |
| 533 | u32 lpcnt; |
| 534 | u32 pat; |
| 535 | struct bfa_diag_loopback_result_s result; |
| 536 | }; |
| 537 | |
| 538 | struct bfa_bsg_diag_fwping_s { |
| 539 | bfa_status_t status; |
| 540 | u16 bfad_num; |
| 541 | u16 rsvd; |
| 542 | u32 cnt; |
| 543 | u32 pattern; |
| 544 | struct bfa_diag_results_fwping result; |
| 545 | }; |
| 546 | |
| 547 | struct bfa_bsg_diag_qtest_s { |
| 548 | bfa_status_t status; |
| 549 | u16 bfad_num; |
| 550 | u16 rsvd; |
| 551 | u32 force; |
| 552 | u32 queue; |
| 553 | struct bfa_diag_qtest_result_s result; |
| 554 | }; |
| 555 | |
| 556 | struct bfa_bsg_sfp_show_s { |
| 557 | bfa_status_t status; |
| 558 | u16 bfad_num; |
| 559 | u16 rsvd; |
| 560 | struct sfp_mem_s sfp; |
| 561 | }; |
| 562 | |
| 563 | struct bfa_bsg_diag_led_s { |
| 564 | bfa_status_t status; |
| 565 | u16 bfad_num; |
| 566 | u16 rsvd; |
| 567 | struct bfa_diag_ledtest_s ledtest; |
| 568 | }; |
| 569 | |
| 570 | struct bfa_bsg_diag_beacon_s { |
| 571 | bfa_status_t status; |
| 572 | u16 bfad_num; |
| 573 | u16 rsvd; |
| 574 | bfa_boolean_t beacon; |
| 575 | bfa_boolean_t link_e2e_beacon; |
| 576 | u32 second; |
| 577 | }; |
| 578 | |
| 579 | struct bfa_bsg_diag_lb_stat_s { |
| 580 | bfa_status_t status; |
| 581 | u16 bfad_num; |
| 582 | u16 rsvd; |
| 583 | }; |
| 584 | |
Krishna Gudipati | 3350d98 | 2011-06-24 20:28:37 -0700 | [diff] [blame] | 585 | struct bfa_bsg_phy_attr_s { |
| 586 | bfa_status_t status; |
| 587 | u16 bfad_num; |
| 588 | u16 instance; |
| 589 | struct bfa_phy_attr_s attr; |
| 590 | }; |
| 591 | |
| 592 | struct bfa_bsg_phy_s { |
| 593 | bfa_status_t status; |
| 594 | u16 bfad_num; |
| 595 | u16 instance; |
| 596 | u64 bufsz; |
| 597 | u64 buf_ptr; |
| 598 | }; |
| 599 | |
Krishna Gudipati | 61e62e2 | 2011-06-24 20:29:07 -0700 | [diff] [blame] | 600 | struct bfa_bsg_debug_s { |
| 601 | bfa_status_t status; |
| 602 | u16 bfad_num; |
| 603 | u16 rsvd; |
| 604 | u32 bufsz; |
| 605 | int inst_no; |
| 606 | u64 buf_ptr; |
| 607 | u64 offset; |
| 608 | }; |
| 609 | |
Krishna Gudipati | 3350d98 | 2011-06-24 20:28:37 -0700 | [diff] [blame] | 610 | struct bfa_bsg_phy_stats_s { |
| 611 | bfa_status_t status; |
| 612 | u16 bfad_num; |
| 613 | u16 instance; |
| 614 | struct bfa_phy_stats_s stats; |
| 615 | }; |
| 616 | |
Krishna Gudipati | 61e62e2 | 2011-06-24 20:29:07 -0700 | [diff] [blame] | 617 | struct bfa_bsg_vhba_attr_s { |
| 618 | bfa_status_t status; |
| 619 | u16 bfad_num; |
| 620 | u16 pcifn_id; |
| 621 | struct bfa_vhba_attr_s attr; |
| 622 | }; |
| 623 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 624 | struct bfa_bsg_fcpt_s { |
| 625 | bfa_status_t status; |
| 626 | u16 vf_id; |
| 627 | wwn_t lpwwn; |
| 628 | wwn_t dpwwn; |
| 629 | u32 tsecs; |
| 630 | int cts; |
| 631 | enum fc_cos cos; |
| 632 | struct fchs_s fchs; |
| 633 | }; |
| 634 | #define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s |
| 635 | |
| 636 | struct bfa_bsg_data { |
| 637 | int payload_len; |
| 638 | void *payload; |
| 639 | }; |
| 640 | |
| 641 | #define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \ |
| 642 | (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \ |
| 643 | BFA_STATUS_FAILED : BFA_STATUS_OK) |
| 644 | |
| 645 | #endif /* BFAD_BSG_H */ |