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