blob: f64f3eee6dbfbb5ee9ada4461d0e0e133e18ee74 [file] [log] [blame]
Krishna Gudipatib85daaf2011-06-13 15:55:11 -07001/*
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 */
26enum {
Krishna Gudipati60138062011-06-24 20:25:15 -070027 IOCMD_IOC_ENABLE = 0x1,
28 IOCMD_IOC_DISABLE,
29 IOCMD_IOC_GET_ATTR,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070030 IOCMD_IOC_GET_INFO,
Krishna Gudipati60138062011-06-24 20:25:15 -070031 IOCMD_IOC_GET_STATS,
32 IOCMD_IOC_GET_FWSTATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070033 IOCMD_IOC_RESET_STATS,
34 IOCMD_IOC_RESET_FWSTATS,
35 IOCMD_IOC_SET_ADAPTER_NAME,
36 IOCMD_IOC_SET_PORT_NAME,
Krishna Gudipati60138062011-06-24 20:25:15 -070037 IOCMD_IOCFC_GET_ATTR,
38 IOCMD_IOCFC_SET_INTR,
39 IOCMD_PORT_ENABLE,
40 IOCMD_PORT_DISABLE,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070041 IOCMD_PORT_GET_ATTR,
Krishna Gudipati60138062011-06-24 20:25:15 -070042 IOCMD_PORT_GET_STATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070043 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 Gudipatib85daaf2011-06-13 15:55:11 -070051 IOCMD_LPORT_GET_ATTR,
Krishna Gudipati60138062011-06-24 20:25:15 -070052 IOCMD_LPORT_GET_RPORTS,
53 IOCMD_LPORT_GET_STATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070054 IOCMD_LPORT_RESET_STATS,
Krishna Gudipati60138062011-06-24 20:25:15 -070055 IOCMD_LPORT_GET_IOSTATS,
56 IOCMD_RPORT_GET_ATTR,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070057 IOCMD_RPORT_GET_ADDR,
Krishna Gudipati60138062011-06-24 20:25:15 -070058 IOCMD_RPORT_GET_STATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070059 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 Gudipatib85daaf2011-06-13 15:55:11 -070064 IOCMD_FABRIC_GET_LPORTS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070065 IOCMD_RATELIM_ENABLE,
66 IOCMD_RATELIM_DISABLE,
67 IOCMD_RATELIM_DEF_SPEED,
68 IOCMD_FCPIM_FAILOVER,
Krishna Gudipati60138062011-06-24 20:25:15 -070069 IOCMD_FCPIM_MODSTATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070070 IOCMD_FCPIM_MODSTATSCLR,
Krishna Gudipati60138062011-06-24 20:25:15 -070071 IOCMD_FCPIM_DEL_ITN_STATS,
Krishna Gudipatib85daaf2011-06-13 15:55:11 -070072 IOCMD_ITNIM_GET_ATTR,
Krishna Gudipati60138062011-06-24 20:25:15 -070073 IOCMD_ITNIM_GET_IOSTATS,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -070074 IOCMD_ITNIM_RESET_STATS,
Krishna Gudipati60138062011-06-24 20:25:15 -070075 IOCMD_ITNIM_GET_ITNSTATS,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -070076 IOCMD_IOC_PCIFN_CFG,
Krishna Gudipati60138062011-06-24 20:25:15 -070077 IOCMD_FCPORT_ENABLE,
78 IOCMD_FCPORT_DISABLE,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -070079 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 Gudipatia7141342011-06-24 20:23:19 -070086 IOCMD_FAA_ENABLE,
87 IOCMD_FAA_DISABLE,
88 IOCMD_FAA_QUERY,
Krishna Gudipati148d6102011-06-24 20:25:36 -070089 IOCMD_CEE_GET_ATTR,
90 IOCMD_CEE_GET_STATS,
91 IOCMD_CEE_RESET_STATS,
Krishna Gudipati51e569a2011-06-24 20:26:25 -070092 IOCMD_SFP_MEDIA,
93 IOCMD_SFP_SPEED,
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -070094 IOCMD_FLASH_GET_ATTR,
95 IOCMD_FLASH_ERASE_PART,
96 IOCMD_FLASH_UPDATE_PART,
97 IOCMD_FLASH_READ_PART,
Krishna Gudipati3d7fc662011-06-24 20:28:17 -070098 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 Gudipati3350d982011-06-24 20:28:37 -0700107 IOCMD_PHY_GET_ATTR,
108 IOCMD_PHY_GET_STATS,
109 IOCMD_PHY_UPDATE_FW,
110 IOCMD_PHY_READ_FW,
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700111 IOCMD_VHBA_QUERY,
112 IOCMD_DEBUG_PORTLOG,
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700113 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 Gudipati42a8e6e2011-07-20 17:01:52 -0700119 IOCMD_FCPIM_PROFILE_ON,
120 IOCMD_FCPIM_PROFILE_OFF,
121 IOCMD_ITNIM_GET_IOPROFILE,
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700122 IOCMD_FCPORT_GET_STATS,
123 IOCMD_FCPORT_RESET_STATS,
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700124};
125
126struct bfa_bsg_gen_s {
127 bfa_status_t status;
128 u16 bfad_num;
129 u16 rsvd;
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700130};
131
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700132struct bfa_bsg_portlogctl_s {
133 bfa_status_t status;
134 u16 bfad_num;
135 u16 rsvd;
136 bfa_boolean_t ctl;
137 int inst_no;
138};
139
Krishna Gudipati42a8e6e2011-07-20 17:01:52 -0700140struct bfa_bsg_fcpim_profile_s {
141 bfa_status_t status;
142 u16 bfad_num;
143 u16 rsvd;
144};
145
146struct bfa_bsg_itnim_ioprofile_s {
147 bfa_status_t status;
148 u16 bfad_num;
149 u16 vf_id;
150 wwn_t lpwwn;
151 wwn_t rpwwn;
152 struct bfa_itnim_ioprofile_s ioprofile;
153};
154
Krishna Gudipati37ea0552011-07-20 17:02:11 -0700155struct bfa_bsg_fcport_stats_s {
156 bfa_status_t status;
157 u16 bfad_num;
158 u16 rsvd;
159 union bfa_fcport_stats_u stats;
160};
161
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700162struct bfa_bsg_ioc_name_s {
163 bfa_status_t status;
164 u16 bfad_num;
165 u16 rsvd;
166 char name[BFA_ADAPTER_SYM_NAME_LEN];
167};
168
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700169struct bfa_bsg_ioc_info_s {
170 bfa_status_t status;
171 u16 bfad_num;
172 u16 rsvd;
173 char serialnum[64];
174 char hwpath[BFA_STRING_32];
175 char adapter_hwpath[BFA_STRING_32];
176 char guid[BFA_ADAPTER_SYM_NAME_LEN*2];
177 char name[BFA_ADAPTER_SYM_NAME_LEN];
178 char port_name[BFA_ADAPTER_SYM_NAME_LEN];
179 char eth_name[BFA_ADAPTER_SYM_NAME_LEN];
180 wwn_t pwwn;
181 wwn_t nwwn;
182 wwn_t factorypwwn;
183 wwn_t factorynwwn;
184 mac_t mac;
185 mac_t factory_mac; /* Factory mac address */
186 mac_t current_mac; /* Currently assigned mac address */
187 enum bfa_ioc_type_e ioc_type;
188 u16 pvid; /* Port vlan id */
189 u16 rsvd1;
190 u32 host;
191 u32 bandwidth; /* For PF support */
192 u32 rsvd2;
193};
194
195struct bfa_bsg_ioc_attr_s {
196 bfa_status_t status;
197 u16 bfad_num;
198 u16 rsvd;
199 struct bfa_ioc_attr_s ioc_attr;
200};
201
Krishna Gudipati60138062011-06-24 20:25:15 -0700202struct bfa_bsg_ioc_stats_s {
203 bfa_status_t status;
204 u16 bfad_num;
205 u16 rsvd;
206 struct bfa_ioc_stats_s ioc_stats;
207};
208
209struct bfa_bsg_ioc_fwstats_s {
210 bfa_status_t status;
211 u16 bfad_num;
212 u16 rsvd;
213 u32 buf_size;
214 u32 rsvd1;
215 u64 buf_ptr;
216};
217
218struct bfa_bsg_iocfc_attr_s {
219 bfa_status_t status;
220 u16 bfad_num;
221 u16 rsvd;
222 struct bfa_iocfc_attr_s iocfc_attr;
223};
224
225struct bfa_bsg_iocfc_intr_s {
226 bfa_status_t status;
227 u16 bfad_num;
228 u16 rsvd;
229 struct bfa_iocfc_intr_attr_s attr;
230};
231
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700232struct bfa_bsg_port_attr_s {
233 bfa_status_t status;
234 u16 bfad_num;
235 u16 rsvd;
236 struct bfa_port_attr_s attr;
237};
238
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700239struct bfa_bsg_port_cfg_s {
240 bfa_status_t status;
241 u16 bfad_num;
242 u16 rsvd;
243 u32 param;
244 u32 rsvd1;
245};
246
247struct bfa_bsg_port_cfg_maxfrsize_s {
248 bfa_status_t status;
249 u16 bfad_num;
250 u16 maxfrsize;
251};
252
Krishna Gudipati60138062011-06-24 20:25:15 -0700253struct bfa_bsg_port_stats_s {
254 bfa_status_t status;
255 u16 bfad_num;
256 u16 rsvd;
257 u32 buf_size;
258 u32 rsvd1;
259 u64 buf_ptr;
260};
261
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700262struct bfa_bsg_lport_attr_s {
263 bfa_status_t status;
264 u16 bfad_num;
265 u16 vf_id;
266 wwn_t pwwn;
267 struct bfa_lport_attr_s port_attr;
268};
269
Krishna Gudipati60138062011-06-24 20:25:15 -0700270struct bfa_bsg_lport_stats_s {
271 bfa_status_t status;
272 u16 bfad_num;
273 u16 vf_id;
274 wwn_t pwwn;
275 struct bfa_lport_stats_s port_stats;
276};
277
278struct bfa_bsg_lport_iostats_s {
279 bfa_status_t status;
280 u16 bfad_num;
281 u16 vf_id;
282 wwn_t pwwn;
283 struct bfa_itnim_iostats_s iostats;
284};
285
286struct bfa_bsg_lport_get_rports_s {
287 bfa_status_t status;
288 u16 bfad_num;
289 u16 vf_id;
290 wwn_t pwwn;
291 u64 rbuf_ptr;
292 u32 nrports;
293 u32 rsvd;
294};
295
296struct bfa_bsg_rport_attr_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_attr_s attr;
303};
304
305struct bfa_bsg_rport_stats_s {
306 bfa_status_t status;
307 u16 bfad_num;
308 u16 vf_id;
309 wwn_t pwwn;
310 wwn_t rpwwn;
311 struct bfa_rport_stats_s stats;
312};
313
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700314struct bfa_bsg_rport_scsi_addr_s {
315 bfa_status_t status;
316 u16 bfad_num;
317 u16 vf_id;
318 wwn_t pwwn;
319 wwn_t rpwwn;
320 u32 host;
321 u32 bus;
322 u32 target;
323 u32 lun;
324};
325
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700326struct bfa_bsg_rport_reset_stats_s {
327 bfa_status_t status;
328 u16 bfad_num;
329 u16 vf_id;
330 wwn_t pwwn;
331 wwn_t rpwwn;
332};
333
334struct bfa_bsg_rport_set_speed_s {
335 bfa_status_t status;
336 u16 bfad_num;
337 u16 vf_id;
338 enum bfa_port_speed speed;
339 u32 rsvd;
340 wwn_t pwwn;
341 wwn_t rpwwn;
342};
343
344struct bfa_bsg_vport_attr_s {
345 bfa_status_t status;
346 u16 bfad_num;
347 u16 vf_id;
348 wwn_t vpwwn;
349 struct bfa_vport_attr_s vport_attr;
350};
351
352struct bfa_bsg_vport_stats_s {
353 bfa_status_t status;
354 u16 bfad_num;
355 u16 vf_id;
356 wwn_t vpwwn;
357 struct bfa_vport_stats_s vport_stats;
358};
359
360struct bfa_bsg_reset_stats_s {
361 bfa_status_t status;
362 u16 bfad_num;
363 u16 vf_id;
364 wwn_t vpwwn;
365};
366
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700367struct bfa_bsg_fabric_get_lports_s {
368 bfa_status_t status;
369 u16 bfad_num;
370 u16 vf_id;
371 u64 buf_ptr;
372 u32 nports;
373 u32 rsvd;
374};
375
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700376struct bfa_bsg_trl_speed_s {
377 bfa_status_t status;
378 u16 bfad_num;
379 u16 rsvd;
380 enum bfa_port_speed speed;
381};
382
383struct bfa_bsg_fcpim_s {
384 bfa_status_t status;
385 u16 bfad_num;
386 u16 param;
387};
388
Krishna Gudipati60138062011-06-24 20:25:15 -0700389struct bfa_bsg_fcpim_modstats_s {
390 bfa_status_t status;
391 u16 bfad_num;
392 struct bfa_itnim_iostats_s modstats;
393};
394
395struct bfa_bsg_fcpim_del_itn_stats_s {
396 bfa_status_t status;
397 u16 bfad_num;
398 struct bfa_fcpim_del_itn_stats_s modstats;
399};
400
Krishna Gudipatif2ee7602011-07-20 17:01:34 -0700401struct bfa_bsg_fcpim_modstatsclr_s {
402 bfa_status_t status;
403 u16 bfad_num;
404};
405
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700406struct bfa_bsg_itnim_attr_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_attr_s attr;
413};
414
Krishna Gudipati60138062011-06-24 20:25:15 -0700415struct bfa_bsg_itnim_iostats_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_iostats_s iostats;
422};
423
424struct bfa_bsg_itnim_itnstats_s {
425 bfa_status_t status;
426 u16 bfad_num;
427 u16 vf_id;
428 wwn_t lpwwn;
429 wwn_t rpwwn;
430 struct bfa_itnim_stats_s itnstats;
431};
432
Krishna Gudipati1a4d8e12011-06-24 20:22:28 -0700433struct bfa_bsg_pcifn_cfg_s {
434 bfa_status_t status;
435 u16 bfad_num;
436 u16 rsvd;
437 struct bfa_ablk_cfg_s pcifn_cfg;
438};
439
440struct bfa_bsg_pcifn_s {
441 bfa_status_t status;
442 u16 bfad_num;
443 u16 pcifn_id;
444 u32 bandwidth;
445 u8 port;
446 enum bfi_pcifn_class pcifn_class;
447 u8 rsvd[1];
448};
449
450struct bfa_bsg_adapter_cfg_mode_s {
451 bfa_status_t status;
452 u16 bfad_num;
453 u16 rsvd;
454 struct bfa_adapter_cfg_mode_s cfg;
455};
456
457struct bfa_bsg_port_cfg_mode_s {
458 bfa_status_t status;
459 u16 bfad_num;
460 u16 instance;
461 struct bfa_port_cfg_mode_s cfg;
462};
463
Krishna Gudipatia7141342011-06-24 20:23:19 -0700464struct bfa_bsg_faa_attr_s {
465 bfa_status_t status;
466 u16 bfad_num;
467 u16 rsvd;
468 struct bfa_faa_attr_s faa_attr;
469};
470
Krishna Gudipati148d6102011-06-24 20:25:36 -0700471struct bfa_bsg_cee_attr_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
480struct bfa_bsg_cee_stats_s {
481 bfa_status_t status;
482 u16 bfad_num;
483 u16 rsvd;
484 u32 buf_size;
485 u32 rsvd1;
486 u64 buf_ptr;
487};
488
Krishna Gudipati51e569a2011-06-24 20:26:25 -0700489struct bfa_bsg_sfp_media_s {
490 bfa_status_t status;
491 u16 bfad_num;
492 u16 rsvd;
493 enum bfa_defs_sfp_media_e media;
494};
495
496struct bfa_bsg_sfp_speed_s {
497 bfa_status_t status;
498 u16 bfad_num;
499 u16 rsvd;
500 enum bfa_port_speed speed;
501};
502
Krishna Gudipati5a54b1d2011-06-24 20:27:13 -0700503struct bfa_bsg_flash_attr_s {
504 bfa_status_t status;
505 u16 bfad_num;
506 u16 rsvd;
507 struct bfa_flash_attr_s attr;
508};
509
510struct bfa_bsg_flash_s {
511 bfa_status_t status;
512 u16 bfad_num;
513 u8 instance;
514 u8 rsvd;
515 enum bfa_flash_part_type type;
516 int bufsz;
517 u64 buf_ptr;
518};
519
Krishna Gudipati3d7fc662011-06-24 20:28:17 -0700520struct bfa_bsg_diag_get_temp_s {
521 bfa_status_t status;
522 u16 bfad_num;
523 u16 rsvd;
524 struct bfa_diag_results_tempsensor_s result;
525};
526
527struct bfa_bsg_diag_memtest_s {
528 bfa_status_t status;
529 u16 bfad_num;
530 u16 rsvd[3];
531 u32 pat;
532 struct bfa_diag_memtest_result result;
533 struct bfa_diag_memtest_s memtest;
534};
535
536struct bfa_bsg_diag_loopback_s {
537 bfa_status_t status;
538 u16 bfad_num;
539 u16 rsvd;
540 enum bfa_port_opmode opmode;
541 enum bfa_port_speed speed;
542 u32 lpcnt;
543 u32 pat;
544 struct bfa_diag_loopback_result_s result;
545};
546
547struct bfa_bsg_diag_fwping_s {
548 bfa_status_t status;
549 u16 bfad_num;
550 u16 rsvd;
551 u32 cnt;
552 u32 pattern;
553 struct bfa_diag_results_fwping result;
554};
555
556struct bfa_bsg_diag_qtest_s {
557 bfa_status_t status;
558 u16 bfad_num;
559 u16 rsvd;
560 u32 force;
561 u32 queue;
562 struct bfa_diag_qtest_result_s result;
563};
564
565struct bfa_bsg_sfp_show_s {
566 bfa_status_t status;
567 u16 bfad_num;
568 u16 rsvd;
569 struct sfp_mem_s sfp;
570};
571
572struct bfa_bsg_diag_led_s {
573 bfa_status_t status;
574 u16 bfad_num;
575 u16 rsvd;
576 struct bfa_diag_ledtest_s ledtest;
577};
578
579struct bfa_bsg_diag_beacon_s {
580 bfa_status_t status;
581 u16 bfad_num;
582 u16 rsvd;
583 bfa_boolean_t beacon;
584 bfa_boolean_t link_e2e_beacon;
585 u32 second;
586};
587
588struct bfa_bsg_diag_lb_stat_s {
589 bfa_status_t status;
590 u16 bfad_num;
591 u16 rsvd;
592};
593
Krishna Gudipati3350d982011-06-24 20:28:37 -0700594struct bfa_bsg_phy_attr_s {
595 bfa_status_t status;
596 u16 bfad_num;
597 u16 instance;
598 struct bfa_phy_attr_s attr;
599};
600
601struct bfa_bsg_phy_s {
602 bfa_status_t status;
603 u16 bfad_num;
604 u16 instance;
605 u64 bufsz;
606 u64 buf_ptr;
607};
608
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700609struct bfa_bsg_debug_s {
610 bfa_status_t status;
611 u16 bfad_num;
612 u16 rsvd;
613 u32 bufsz;
614 int inst_no;
615 u64 buf_ptr;
616 u64 offset;
617};
618
Krishna Gudipati3350d982011-06-24 20:28:37 -0700619struct bfa_bsg_phy_stats_s {
620 bfa_status_t status;
621 u16 bfad_num;
622 u16 instance;
623 struct bfa_phy_stats_s stats;
624};
625
Krishna Gudipati61e62e22011-06-24 20:29:07 -0700626struct bfa_bsg_vhba_attr_s {
627 bfa_status_t status;
628 u16 bfad_num;
629 u16 pcifn_id;
630 struct bfa_vhba_attr_s attr;
631};
632
Krishna Gudipatib85daaf2011-06-13 15:55:11 -0700633struct bfa_bsg_fcpt_s {
634 bfa_status_t status;
635 u16 vf_id;
636 wwn_t lpwwn;
637 wwn_t dpwwn;
638 u32 tsecs;
639 int cts;
640 enum fc_cos cos;
641 struct fchs_s fchs;
642};
643#define bfa_bsg_fcpt_t struct bfa_bsg_fcpt_s
644
645struct bfa_bsg_data {
646 int payload_len;
647 void *payload;
648};
649
650#define bfad_chk_iocmd_sz(__payload_len, __hdrsz, __bufsz) \
651 (((__payload_len) != ((__hdrsz) + (__bufsz))) ? \
652 BFA_STATUS_FAILED : BFA_STATUS_OK)
653
654#endif /* BFAD_BSG_H */