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