1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889
/* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2019-2021 Broadcom. */ #ifndef _BNXT_HSI_H_ #define _BNXT_HSI_H_ /* input (size:128b/16B) */ struct input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; }; /* output (size:64b/8B) */ struct output { __le16 error_code; __le16 req_type; __le16 seq_id; __le16 resp_len; }; /* hwrm_short_input (size:128b/16B) */ struct hwrm_short_input { __le16 req_type; __le16 signature; #define SHORT_REQ_SIGNATURE_SHORT_CMD 0x4321UL __le16 unused_0; __le16 size; __le64 req_addr; }; #define HWRM_VER_GET 0x0UL #define HWRM_FUNC_RESET 0x11UL #define HWRM_FUNC_QCAPS 0x15UL #define HWRM_FUNC_QCFG 0x16UL #define HWRM_FUNC_CFG 0x17UL #define HWRM_FUNC_DRV_UNRGTR 0x1aUL #define HWRM_FUNC_DRV_RGTR 0x1dUL #define HWRM_PORT_PHY_CFG 0x20UL #define HWRM_PORT_MAC_CFG 0x21UL #define HWRM_PORT_PHY_QCFG 0x27UL #define HWRM_VNIC_ALLOC 0x40UL #define HWRM_VNIC_FREE 0x41UL #define HWRM_VNIC_CFG 0x42UL #define HWRM_RING_ALLOC 0x50UL #define HWRM_RING_FREE 0x51UL #define HWRM_RING_GRP_ALLOC 0x60UL #define HWRM_RING_GRP_FREE 0x61UL #define HWRM_CFA_L2_FILTER_ALLOC 0x90UL #define HWRM_CFA_L2_FILTER_FREE 0x91UL #define HWRM_CFA_L2_SET_RX_MASK 0x93UL #define HWRM_STAT_CTX_ALLOC 0xb0UL #define HWRM_STAT_CTX_FREE 0xb1UL #define HWRM_FUNC_RESOURCE_QCAPS 0x190UL #define HWRM_NVM_FLUSH 0xfff0UL #define HWRM_NVM_GET_VARIABLE 0xfff1UL #define HWRM_NVM_SET_VARIABLE 0xfff2UL #define HWRM_NA_SIGNATURE ((__le32)(-1)) #define HWRM_MAX_REQ_LEN 128 #define HWRM_VERSION_MAJOR 1 #define HWRM_VERSION_MINOR 10 #define HWRM_VERSION_UPDATE 0 /* hwrm_ver_get_input (size:192b/24B) */ struct hwrm_ver_get_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; u8 hwrm_intf_maj; u8 hwrm_intf_min; u8 hwrm_intf_upd; u8 unused_0[5]; }; /* hwrm_ver_get_output (size:1408b/176B) */ struct hwrm_ver_get_output { __le16 error_code; __le16 req_type; __le16 seq_id; __le16 resp_len; u8 hwrm_intf_maj_8b; u8 hwrm_intf_min_8b; u8 hwrm_intf_upd_8b; u8 hwrm_intf_rsvd_8b; u8 hwrm_fw_maj_8b; u8 hwrm_fw_min_8b; u8 hwrm_fw_bld_8b; u8 hwrm_fw_rsvd_8b; u8 mgmt_fw_maj_8b; u8 mgmt_fw_min_8b; u8 mgmt_fw_bld_8b; u8 mgmt_fw_rsvd_8b; u8 netctrl_fw_maj_8b; u8 netctrl_fw_min_8b; u8 netctrl_fw_bld_8b; u8 netctrl_fw_rsvd_8b; __le32 dev_caps_cfg; #define VER_GET_RESP_DEV_CAPS_CFG_SHORT_CMD_SUPPORTED 0x4UL #define VER_GET_RESP_DEV_CAPS_CFG_SHORT_CMD_REQUIRED 0x8UL u8 roce_fw_maj_8b; u8 roce_fw_min_8b; u8 roce_fw_bld_8b; u8 roce_fw_rsvd_8b; char hwrm_fw_name[16]; char mgmt_fw_name[16]; char netctrl_fw_name[16]; u8 reserved2[16]; char roce_fw_name[16]; __le16 chip_num; u8 chip_rev; u8 chip_metal; u8 chip_bond_id; u8 chip_platform_type; __le16 max_req_win_len; __le16 max_resp_len; __le16 def_req_timeout; u8 flags; u8 unused_0[2]; u8 always_1; __le16 hwrm_intf_major; __le16 hwrm_intf_minor; __le16 hwrm_intf_build; __le16 hwrm_intf_patch; __le16 hwrm_fw_major; __le16 hwrm_fw_minor; __le16 hwrm_fw_build; __le16 hwrm_fw_patch; __le16 mgmt_fw_major; __le16 mgmt_fw_minor; __le16 mgmt_fw_build; __le16 mgmt_fw_patch; __le16 netctrl_fw_major; __le16 netctrl_fw_minor; __le16 netctrl_fw_build; __le16 netctrl_fw_patch; __le16 roce_fw_major; __le16 roce_fw_minor; __le16 roce_fw_build; __le16 roce_fw_patch; __le16 max_ext_req_len; u8 unused_1[5]; u8 valid; }; /* hwrm_async_event_cmpl (size:128b/16B) */ struct hwrm_async_event_cmpl { __le16 type; __le16 event_id; #define ASYNC_EVENT_CMPL_EVENT_ID_LINK_STATUS_CHANGE 0x0UL __le32 event_data2; u8 opaque_v; u8 timestamp_lo; __le16 timestamp_hi; __le32 event_data1; }; /* hwrm_func_reset_input (size:192b/24B) */ struct hwrm_func_reset_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 enables; __le16 vf_id; u8 func_reset_level; #define FUNC_RESET_REQ_FUNC_RESET_LEVEL_RESETME 0x1UL u8 unused_0; }; /* hwrm_func_qcaps_input (size:192b/24B) */ struct hwrm_func_qcaps_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le16 fid; u8 unused_0[6]; }; /* hwrm_func_qcaps_output (size:640b/80B) */ struct hwrm_func_qcaps_output { __le16 error_code; __le16 req_type; __le16 seq_id; __le16 resp_len; __le16 fid; __le16 port_id; __le32 flags; u8 mac_address[6]; __le16 max_rsscos_ctx; __le16 max_cmpl_rings; __le16 max_tx_rings; __le16 max_rx_rings; __le16 max_l2_ctxs; __le16 max_vnics; __le16 first_vf_id; __le16 max_vfs; __le16 max_stat_ctx; __le32 max_encap_records; __le32 max_decap_records; __le32 max_tx_em_flows; __le32 max_tx_wm_flows; __le32 max_rx_em_flows; __le32 max_rx_wm_flows; __le32 max_mcast_filters; __le32 max_flow_id; __le32 max_hw_ring_grps; __le16 max_sp_tx_rings; u8 unused_0; u8 valid; }; /* hwrm_func_qcfg_input (size:192b/24B) */ struct hwrm_func_qcfg_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le16 fid; u8 unused_0[6]; }; /* hwrm_func_qcfg_output (size:704b/88B) */ struct hwrm_func_qcfg_output { __le16 error_code; __le16 req_type; __le16 seq_id; __le16 resp_len; __le16 fid; __le16 port_id; __le16 vlan; __le16 flags; #define FUNC_QCFG_RESP_FLAGS_MULTI_HOST 0x20UL u8 mac_address[6]; __le16 pci_id; __le16 alloc_rsscos_ctx; __le16 alloc_cmpl_rings; __le16 alloc_tx_rings; __le16 alloc_rx_rings; __le16 alloc_l2_ctx; __le16 alloc_vnics; __le16 mtu; __le16 mru; __le16 stat_ctx_id; u8 port_partition_type; #define FUNC_QCFG_RESP_PORT_PARTITION_TYPE_NPAR1_0 0x2UL u8 port_pf_cnt; __le16 dflt_vnic_id; __le16 max_mtu_configured; __le32 min_bw; __le32 max_bw; u8 evb_mode; u8 options; __le16 alloc_vfs; __le32 alloc_mcast_filters; __le32 alloc_hw_ring_grps; __le16 alloc_sp_tx_rings; __le16 alloc_stat_ctx; __le16 alloc_msix; __le16 registered_vfs; u8 unused_1[3]; u8 always_1; __le32 reset_addr_poll; u8 unused_2[3]; u8 valid; }; /* hwrm_func_cfg_input (size:704b/88B) */ struct hwrm_func_cfg_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le16 fid; __le16 num_msix; __le32 flags; __le32 enables; #define FUNC_CFG_REQ_ENABLES_NUM_CMPL_RINGS 0x8UL #define FUNC_CFG_REQ_ENABLES_NUM_TX_RINGS 0x10UL #define FUNC_CFG_REQ_ENABLES_NUM_RX_RINGS 0x20UL #define FUNC_CFG_REQ_ENABLES_NUM_STAT_CTXS 0x100UL #define FUNC_CFG_REQ_ENABLES_ASYNC_EVENT_CR 0x4000UL #define FUNC_CFG_REQ_ENABLES_NUM_HW_RING_GRPS 0x80000UL __le16 mtu; __le16 mru; __le16 num_rsscos_ctxs; __le16 num_cmpl_rings; __le16 num_tx_rings; __le16 num_rx_rings; __le16 num_l2_ctxs; __le16 num_vnics; __le16 num_stat_ctxs; __le16 num_hw_ring_grps; u8 dflt_mac_addr[6]; __le16 dflt_vlan; __be32 dflt_ip_addr[4]; __le32 min_bw; __le32 max_bw; __le16 async_event_cr; u8 vlan_antispoof_mode; u8 allowed_vlan_pris; u8 evb_mode; u8 options; __le16 num_mcast_filters; }; /* hwrm_func_drv_rgtr_input (size:896b/112B) */ struct hwrm_func_drv_rgtr_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 flags; __le32 enables; #define FUNC_DRV_RGTR_REQ_ENABLES_OS_TYPE 0x1UL #define FUNC_DRV_RGTR_REQ_ENABLES_VER 0x2UL #define FUNC_DRV_RGTR_REQ_ENABLES_ASYNC_EVENT_FWD 0x10UL __le16 os_type; #define FUNC_DRV_RGTR_REQ_OS_TYPE_OTHER 0x1UL u8 ver_maj_8b; u8 ver_min_8b; u8 ver_upd_8b; u8 unused_0[3]; __le32 timestamp; u8 unused_1[4]; __le32 vf_req_fwd[8]; __le32 async_event_fwd[8]; __le16 ver_maj; __le16 ver_min; __le16 ver_upd; __le16 ver_patch; }; /* hwrm_func_drv_unrgtr_input (size:192b/24B) */ struct hwrm_func_drv_unrgtr_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 flags; #define FUNC_DRV_UNRGTR_REQ_FLAGS_PREPARE_FOR_SHUTDOWN 0x1UL u8 unused_0[4]; }; /* hwrm_func_resource_qcaps_input (size:192b/24B) */ struct hwrm_func_resource_qcaps_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le16 fid; u8 unused_0[6]; }; /* hwrm_func_resource_qcaps_output (size:448b/56B) */ struct hwrm_func_resource_qcaps_output { __le16 error_code; __le16 req_type; __le16 seq_id; __le16 resp_len; __le16 max_vfs; __le16 max_msix; __le16 vf_reservation_strategy; __le16 min_rsscos_ctx; __le16 max_rsscos_ctx; __le16 min_cmpl_rings; __le16 max_cmpl_rings; __le16 min_tx_rings; __le16 max_tx_rings; __le16 min_rx_rings; __le16 max_rx_rings; __le16 min_l2_ctxs; __le16 max_l2_ctxs; __le16 min_vnics; __le16 max_vnics; __le16 min_stat_ctx; __le16 max_stat_ctx; __le16 min_hw_ring_grps; __le16 max_hw_ring_grps; __le16 max_tx_scheduler_inputs; __le16 flags; u8 unused_0[5]; u8 valid; }; /* hwrm_func_vlan_qcfg_input (size:192b/24B) */ struct hwrm_func_vlan_qcfg_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le16 fid; u8 unused_0[6]; }; /* hwrm_port_phy_cfg_input (size:448b/56B) */ struct hwrm_port_phy_cfg_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 flags; #define PORT_PHY_CFG_REQ_FLAGS_RESET_PHY 0x1UL #define PORT_PHY_CFG_REQ_FLAGS_FORCE 0x4UL __le32 enables; #define PORT_PHY_CFG_REQ_ENABLES_AUTO_MODE 0x1UL #define PORT_PHY_CFG_REQ_ENABLES_AUTO_DUPLEX 0x2UL #define PORT_PHY_CFG_REQ_ENABLES_AUTO_PAUSE 0x4UL #define PORT_PHY_CFG_REQ_ENABLES_AUTO_LINK_SPEED_MASK 0x10UL __le16 port_id; __le16 force_link_speed; #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_1GB 0xaUL #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_10GB 0x64UL #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_25GB 0xfaUL #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_40GB 0x190UL #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_50GB 0x1f4UL #define PORT_PHY_CFG_REQ_FORCE_LINK_SPEED_100GB 0x3e8UL u8 auto_mode; #define PORT_PHY_CFG_REQ_AUTO_MODE_SPEED_MASK 0x4UL u8 auto_duplex; #define PORT_PHY_CFG_REQ_AUTO_DUPLEX_BOTH 0x2UL u8 auto_pause; #define PORT_PHY_CFG_REQ_AUTO_PAUSE_TX 0x1UL #define PORT_PHY_CFG_REQ_AUTO_PAUSE_RX 0x2UL u8 unused_0; __le16 auto_link_speed; __le16 auto_link_speed_mask; #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_100MB 0x2UL #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_1GB 0x8UL #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_10GB 0x40UL #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_25GB 0x100UL #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_40GB 0x200UL #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_50GB 0x400UL #define PORT_PHY_CFG_REQ_AUTO_LINK_SPEED_MASK_100GB 0x800UL u8 wirespeed; u8 lpbk; u8 force_pause; u8 unused_1; __le32 preemphasis; __le16 eee_link_speed_mask; u8 unused_2[2]; __le32 tx_lpi_timer; __le32 unused_3; }; /* hwrm_port_phy_qcfg_input (size:192b/24B) */ struct hwrm_port_phy_qcfg_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le16 port_id; u8 unused_0[6]; }; /* hwrm_port_phy_qcfg_output (size:768b/96B) */ struct hwrm_port_phy_qcfg_output { __le16 error_code; __le16 req_type; __le16 seq_id; __le16 resp_len; u8 link; #define PORT_PHY_QCFG_RESP_LINK_LINK 0x2UL u8 unused_0; __le16 link_speed; #define PORT_PHY_QCFG_RESP_LINK_SPEED_100MB 0x1UL #define PORT_PHY_QCFG_RESP_LINK_SPEED_1GB 0xaUL #define PORT_PHY_QCFG_RESP_LINK_SPEED_2GB 0x14UL #define PORT_PHY_QCFG_RESP_LINK_SPEED_2_5GB 0x19UL #define PORT_PHY_QCFG_RESP_LINK_SPEED_10GB 0x64UL #define PORT_PHY_QCFG_RESP_LINK_SPEED_20GB 0xc8UL #define PORT_PHY_QCFG_RESP_LINK_SPEED_25GB 0xfaUL #define PORT_PHY_QCFG_RESP_LINK_SPEED_40GB 0x190UL #define PORT_PHY_QCFG_RESP_LINK_SPEED_50GB 0x1f4UL #define PORT_PHY_QCFG_RESP_LINK_SPEED_100GB 0x3e8UL #define PORT_PHY_QCFG_RESP_LINK_SPEED_10MB 0xffffUL u8 duplex_cfg; u8 pause; __le16 support_speeds; #define PORT_QCFG_SUPPORT_SPEEDS_100MBHD 0x1UL #define PORT_QCFG_SUPPORT_SPEEDS_100MB 0x2UL #define PORT_QCFG_SUPPORT_SPEEDS_1GBHD 0x4UL #define PORT_QCFG_SUPPORT_SPEEDS_1GB 0x8UL #define PORT_QCFG_SUPPORT_SPEEDS_2GB 0x10UL #define PORT_QCFG_SUPPORT_SPEEDS_2_5GB 0x20UL #define PORT_QCFG_SUPPORT_SPEEDS_10GB 0x40UL #define PORT_QCFG_SUPPORT_SPEEDS_20GB 0x80UL #define PORT_QCFG_SUPPORT_SPEEDS_25GB 0x100UL #define PORT_QCFG_SUPPORT_SPEEDS_50GB 0x400UL #define PORT_QCFG_SUPPORT_SPEEDS_100GB 0x800UL #define PORT_QCFG_SUPPORT_SPEEDS_200GB 0x4000UL __le16 force_link_speed; u8 auto_mode; u8 auto_pause; __le16 auto_link_speed; __le16 auto_link_speed_mask; u8 wirespeed; u8 lpbk; u8 force_pause; u8 module_status; __le32 preemphasis; u8 phy_maj; u8 phy_min; u8 phy_bld; u8 phy_type; u8 media_type; u8 xcvr_pkg_type; u8 eee_config_phy_addr; u8 parallel_detect; __le16 link_partner_adv_speeds; u8 link_partner_adv_auto_mode; u8 link_partner_adv_pause; __le16 adv_eee_link_speed_mask; __le16 link_partner_adv_eee_link_speed_mask; __le32 xcvr_identifier_type_tx_lpi_timer; __le16 fec_cfg; u8 duplex_state; u8 option_flags; char phy_vendor_name[16]; char phy_vendor_partnumber[16]; u8 unused_2[7]; u8 valid; }; /* hwrm_port_mac_cfg_input (size:320b/40B) */ struct hwrm_port_mac_cfg_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 flags; __le32 enables; __le16 port_id; u8 ipg; u8 lpbk; #define PORT_MAC_CFG_REQ_LPBK_NONE 0x0UL u8 vlan_pri2cos_map_pri; u8 reserved1; u8 tunnel_pri2cos_map_pri; u8 dscp2pri_map_pri; __le16 rx_ts_capture_ptp_msg_type; __le16 tx_ts_capture_ptp_msg_type; u8 cos_field_cfg; u8 unused_0[3]; }; /* hwrm_vnic_alloc_input (size:192b/24B) */ struct hwrm_vnic_alloc_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 flags; #define VNIC_ALLOC_REQ_FLAGS_DEFAULT 0x1UL u8 unused_0[4]; }; /* hwrm_vnic_alloc_output (size:128b/16B) */ struct hwrm_vnic_alloc_output { __le16 error_code; __le16 req_type; __le16 seq_id; __le16 resp_len; __le32 vnic_id; u8 unused_0[3]; u8 valid; }; /* hwrm_vnic_free_input (size:192b/24B) */ struct hwrm_vnic_free_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 vnic_id; u8 unused_0[4]; }; /* hwrm_vnic_cfg_input (size:320b/40B) */ struct hwrm_vnic_cfg_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 flags; __le32 enables; #define VNIC_CFG_REQ_ENABLES_DFLT_RING_GRP 0x1UL #define VNIC_CFG_REQ_ENABLES_MRU 0x10UL __le16 vnic_id; __le16 dflt_ring_grp; __le16 rss_rule; __le16 cos_rule; __le16 lb_rule; __le16 mru; __le16 default_rx_ring_id; __le16 default_cmpl_ring_id; }; /* hwrm_ring_alloc_input (size:704b/88B) */ struct hwrm_ring_alloc_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 enables; #define RING_ALLOC_REQ_ENABLES_RX_BUF_SIZE_VALID 0x100UL u8 ring_type; #define RING_ALLOC_REQ_RING_TYPE_L2_CMPL 0x0UL #define RING_ALLOC_REQ_RING_TYPE_TX 0x1UL #define RING_ALLOC_REQ_RING_TYPE_RX 0x2UL u8 unused_0; __le16 flags; __le64 page_tbl_addr; __le32 fbo; u8 page_size; u8 page_tbl_depth; u8 unused_1[2]; __le32 length; __le16 logical_id; __le16 cmpl_ring_id; __le16 queue_id; __le16 rx_buf_size; __le16 rx_ring_id; __le16 nq_ring_id; __le16 ring_arb_cfg; __le16 unused_3; __le32 reserved3; __le32 stat_ctx_id; __le32 reserved4; __le32 max_bw; u8 int_mode; #define RING_ALLOC_REQ_INT_MODE_POLL 0x3UL u8 unused_4[3]; __le64 cq_handle; }; /* hwrm_ring_alloc_output (size:128b/16B) */ struct hwrm_ring_alloc_output { __le16 error_code; __le16 req_type; __le16 seq_id; __le16 resp_len; __le16 ring_id; __le16 logical_ring_id; u8 unused_0[3]; u8 valid; }; /* hwrm_ring_free_input (size:192b/24B) */ struct hwrm_ring_free_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; u8 ring_type; #define RING_FREE_REQ_RING_TYPE_L2_CMPL 0x0UL #define RING_FREE_REQ_RING_TYPE_TX 0x1UL #define RING_FREE_REQ_RING_TYPE_RX 0x2UL u8 unused_0; __le16 ring_id; u8 unused_1[4]; }; /* hwrm_ring_grp_alloc_input (size:192b/24B) */ struct hwrm_ring_grp_alloc_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le16 cr; __le16 rr; __le16 ar; __le16 sc; }; /* hwrm_ring_grp_alloc_output (size:128b/16B) */ struct hwrm_ring_grp_alloc_output { __le16 error_code; __le16 req_type; __le16 seq_id; __le16 resp_len; __le32 ring_group_id; u8 unused_0[3]; u8 valid; }; /* hwrm_ring_grp_free_input (size:192b/24B) */ struct hwrm_ring_grp_free_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 ring_group_id; u8 unused_0[4]; }; /* hwrm_cfa_l2_filter_alloc_input (size:768b/96B) */ struct hwrm_cfa_l2_filter_alloc_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 flags; #define CFA_L2_FILTER_ALLOC_REQ_FLAGS_PATH_RX 0x1UL __le32 enables; #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_ADDR 0x1UL #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_L2_ADDR_MASK 0x2UL #define CFA_L2_FILTER_ALLOC_REQ_ENABLES_DST_ID 0x8000UL u8 l2_addr[6]; u8 unused_0[2]; u8 l2_addr_mask[6]; __le16 l2_ovlan; __le16 l2_ovlan_mask; __le16 l2_ivlan; __le16 l2_ivlan_mask; u8 unused_1[2]; u8 t_l2_addr[6]; u8 unused_2[2]; u8 t_l2_addr_mask[6]; __le16 t_l2_ovlan; __le16 t_l2_ovlan_mask; __le16 t_l2_ivlan; __le16 t_l2_ivlan_mask; u8 src_type; #define CFA_L2_FILTER_ALLOC_REQ_SRC_TYPE_NPORT 0x0UL u8 unused_3; __le32 src_id; u8 tunnel_type; u8 unused_4; __le16 dst_id; __le16 mirror_vnic_id; u8 pri_hint; u8 unused_5; __le32 unused_6; __le64 l2_filter_id_hint; }; /* hwrm_cfa_l2_filter_alloc_output (size:192b/24B) */ struct hwrm_cfa_l2_filter_alloc_output { __le16 error_code; __le16 req_type; __le16 seq_id; __le16 resp_len; __le64 l2_filter_id; __le32 flow_id; u8 unused_0[3]; u8 valid; }; /* hwrm_cfa_l2_filter_free_input (size:192b/24B) */ struct hwrm_cfa_l2_filter_free_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le64 l2_filter_id; }; /* hwrm_cfa_l2_set_rx_mask_input (size:448b/56B) */ struct hwrm_cfa_l2_set_rx_mask_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 vnic_id; __le32 mask; #define CFA_L2_SET_RX_MASK_REQ_MASK_MCAST 0x2UL #define CFA_L2_SET_RX_MASK_REQ_MASK_ALL_MCAST 0x4UL #define CFA_L2_SET_RX_MASK_REQ_MASK_BCAST 0x8UL #define CFA_L2_SET_RX_MASK_REQ_MASK_PROMISCUOUS 0x10UL __le64 mc_tbl_addr; __le32 num_mc_entries; u8 unused_0[4]; __le64 vlan_tag_tbl_addr; __le32 num_vlan_tags; u8 unused_1[4]; }; /* hwrm_stat_ctx_alloc_input (size:256b/32B) */ struct hwrm_stat_ctx_alloc_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le64 stats_dma_addr; __le32 update_period_ms; u8 stat_ctx_flags; u8 unused_0[3]; }; /* hwrm_stat_ctx_alloc_output (size:128b/16B) */ struct hwrm_stat_ctx_alloc_output { __le16 error_code; __le16 req_type; __le16 seq_id; __le16 resp_len; __le32 stat_ctx_id; u8 unused_0[3]; u8 valid; }; /* hwrm_stat_ctx_free_input (size:192b/24B) */ struct hwrm_stat_ctx_free_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le32 stat_ctx_id; u8 unused_0[4]; }; /* hwrm_nvm_flush_input (size:128b/16B) */ struct hwrm_nvm_flush_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; }; /* hwrm_nvm_get_variable_input (size:320b/40B) */ struct hwrm_nvm_get_variable_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le64 dest_data_addr; __le16 data_len; __le16 option_num; __le16 dimensions; __le16 index_0; __le16 index_1; __le16 index_2; __le16 index_3; u8 flags; u8 unused_0; }; /* hwrm_nvm_set_variable_input (size:320b/40B) */ struct hwrm_nvm_set_variable_input { __le16 req_type; __le16 cmpl_ring; __le16 seq_id; __le16 target_id; __le64 resp_addr; __le64 src_data_addr; __le16 data_len; __le16 option_num; __le16 dimensions; __le16 index_0; __le16 index_1; __le16 index_2; __le16 index_3; u8 flags; u8 unused_0; }; #endif /* _BNXT_HSI_H_ */