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