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, |
Vijaya Mohan Guvva | bbe37a6 | 2013-05-13 02:33:19 -0700 | [diff] [blame] | 49 | IOCMD_PORT_BBCR_ENABLE, |
| 50 | IOCMD_PORT_BBCR_DISABLE, |
| 51 | IOCMD_PORT_BBCR_GET_ATTR, |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 52 | IOCMD_LPORT_GET_ATTR, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 53 | IOCMD_LPORT_GET_RPORTS, |
| 54 | IOCMD_LPORT_GET_STATS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 55 | IOCMD_LPORT_RESET_STATS, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 56 | IOCMD_LPORT_GET_IOSTATS, |
| 57 | IOCMD_RPORT_GET_ATTR, |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 58 | IOCMD_RPORT_GET_ADDR, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 59 | IOCMD_RPORT_GET_STATS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 60 | IOCMD_RPORT_RESET_STATS, |
| 61 | IOCMD_RPORT_SET_SPEED, |
| 62 | IOCMD_VPORT_GET_ATTR, |
| 63 | IOCMD_VPORT_GET_STATS, |
| 64 | IOCMD_VPORT_RESET_STATS, |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 65 | IOCMD_FABRIC_GET_LPORTS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 66 | IOCMD_RATELIM_ENABLE, |
| 67 | IOCMD_RATELIM_DISABLE, |
| 68 | IOCMD_RATELIM_DEF_SPEED, |
| 69 | IOCMD_FCPIM_FAILOVER, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 70 | IOCMD_FCPIM_MODSTATS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 71 | IOCMD_FCPIM_MODSTATSCLR, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 72 | IOCMD_FCPIM_DEL_ITN_STATS, |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 73 | IOCMD_ITNIM_GET_ATTR, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 74 | IOCMD_ITNIM_GET_IOSTATS, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 75 | IOCMD_ITNIM_RESET_STATS, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 76 | IOCMD_ITNIM_GET_ITNSTATS, |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 77 | IOCMD_IOC_PCIFN_CFG, |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 78 | IOCMD_FCPORT_ENABLE, |
| 79 | IOCMD_FCPORT_DISABLE, |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 80 | IOCMD_PCIFN_CREATE, |
| 81 | IOCMD_PCIFN_DELETE, |
| 82 | IOCMD_PCIFN_BW, |
| 83 | IOCMD_ADAPTER_CFG_MODE, |
| 84 | IOCMD_PORT_CFG_MODE, |
| 85 | IOCMD_FLASH_ENABLE_OPTROM, |
| 86 | IOCMD_FLASH_DISABLE_OPTROM, |
Krishna Gudipati | a714134 | 2011-06-24 20:23:19 -0700 | [diff] [blame] | 87 | IOCMD_FAA_QUERY, |
Krishna Gudipati | 148d610 | 2011-06-24 20:25:36 -0700 | [diff] [blame] | 88 | IOCMD_CEE_GET_ATTR, |
| 89 | IOCMD_CEE_GET_STATS, |
| 90 | IOCMD_CEE_RESET_STATS, |
Krishna Gudipati | 51e569a | 2011-06-24 20:26:25 -0700 | [diff] [blame] | 91 | IOCMD_SFP_MEDIA, |
| 92 | IOCMD_SFP_SPEED, |
Krishna Gudipati | 5a54b1d | 2011-06-24 20:27:13 -0700 | [diff] [blame] | 93 | IOCMD_FLASH_GET_ATTR, |
| 94 | IOCMD_FLASH_ERASE_PART, |
| 95 | IOCMD_FLASH_UPDATE_PART, |
| 96 | IOCMD_FLASH_READ_PART, |
Krishna Gudipati | 3d7fc66 | 2011-06-24 20:28:17 -0700 | [diff] [blame] | 97 | IOCMD_DIAG_TEMP, |
| 98 | IOCMD_DIAG_MEMTEST, |
| 99 | IOCMD_DIAG_LOOPBACK, |
| 100 | IOCMD_DIAG_FWPING, |
| 101 | IOCMD_DIAG_QUEUETEST, |
| 102 | IOCMD_DIAG_SFP, |
| 103 | IOCMD_DIAG_LED, |
| 104 | IOCMD_DIAG_BEACON_LPORT, |
| 105 | IOCMD_DIAG_LB_STAT, |
Krishna Gudipati | 3350d98 | 2011-06-24 20:28:37 -0700 | [diff] [blame] | 106 | IOCMD_PHY_GET_ATTR, |
| 107 | IOCMD_PHY_GET_STATS, |
| 108 | IOCMD_PHY_UPDATE_FW, |
| 109 | IOCMD_PHY_READ_FW, |
Krishna Gudipati | 61e62e2 | 2011-06-24 20:29:07 -0700 | [diff] [blame] | 110 | IOCMD_VHBA_QUERY, |
| 111 | IOCMD_DEBUG_PORTLOG, |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 112 | IOCMD_DEBUG_FW_CORE, |
| 113 | IOCMD_DEBUG_FW_STATE_CLR, |
| 114 | IOCMD_DEBUG_PORTLOG_CLR, |
| 115 | IOCMD_DEBUG_START_DTRC, |
| 116 | IOCMD_DEBUG_STOP_DTRC, |
| 117 | IOCMD_DEBUG_PORTLOG_CTL, |
Krishna Gudipati | 42a8e6e | 2011-07-20 17:01:52 -0700 | [diff] [blame] | 118 | IOCMD_FCPIM_PROFILE_ON, |
| 119 | IOCMD_FCPIM_PROFILE_OFF, |
| 120 | IOCMD_ITNIM_GET_IOPROFILE, |
Krishna Gudipati | 37ea055 | 2011-07-20 17:02:11 -0700 | [diff] [blame] | 121 | IOCMD_FCPORT_GET_STATS, |
| 122 | IOCMD_FCPORT_RESET_STATS, |
Krishna Gudipati | a46bd30 | 2011-07-20 17:02:32 -0700 | [diff] [blame] | 123 | IOCMD_BOOT_CFG, |
| 124 | IOCMD_BOOT_QUERY, |
| 125 | IOCMD_PREBOOT_QUERY, |
| 126 | IOCMD_ETHBOOT_CFG, |
| 127 | IOCMD_ETHBOOT_QUERY, |
Krishna Gudipati | 4519123 | 2011-07-20 17:02:50 -0700 | [diff] [blame] | 128 | IOCMD_TRUNK_ENABLE, |
| 129 | IOCMD_TRUNK_DISABLE, |
| 130 | IOCMD_TRUNK_GET_ATTR, |
Krishna Gudipati | 3ec4f2c | 2011-07-20 17:03:09 -0700 | [diff] [blame] | 131 | IOCMD_QOS_ENABLE, |
| 132 | IOCMD_QOS_DISABLE, |
| 133 | IOCMD_QOS_GET_ATTR, |
| 134 | IOCMD_QOS_GET_VC_ATTR, |
| 135 | IOCMD_QOS_GET_STATS, |
| 136 | IOCMD_QOS_RESET_STATS, |
Krishna Gudipati | c0350bf | 2011-07-20 17:03:27 -0700 | [diff] [blame] | 137 | IOCMD_VF_GET_STATS, |
| 138 | IOCMD_VF_RESET_STATS, |
Krishna Gudipati | 4c5d22b | 2011-07-20 17:04:24 -0700 | [diff] [blame] | 139 | IOCMD_FCPIM_LUNMASK_ENABLE, |
| 140 | IOCMD_FCPIM_LUNMASK_DISABLE, |
| 141 | IOCMD_FCPIM_LUNMASK_CLEAR, |
| 142 | IOCMD_FCPIM_LUNMASK_QUERY, |
| 143 | IOCMD_FCPIM_LUNMASK_ADD, |
| 144 | IOCMD_FCPIM_LUNMASK_DELETE, |
Krishna Gudipati | e353546 | 2012-09-21 17:26:07 -0700 | [diff] [blame] | 145 | IOCMD_DIAG_DPORT_ENABLE, |
| 146 | IOCMD_DIAG_DPORT_DISABLE, |
Krishna Gudipati | 6894f01 | 2012-09-21 17:26:31 -0700 | [diff] [blame] | 147 | IOCMD_QOS_SET_BW, |
Krishna Gudipati | 7ace27a | 2012-09-21 17:26:41 -0700 | [diff] [blame] | 148 | IOCMD_FCPIM_THROTTLE_QUERY, |
Krishna Gudipati | e6826c9 | 2012-09-21 17:27:14 -0700 | [diff] [blame] | 149 | IOCMD_FCPIM_THROTTLE_SET, |
| 150 | IOCMD_TFRU_READ, |
| 151 | IOCMD_TFRU_WRITE, |
| 152 | IOCMD_FRUVPD_READ, |
| 153 | IOCMD_FRUVPD_UPDATE, |
| 154 | IOCMD_FRUVPD_GET_MAX_SIZE, |
Vijaya Mohan Guvva | 1a898a7 | 2013-05-13 02:33:21 -0700 | [diff] [blame] | 155 | IOCMD_DIAG_DPORT_SHOW, |
| 156 | IOCMD_DIAG_DPORT_START, |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 157 | }; |
| 158 | |
| 159 | struct bfa_bsg_gen_s { |
| 160 | bfa_status_t status; |
| 161 | u16 bfad_num; |
| 162 | u16 rsvd; |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 163 | }; |
| 164 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 165 | struct bfa_bsg_portlogctl_s { |
| 166 | bfa_status_t status; |
| 167 | u16 bfad_num; |
| 168 | u16 rsvd; |
| 169 | bfa_boolean_t ctl; |
| 170 | int inst_no; |
| 171 | }; |
| 172 | |
Krishna Gudipati | 42a8e6e | 2011-07-20 17:01:52 -0700 | [diff] [blame] | 173 | struct bfa_bsg_fcpim_profile_s { |
| 174 | bfa_status_t status; |
| 175 | u16 bfad_num; |
| 176 | u16 rsvd; |
| 177 | }; |
| 178 | |
| 179 | struct bfa_bsg_itnim_ioprofile_s { |
| 180 | bfa_status_t status; |
| 181 | u16 bfad_num; |
| 182 | u16 vf_id; |
| 183 | wwn_t lpwwn; |
| 184 | wwn_t rpwwn; |
| 185 | struct bfa_itnim_ioprofile_s ioprofile; |
| 186 | }; |
| 187 | |
Krishna Gudipati | 37ea055 | 2011-07-20 17:02:11 -0700 | [diff] [blame] | 188 | struct bfa_bsg_fcport_stats_s { |
| 189 | bfa_status_t status; |
| 190 | u16 bfad_num; |
| 191 | u16 rsvd; |
| 192 | union bfa_fcport_stats_u stats; |
| 193 | }; |
| 194 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 195 | struct bfa_bsg_ioc_name_s { |
| 196 | bfa_status_t status; |
| 197 | u16 bfad_num; |
| 198 | u16 rsvd; |
| 199 | char name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 200 | }; |
| 201 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 202 | struct bfa_bsg_ioc_info_s { |
| 203 | bfa_status_t status; |
| 204 | u16 bfad_num; |
| 205 | u16 rsvd; |
| 206 | char serialnum[64]; |
| 207 | char hwpath[BFA_STRING_32]; |
| 208 | char adapter_hwpath[BFA_STRING_32]; |
| 209 | char guid[BFA_ADAPTER_SYM_NAME_LEN*2]; |
| 210 | char name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 211 | char port_name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 212 | char eth_name[BFA_ADAPTER_SYM_NAME_LEN]; |
| 213 | wwn_t pwwn; |
| 214 | wwn_t nwwn; |
| 215 | wwn_t factorypwwn; |
| 216 | wwn_t factorynwwn; |
| 217 | mac_t mac; |
| 218 | mac_t factory_mac; /* Factory mac address */ |
| 219 | mac_t current_mac; /* Currently assigned mac address */ |
| 220 | enum bfa_ioc_type_e ioc_type; |
| 221 | u16 pvid; /* Port vlan id */ |
| 222 | u16 rsvd1; |
| 223 | u32 host; |
| 224 | u32 bandwidth; /* For PF support */ |
| 225 | u32 rsvd2; |
| 226 | }; |
| 227 | |
| 228 | struct bfa_bsg_ioc_attr_s { |
| 229 | bfa_status_t status; |
| 230 | u16 bfad_num; |
| 231 | u16 rsvd; |
| 232 | struct bfa_ioc_attr_s ioc_attr; |
| 233 | }; |
| 234 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 235 | struct bfa_bsg_ioc_stats_s { |
| 236 | bfa_status_t status; |
| 237 | u16 bfad_num; |
| 238 | u16 rsvd; |
| 239 | struct bfa_ioc_stats_s ioc_stats; |
| 240 | }; |
| 241 | |
| 242 | struct bfa_bsg_ioc_fwstats_s { |
| 243 | bfa_status_t status; |
| 244 | u16 bfad_num; |
| 245 | u16 rsvd; |
| 246 | u32 buf_size; |
| 247 | u32 rsvd1; |
| 248 | u64 buf_ptr; |
| 249 | }; |
| 250 | |
| 251 | struct bfa_bsg_iocfc_attr_s { |
| 252 | bfa_status_t status; |
| 253 | u16 bfad_num; |
| 254 | u16 rsvd; |
| 255 | struct bfa_iocfc_attr_s iocfc_attr; |
| 256 | }; |
| 257 | |
| 258 | struct bfa_bsg_iocfc_intr_s { |
| 259 | bfa_status_t status; |
| 260 | u16 bfad_num; |
| 261 | u16 rsvd; |
| 262 | struct bfa_iocfc_intr_attr_s attr; |
| 263 | }; |
| 264 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 265 | struct bfa_bsg_port_attr_s { |
| 266 | bfa_status_t status; |
| 267 | u16 bfad_num; |
| 268 | u16 rsvd; |
| 269 | struct bfa_port_attr_s attr; |
| 270 | }; |
| 271 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 272 | struct bfa_bsg_port_cfg_s { |
| 273 | bfa_status_t status; |
| 274 | u16 bfad_num; |
| 275 | u16 rsvd; |
| 276 | u32 param; |
| 277 | u32 rsvd1; |
| 278 | }; |
| 279 | |
| 280 | struct bfa_bsg_port_cfg_maxfrsize_s { |
| 281 | bfa_status_t status; |
| 282 | u16 bfad_num; |
| 283 | u16 maxfrsize; |
| 284 | }; |
| 285 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 286 | struct bfa_bsg_port_stats_s { |
| 287 | bfa_status_t status; |
| 288 | u16 bfad_num; |
| 289 | u16 rsvd; |
| 290 | u32 buf_size; |
| 291 | u32 rsvd1; |
| 292 | u64 buf_ptr; |
| 293 | }; |
| 294 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 295 | struct bfa_bsg_lport_attr_s { |
| 296 | bfa_status_t status; |
| 297 | u16 bfad_num; |
| 298 | u16 vf_id; |
| 299 | wwn_t pwwn; |
| 300 | struct bfa_lport_attr_s port_attr; |
| 301 | }; |
| 302 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 303 | struct bfa_bsg_lport_stats_s { |
| 304 | bfa_status_t status; |
| 305 | u16 bfad_num; |
| 306 | u16 vf_id; |
| 307 | wwn_t pwwn; |
| 308 | struct bfa_lport_stats_s port_stats; |
| 309 | }; |
| 310 | |
| 311 | struct bfa_bsg_lport_iostats_s { |
| 312 | bfa_status_t status; |
| 313 | u16 bfad_num; |
| 314 | u16 vf_id; |
| 315 | wwn_t pwwn; |
| 316 | struct bfa_itnim_iostats_s iostats; |
| 317 | }; |
| 318 | |
| 319 | struct bfa_bsg_lport_get_rports_s { |
| 320 | bfa_status_t status; |
| 321 | u16 bfad_num; |
| 322 | u16 vf_id; |
| 323 | wwn_t pwwn; |
| 324 | u64 rbuf_ptr; |
| 325 | u32 nrports; |
| 326 | u32 rsvd; |
| 327 | }; |
| 328 | |
| 329 | struct bfa_bsg_rport_attr_s { |
| 330 | bfa_status_t status; |
| 331 | u16 bfad_num; |
| 332 | u16 vf_id; |
| 333 | wwn_t pwwn; |
| 334 | wwn_t rpwwn; |
Krishna Gudipati | ee1a4a4 | 2012-08-22 19:50:43 -0700 | [diff] [blame] | 335 | u32 pid; |
| 336 | u32 rsvd; |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 337 | struct bfa_rport_attr_s attr; |
| 338 | }; |
| 339 | |
| 340 | struct bfa_bsg_rport_stats_s { |
| 341 | bfa_status_t status; |
| 342 | u16 bfad_num; |
| 343 | u16 vf_id; |
| 344 | wwn_t pwwn; |
| 345 | wwn_t rpwwn; |
| 346 | struct bfa_rport_stats_s stats; |
| 347 | }; |
| 348 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 349 | struct bfa_bsg_rport_scsi_addr_s { |
| 350 | bfa_status_t status; |
| 351 | u16 bfad_num; |
| 352 | u16 vf_id; |
| 353 | wwn_t pwwn; |
| 354 | wwn_t rpwwn; |
| 355 | u32 host; |
| 356 | u32 bus; |
| 357 | u32 target; |
| 358 | u32 lun; |
| 359 | }; |
| 360 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 361 | struct bfa_bsg_rport_reset_stats_s { |
| 362 | bfa_status_t status; |
| 363 | u16 bfad_num; |
| 364 | u16 vf_id; |
| 365 | wwn_t pwwn; |
| 366 | wwn_t rpwwn; |
| 367 | }; |
| 368 | |
| 369 | struct bfa_bsg_rport_set_speed_s { |
| 370 | bfa_status_t status; |
| 371 | u16 bfad_num; |
| 372 | u16 vf_id; |
| 373 | enum bfa_port_speed speed; |
| 374 | u32 rsvd; |
| 375 | wwn_t pwwn; |
| 376 | wwn_t rpwwn; |
| 377 | }; |
| 378 | |
| 379 | struct bfa_bsg_vport_attr_s { |
| 380 | bfa_status_t status; |
| 381 | u16 bfad_num; |
| 382 | u16 vf_id; |
| 383 | wwn_t vpwwn; |
| 384 | struct bfa_vport_attr_s vport_attr; |
| 385 | }; |
| 386 | |
| 387 | struct bfa_bsg_vport_stats_s { |
| 388 | bfa_status_t status; |
| 389 | u16 bfad_num; |
| 390 | u16 vf_id; |
| 391 | wwn_t vpwwn; |
| 392 | struct bfa_vport_stats_s vport_stats; |
| 393 | }; |
| 394 | |
| 395 | struct bfa_bsg_reset_stats_s { |
| 396 | bfa_status_t status; |
| 397 | u16 bfad_num; |
| 398 | u16 vf_id; |
| 399 | wwn_t vpwwn; |
| 400 | }; |
| 401 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 402 | struct bfa_bsg_fabric_get_lports_s { |
| 403 | bfa_status_t status; |
| 404 | u16 bfad_num; |
| 405 | u16 vf_id; |
| 406 | u64 buf_ptr; |
| 407 | u32 nports; |
| 408 | u32 rsvd; |
| 409 | }; |
| 410 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 411 | struct bfa_bsg_trl_speed_s { |
| 412 | bfa_status_t status; |
| 413 | u16 bfad_num; |
| 414 | u16 rsvd; |
| 415 | enum bfa_port_speed speed; |
| 416 | }; |
| 417 | |
| 418 | struct bfa_bsg_fcpim_s { |
| 419 | bfa_status_t status; |
| 420 | u16 bfad_num; |
| 421 | u16 param; |
| 422 | }; |
| 423 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 424 | struct bfa_bsg_fcpim_modstats_s { |
| 425 | bfa_status_t status; |
| 426 | u16 bfad_num; |
| 427 | struct bfa_itnim_iostats_s modstats; |
| 428 | }; |
| 429 | |
| 430 | struct bfa_bsg_fcpim_del_itn_stats_s { |
| 431 | bfa_status_t status; |
| 432 | u16 bfad_num; |
| 433 | struct bfa_fcpim_del_itn_stats_s modstats; |
| 434 | }; |
| 435 | |
Krishna Gudipati | f2ee760 | 2011-07-20 17:01:34 -0700 | [diff] [blame] | 436 | struct bfa_bsg_fcpim_modstatsclr_s { |
| 437 | bfa_status_t status; |
| 438 | u16 bfad_num; |
| 439 | }; |
| 440 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 441 | struct bfa_bsg_itnim_attr_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_attr_s attr; |
| 448 | }; |
| 449 | |
Krishna Gudipati | 6013806 | 2011-06-24 20:25:15 -0700 | [diff] [blame] | 450 | struct bfa_bsg_itnim_iostats_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_iostats_s iostats; |
| 457 | }; |
| 458 | |
| 459 | struct bfa_bsg_itnim_itnstats_s { |
| 460 | bfa_status_t status; |
| 461 | u16 bfad_num; |
| 462 | u16 vf_id; |
| 463 | wwn_t lpwwn; |
| 464 | wwn_t rpwwn; |
| 465 | struct bfa_itnim_stats_s itnstats; |
| 466 | }; |
| 467 | |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 468 | struct bfa_bsg_pcifn_cfg_s { |
| 469 | bfa_status_t status; |
| 470 | u16 bfad_num; |
| 471 | u16 rsvd; |
| 472 | struct bfa_ablk_cfg_s pcifn_cfg; |
| 473 | }; |
| 474 | |
| 475 | struct bfa_bsg_pcifn_s { |
| 476 | bfa_status_t status; |
| 477 | u16 bfad_num; |
| 478 | u16 pcifn_id; |
Krishna Gudipati | 1a1297c | 2012-09-21 17:26:50 -0700 | [diff] [blame] | 479 | u16 bw_min; |
| 480 | u16 bw_max; |
Krishna Gudipati | 1a4d8e1 | 2011-06-24 20:22:28 -0700 | [diff] [blame] | 481 | u8 port; |
| 482 | enum bfi_pcifn_class pcifn_class; |
| 483 | u8 rsvd[1]; |
| 484 | }; |
| 485 | |
| 486 | struct bfa_bsg_adapter_cfg_mode_s { |
| 487 | bfa_status_t status; |
| 488 | u16 bfad_num; |
| 489 | u16 rsvd; |
| 490 | struct bfa_adapter_cfg_mode_s cfg; |
| 491 | }; |
| 492 | |
| 493 | struct bfa_bsg_port_cfg_mode_s { |
| 494 | bfa_status_t status; |
| 495 | u16 bfad_num; |
| 496 | u16 instance; |
| 497 | struct bfa_port_cfg_mode_s cfg; |
| 498 | }; |
| 499 | |
Vijaya Mohan Guvva | bbe37a6 | 2013-05-13 02:33:19 -0700 | [diff] [blame] | 500 | struct bfa_bsg_bbcr_enable_s { |
| 501 | bfa_status_t status; |
| 502 | u16 bfad_num; |
| 503 | u8 bb_scn; |
| 504 | u8 rsvd; |
| 505 | }; |
| 506 | |
| 507 | struct bfa_bsg_bbcr_attr_s { |
| 508 | bfa_status_t status; |
| 509 | u16 bfad_num; |
| 510 | u16 rsvd; |
| 511 | struct bfa_bbcr_attr_s attr; |
| 512 | }; |
| 513 | |
Krishna Gudipati | a714134 | 2011-06-24 20:23:19 -0700 | [diff] [blame] | 514 | struct bfa_bsg_faa_attr_s { |
| 515 | bfa_status_t status; |
| 516 | u16 bfad_num; |
| 517 | u16 rsvd; |
| 518 | struct bfa_faa_attr_s faa_attr; |
| 519 | }; |
| 520 | |
Krishna Gudipati | 148d610 | 2011-06-24 20:25:36 -0700 | [diff] [blame] | 521 | struct bfa_bsg_cee_attr_s { |
| 522 | bfa_status_t status; |
| 523 | u16 bfad_num; |
| 524 | u16 rsvd; |
| 525 | u32 buf_size; |
| 526 | u32 rsvd1; |
| 527 | u64 buf_ptr; |
| 528 | }; |
| 529 | |
| 530 | struct bfa_bsg_cee_stats_s { |
| 531 | bfa_status_t status; |
| 532 | u16 bfad_num; |
| 533 | u16 rsvd; |
| 534 | u32 buf_size; |
| 535 | u32 rsvd1; |
| 536 | u64 buf_ptr; |
| 537 | }; |
| 538 | |
Krishna Gudipati | 51e569a | 2011-06-24 20:26:25 -0700 | [diff] [blame] | 539 | struct bfa_bsg_sfp_media_s { |
| 540 | bfa_status_t status; |
| 541 | u16 bfad_num; |
| 542 | u16 rsvd; |
| 543 | enum bfa_defs_sfp_media_e media; |
| 544 | }; |
| 545 | |
| 546 | struct bfa_bsg_sfp_speed_s { |
| 547 | bfa_status_t status; |
| 548 | u16 bfad_num; |
| 549 | u16 rsvd; |
| 550 | enum bfa_port_speed speed; |
| 551 | }; |
| 552 | |
Krishna Gudipati | 5a54b1d | 2011-06-24 20:27:13 -0700 | [diff] [blame] | 553 | struct bfa_bsg_flash_attr_s { |
| 554 | bfa_status_t status; |
| 555 | u16 bfad_num; |
| 556 | u16 rsvd; |
| 557 | struct bfa_flash_attr_s attr; |
| 558 | }; |
| 559 | |
| 560 | struct bfa_bsg_flash_s { |
| 561 | bfa_status_t status; |
| 562 | u16 bfad_num; |
| 563 | u8 instance; |
| 564 | u8 rsvd; |
| 565 | enum bfa_flash_part_type type; |
| 566 | int bufsz; |
| 567 | u64 buf_ptr; |
| 568 | }; |
| 569 | |
Krishna Gudipati | 3d7fc66 | 2011-06-24 20:28:17 -0700 | [diff] [blame] | 570 | struct bfa_bsg_diag_get_temp_s { |
| 571 | bfa_status_t status; |
| 572 | u16 bfad_num; |
| 573 | u16 rsvd; |
| 574 | struct bfa_diag_results_tempsensor_s result; |
| 575 | }; |
| 576 | |
| 577 | struct bfa_bsg_diag_memtest_s { |
| 578 | bfa_status_t status; |
| 579 | u16 bfad_num; |
| 580 | u16 rsvd[3]; |
| 581 | u32 pat; |
| 582 | struct bfa_diag_memtest_result result; |
| 583 | struct bfa_diag_memtest_s memtest; |
| 584 | }; |
| 585 | |
| 586 | struct bfa_bsg_diag_loopback_s { |
| 587 | bfa_status_t status; |
| 588 | u16 bfad_num; |
| 589 | u16 rsvd; |
| 590 | enum bfa_port_opmode opmode; |
| 591 | enum bfa_port_speed speed; |
| 592 | u32 lpcnt; |
| 593 | u32 pat; |
| 594 | struct bfa_diag_loopback_result_s result; |
| 595 | }; |
| 596 | |
Vijaya Mohan Guvva | 1a898a7 | 2013-05-13 02:33:21 -0700 | [diff] [blame] | 597 | struct bfa_bsg_diag_dport_show_s { |
| 598 | bfa_status_t status; |
| 599 | u16 bfad_num; |
| 600 | u16 rsvd; |
| 601 | struct bfa_diag_dport_result_s result; |
| 602 | }; |
| 603 | |
| 604 | struct bfa_bsg_dport_enable_s { |
| 605 | bfa_status_t status; |
| 606 | u16 bfad_num; |
| 607 | u16 rsvd; |
| 608 | u16 lpcnt; |
| 609 | u16 pat; |
| 610 | }; |
| 611 | |
Krishna Gudipati | 3d7fc66 | 2011-06-24 20:28:17 -0700 | [diff] [blame] | 612 | struct bfa_bsg_diag_fwping_s { |
| 613 | bfa_status_t status; |
| 614 | u16 bfad_num; |
| 615 | u16 rsvd; |
| 616 | u32 cnt; |
| 617 | u32 pattern; |
| 618 | struct bfa_diag_results_fwping result; |
| 619 | }; |
| 620 | |
| 621 | struct bfa_bsg_diag_qtest_s { |
| 622 | bfa_status_t status; |
| 623 | u16 bfad_num; |
| 624 | u16 rsvd; |
| 625 | u32 force; |
| 626 | u32 queue; |
| 627 | struct bfa_diag_qtest_result_s result; |
| 628 | }; |
| 629 | |
| 630 | struct bfa_bsg_sfp_show_s { |
| 631 | bfa_status_t status; |
| 632 | u16 bfad_num; |
| 633 | u16 rsvd; |
| 634 | struct sfp_mem_s sfp; |
| 635 | }; |
| 636 | |
| 637 | struct bfa_bsg_diag_led_s { |
| 638 | bfa_status_t status; |
| 639 | u16 bfad_num; |
| 640 | u16 rsvd; |
| 641 | struct bfa_diag_ledtest_s ledtest; |
| 642 | }; |
| 643 | |
| 644 | struct bfa_bsg_diag_beacon_s { |
| 645 | bfa_status_t status; |
| 646 | u16 bfad_num; |
| 647 | u16 rsvd; |
| 648 | bfa_boolean_t beacon; |
| 649 | bfa_boolean_t link_e2e_beacon; |
| 650 | u32 second; |
| 651 | }; |
| 652 | |
| 653 | struct bfa_bsg_diag_lb_stat_s { |
| 654 | bfa_status_t status; |
| 655 | u16 bfad_num; |
| 656 | u16 rsvd; |
| 657 | }; |
| 658 | |
Krishna Gudipati | 3350d98 | 2011-06-24 20:28:37 -0700 | [diff] [blame] | 659 | struct bfa_bsg_phy_attr_s { |
| 660 | bfa_status_t status; |
| 661 | u16 bfad_num; |
| 662 | u16 instance; |
| 663 | struct bfa_phy_attr_s attr; |
| 664 | }; |
| 665 | |
| 666 | struct bfa_bsg_phy_s { |
| 667 | bfa_status_t status; |
| 668 | u16 bfad_num; |
| 669 | u16 instance; |
| 670 | u64 bufsz; |
| 671 | u64 buf_ptr; |
| 672 | }; |
| 673 | |
Krishna Gudipati | 61e62e2 | 2011-06-24 20:29:07 -0700 | [diff] [blame] | 674 | struct bfa_bsg_debug_s { |
| 675 | bfa_status_t status; |
| 676 | u16 bfad_num; |
| 677 | u16 rsvd; |
| 678 | u32 bufsz; |
| 679 | int inst_no; |
| 680 | u64 buf_ptr; |
| 681 | u64 offset; |
| 682 | }; |
| 683 | |
Krishna Gudipati | 3350d98 | 2011-06-24 20:28:37 -0700 | [diff] [blame] | 684 | struct bfa_bsg_phy_stats_s { |
| 685 | bfa_status_t status; |
| 686 | u16 bfad_num; |
| 687 | u16 instance; |
| 688 | struct bfa_phy_stats_s stats; |
| 689 | }; |
| 690 | |
Krishna Gudipati | 61e62e2 | 2011-06-24 20:29:07 -0700 | [diff] [blame] | 691 | struct bfa_bsg_vhba_attr_s { |
| 692 | bfa_status_t status; |
| 693 | u16 bfad_num; |
| 694 | u16 pcifn_id; |
| 695 | struct bfa_vhba_attr_s attr; |
| 696 | }; |
| 697 | |
Krishna Gudipati | a46bd30 | 2011-07-20 17:02:32 -0700 | [diff] [blame] | 698 | struct bfa_bsg_boot_s { |
| 699 | bfa_status_t status; |
| 700 | u16 bfad_num; |
| 701 | u16 rsvd; |
| 702 | struct bfa_boot_cfg_s cfg; |
| 703 | }; |
| 704 | |
| 705 | struct bfa_bsg_preboot_s { |
| 706 | bfa_status_t status; |
| 707 | u16 bfad_num; |
| 708 | u16 rsvd; |
| 709 | struct bfa_boot_pbc_s cfg; |
| 710 | }; |
| 711 | |
| 712 | struct bfa_bsg_ethboot_s { |
| 713 | bfa_status_t status; |
| 714 | u16 bfad_num; |
| 715 | u16 rsvd; |
| 716 | struct bfa_ethboot_cfg_s cfg; |
| 717 | }; |
| 718 | |
Krishna Gudipati | 4519123 | 2011-07-20 17:02:50 -0700 | [diff] [blame] | 719 | struct bfa_bsg_trunk_attr_s { |
| 720 | bfa_status_t status; |
| 721 | u16 bfad_num; |
| 722 | u16 rsvd; |
| 723 | struct bfa_trunk_attr_s attr; |
| 724 | }; |
| 725 | |
Krishna Gudipati | 3ec4f2c | 2011-07-20 17:03:09 -0700 | [diff] [blame] | 726 | struct bfa_bsg_qos_attr_s { |
| 727 | bfa_status_t status; |
| 728 | u16 bfad_num; |
| 729 | u16 rsvd; |
| 730 | struct bfa_qos_attr_s attr; |
| 731 | }; |
| 732 | |
| 733 | struct bfa_bsg_qos_vc_attr_s { |
| 734 | bfa_status_t status; |
| 735 | u16 bfad_num; |
| 736 | u16 rsvd; |
| 737 | struct bfa_qos_vc_attr_s attr; |
| 738 | }; |
| 739 | |
Krishna Gudipati | 6894f01 | 2012-09-21 17:26:31 -0700 | [diff] [blame] | 740 | struct bfa_bsg_qos_bw_s { |
| 741 | bfa_status_t status; |
| 742 | u16 bfad_num; |
| 743 | u16 rsvd; |
| 744 | struct bfa_qos_bw_s qos_bw; |
| 745 | }; |
| 746 | |
Krishna Gudipati | c0350bf | 2011-07-20 17:03:27 -0700 | [diff] [blame] | 747 | struct bfa_bsg_vf_stats_s { |
| 748 | bfa_status_t status; |
| 749 | u16 bfad_num; |
| 750 | u16 vf_id; |
| 751 | struct bfa_vf_stats_s stats; |
| 752 | }; |
| 753 | |
| 754 | struct bfa_bsg_vf_reset_stats_s { |
| 755 | bfa_status_t status; |
| 756 | u16 bfad_num; |
| 757 | u16 vf_id; |
| 758 | }; |
| 759 | |
Krishna Gudipati | 4c5d22b | 2011-07-20 17:04:24 -0700 | [diff] [blame] | 760 | struct bfa_bsg_fcpim_lunmask_query_s { |
| 761 | bfa_status_t status; |
| 762 | u16 bfad_num; |
| 763 | struct bfa_lunmask_cfg_s lun_mask; |
| 764 | }; |
| 765 | |
| 766 | struct bfa_bsg_fcpim_lunmask_s { |
| 767 | bfa_status_t status; |
| 768 | u16 bfad_num; |
| 769 | u16 vf_id; |
| 770 | wwn_t pwwn; |
| 771 | wwn_t rpwwn; |
| 772 | struct scsi_lun lun; |
| 773 | }; |
| 774 | |
Krishna Gudipati | 7ace27a | 2012-09-21 17:26:41 -0700 | [diff] [blame] | 775 | struct bfa_bsg_fcpim_throttle_s { |
| 776 | bfa_status_t status; |
| 777 | u16 bfad_num; |
| 778 | u16 vf_id; |
| 779 | struct bfa_defs_fcpim_throttle_s throttle; |
| 780 | }; |
| 781 | |
Krishna Gudipati | e6826c9 | 2012-09-21 17:27:14 -0700 | [diff] [blame] | 782 | #define BFA_TFRU_DATA_SIZE 64 |
| 783 | #define BFA_MAX_FRUVPD_TRANSFER_SIZE 0x1000 |
| 784 | |
| 785 | struct bfa_bsg_tfru_s { |
| 786 | bfa_status_t status; |
| 787 | u16 bfad_num; |
| 788 | u16 rsvd; |
| 789 | u32 offset; |
| 790 | u32 len; |
| 791 | u8 data[BFA_TFRU_DATA_SIZE]; |
| 792 | }; |
| 793 | |
| 794 | struct bfa_bsg_fruvpd_s { |
| 795 | bfa_status_t status; |
| 796 | u16 bfad_num; |
| 797 | u16 rsvd; |
| 798 | u32 offset; |
| 799 | u32 len; |
| 800 | u8 data[BFA_MAX_FRUVPD_TRANSFER_SIZE]; |
| 801 | }; |
| 802 | |
| 803 | struct bfa_bsg_fruvpd_max_size_s { |
| 804 | bfa_status_t status; |
| 805 | u16 bfad_num; |
| 806 | u16 rsvd; |
| 807 | u32 max_size; |
| 808 | }; |
| 809 | |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 810 | struct bfa_bsg_fcpt_s { |
| 811 | bfa_status_t status; |
| 812 | u16 vf_id; |
| 813 | wwn_t lpwwn; |
| 814 | wwn_t dpwwn; |
| 815 | u32 tsecs; |
| 816 | int cts; |
| 817 | enum fc_cos cos; |
| 818 | struct fchs_s fchs; |
| 819 | }; |
| 820 | #define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s |
| 821 | |
Vijaya Mohan Guvva | bccd268 | 2013-05-13 02:33:27 -0700 | [diff] [blame^] | 822 | #pragma pack(1) |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 823 | struct bfa_bsg_data { |
| 824 | int payload_len; |
Vijaya Mohan Guvva | bccd268 | 2013-05-13 02:33:27 -0700 | [diff] [blame^] | 825 | u64 payload; |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 826 | }; |
Vijaya Mohan Guvva | bccd268 | 2013-05-13 02:33:27 -0700 | [diff] [blame^] | 827 | #pragma pack() |
Krishna Gudipati | b85daaf | 2011-06-13 15:55:11 -0700 | [diff] [blame] | 828 | |
| 829 | #define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \ |
| 830 | (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \ |
| 831 | BFA_STATUS_FAILED : BFA_STATUS_OK) |
| 832 | |
| 833 | #endif /* BFAD_BSG_H */ |