Go to the documentation of this file.
35 #ifndef _T4FW_INTERFACE_H_
36 #define _T4FW_INTERFACE_H_
38 #define FW_T4VF_SGE_BASE_ADDR 0x0000
39 #define FW_T4VF_MPS_BASE_ADDR 0x0100
40 #define FW_T4VF_PL_BASE_ADDR 0x0200
41 #define FW_T4VF_MBDATA_BASE_ADDR 0x0240
42 #define FW_T4VF_CIM_BASE_ADDR 0x0300
70 #define FW_WR_OP(x) ((x) << 24)
71 #define FW_WR_ATOMIC(x) ((x) << 23)
72 #define FW_WR_FLUSH(x) ((x) << 22)
73 #define FW_WR_COMPL(x) ((x) << 21)
74 #define FW_WR_IMMDLEN_MASK 0xff
75 #define FW_WR_IMMDLEN(x) ((x) << 0)
77 #define FW_WR_EQUIQ (1U << 31)
78 #define FW_WR_EQUEQ (1U << 30)
79 #define FW_WR_FLOWID(x) ((x) << 8)
80 #define FW_WR_LEN16(x) ((x) << 0)
82 #define HW_TPL_FR_MT_PR_IV_P_FC 0X32B
121 #define FW_FLOWC_WR_NPARAMS(x) ((x) << 0)
131 #define FW_OFLD_TX_DATA_WR_TUNNEL(x) ((x) << 19)
132 #define FW_OFLD_TX_DATA_WR_SAVE(x) ((x) << 18)
133 #define FW_OFLD_TX_DATA_WR_FLUSH(x) ((x) << 17)
134 #define FW_OFLD_TX_DATA_WR_URGENT(x) ((x) << 16)
135 #define FW_OFLD_TX_DATA_WR_MORE(x) ((x) << 15)
136 #define FW_OFLD_TX_DATA_WR_SHOVE(x) ((x) << 14)
137 #define FW_OFLD_TX_DATA_WR_ULPMODE(x) ((x) << 10)
138 #define FW_OFLD_TX_DATA_WR_ULPSUBMODE(x) ((x) << 6)
143 #define FW_CMD_WR_DMA (1U << 17)
158 #define FW_CMD_MAX_TIMEOUT 3000
167 #define FW_CMD_HELLO_TIMEOUT (3 * FW_CMD_MAX_TIMEOUT)
168 #define FW_CMD_HELLO_RETRIES 3
222 #define FW_CMD_OP(x) ((x) << 24)
223 #define FW_CMD_OP_GET(x) (((x) >> 24) & 0xff)
224 #define FW_CMD_REQUEST (1U << 23)
225 #define FW_CMD_READ (1U << 22)
226 #define FW_CMD_WRITE (1U << 21)
227 #define FW_CMD_EXEC (1U << 20)
228 #define FW_CMD_RAMASK(x) ((x) << 20)
229 #define FW_CMD_RETVAL(x) ((x) << 8)
230 #define FW_CMD_RETVAL_GET(x) (((x) >> 8) & 0xff)
231 #define FW_CMD_LEN16(x) ((x) << 0)
263 #define FW_LDST_CMD_ADDRSPACE(x) ((x) << 0)
309 #define FW_LDST_CMD_MSG(x) ((x) << 31)
310 #define FW_LDST_CMD_PADDR(x) ((x) << 8)
311 #define FW_LDST_CMD_MMD(x) ((x) << 0)
312 #define FW_LDST_CMD_FID(x) ((x) << 15)
313 #define FW_LDST_CMD_CTL(x) ((x) << 0)
314 #define FW_LDST_CMD_RPLCPF(x) ((x) << 0)
323 #define FW_RESET_CMD_HALT_SHIFT 31
324 #define FW_RESET_CMD_HALT_MASK 0x1
325 #define FW_RESET_CMD_HALT(x) ((x) << FW_RESET_CMD_HALT_SHIFT)
326 #define FW_RESET_CMD_HALT_GET(x) \
327 (((x) >> FW_RESET_CMD_HALT_SHIFT) & FW_RESET_CMD_HALT_MASK)
337 #define FW_HELLO_CMD_ERR (1U << 31)
338 #define FW_HELLO_CMD_INIT (1U << 30)
339 #define FW_HELLO_CMD_MASTERDIS(x) ((x) << 29)
340 #define FW_HELLO_CMD_MASTERFORCE(x) ((x) << 28)
341 #define FW_HELLO_CMD_MBMASTER_MASK 0xfU
342 #define FW_HELLO_CMD_MBMASTER_SHIFT 24
343 #define FW_HELLO_CMD_MBMASTER(x) ((x) << FW_HELLO_CMD_MBMASTER_SHIFT)
344 #define FW_HELLO_CMD_MBMASTER_GET(x) \
345 (((x) >> FW_HELLO_CMD_MBMASTER_SHIFT) & FW_HELLO_CMD_MBMASTER_MASK)
346 #define FW_HELLO_CMD_MBASYNCNOT(x) ((x) << 20)
347 #define FW_HELLO_CMD_STAGE(x) ((x) << 17)
348 #define FW_HELLO_CMD_CLEARINIT (1U << 16)
461 #define FW_CAPS_CONFIG_CMD_CFVALID (1U << 27)
462 #define FW_CAPS_CONFIG_CMD_MEMTYPE_CF(x) ((x) << 24)
463 #define FW_CAPS_CONFIG_CMD_MEMADDR64K_CF(x) ((x) << 16)
553 #define FW_PARAMS_MNEM(x) ((x) << 24)
554 #define FW_PARAMS_PARAM_X(x) ((x) << 16)
555 #define FW_PARAMS_PARAM_Y_SHIFT 8
556 #define FW_PARAMS_PARAM_Y_MASK 0xffU
557 #define FW_PARAMS_PARAM_Y(x) ((x) << FW_PARAMS_PARAM_Y_SHIFT)
558 #define FW_PARAMS_PARAM_Y_GET(x) (((x) >> FW_PARAMS_PARAM_Y_SHIFT) &\
559 FW_PARAMS_PARAM_Y_MASK)
560 #define FW_PARAMS_PARAM_Z_SHIFT 0
561 #define FW_PARAMS_PARAM_Z_MASK 0xffu
562 #define FW_PARAMS_PARAM_Z(x) ((x) << FW_PARAMS_PARAM_Z_SHIFT)
563 #define FW_PARAMS_PARAM_Z_GET(x) (((x) >> FW_PARAMS_PARAM_Z_SHIFT) &\
564 FW_PARAMS_PARAM_Z_MASK)
565 #define FW_PARAMS_PARAM_XYZ(x) ((x) << 0)
566 #define FW_PARAMS_PARAM_YZ(x) ((x) << 0)
577 #define FW_PARAMS_CMD_PFN(x) ((x) << 8)
578 #define FW_PARAMS_CMD_VFN(x) ((x) << 0)
592 #define FW_PFVF_CMD_PFN(x) ((x) << 8)
593 #define FW_PFVF_CMD_VFN(x) ((x) << 0)
595 #define FW_PFVF_CMD_NIQFLINT(x) ((x) << 20)
596 #define FW_PFVF_CMD_NIQFLINT_GET(x) (((x) >> 20) & 0xfff)
598 #define FW_PFVF_CMD_NIQ(x) ((x) << 0)
599 #define FW_PFVF_CMD_NIQ_GET(x) (((x) >> 0) & 0xfffff)
601 #define FW_PFVF_CMD_TYPE (1 << 31)
602 #define FW_PFVF_CMD_TYPE_GET(x) (((x) >> 31) & 0x1)
604 #define FW_PFVF_CMD_CMASK(x) ((x) << 24)
605 #define FW_PFVF_CMD_CMASK_MASK 0xf
606 #define FW_PFVF_CMD_CMASK_GET(x) (((x) >> 24) & FW_PFVF_CMD_CMASK_MASK)
608 #define FW_PFVF_CMD_PMASK(x) ((x) << 20)
609 #define FW_PFVF_CMD_PMASK_MASK 0xf
610 #define FW_PFVF_CMD_PMASK_GET(x) (((x) >> 20) & FW_PFVF_CMD_PMASK_MASK)
612 #define FW_PFVF_CMD_NEQ(x) ((x) << 0)
613 #define FW_PFVF_CMD_NEQ_GET(x) (((x) >> 0) & 0xfffff)
615 #define FW_PFVF_CMD_TC(x) ((x) << 24)
616 #define FW_PFVF_CMD_TC_GET(x) (((x) >> 24) & 0xff)
618 #define FW_PFVF_CMD_NVI(x) ((x) << 16)
619 #define FW_PFVF_CMD_NVI_GET(x) (((x) >> 16) & 0xff)
621 #define FW_PFVF_CMD_NEXACTF(x) ((x) << 0)
622 #define FW_PFVF_CMD_NEXACTF_GET(x) (((x) >> 0) & 0xffff)
624 #define FW_PFVF_CMD_R_CAPS(x) ((x) << 24)
625 #define FW_PFVF_CMD_R_CAPS_GET(x) (((x) >> 24) & 0xff)
627 #define FW_PFVF_CMD_WX_CAPS(x) ((x) << 16)
628 #define FW_PFVF_CMD_WX_CAPS_GET(x) (((x) >> 16) & 0xff)
630 #define FW_PFVF_CMD_NETHCTRL(x) ((x) << 0)
631 #define FW_PFVF_CMD_NETHCTRL_GET(x) (((x) >> 0) & 0xffff)
659 #define FW_IQ_CMD_PFN(x) ((x) << 8)
660 #define FW_IQ_CMD_VFN(x) ((x) << 0)
662 #define FW_IQ_CMD_ALLOC (1U << 31)
663 #define FW_IQ_CMD_FREE (1U << 30)
664 #define FW_IQ_CMD_MODIFY (1U << 29)
665 #define FW_IQ_CMD_IQSTART(x) ((x) << 28)
666 #define FW_IQ_CMD_IQSTOP(x) ((x) << 27)
668 #define FW_IQ_CMD_TYPE(x) ((x) << 29)
669 #define FW_IQ_CMD_IQASYNCH(x) ((x) << 28)
670 #define FW_IQ_CMD_VIID(x) ((x) << 16)
671 #define FW_IQ_CMD_IQANDST(x) ((x) << 15)
672 #define FW_IQ_CMD_IQANUS(x) ((x) << 14)
673 #define FW_IQ_CMD_IQANUD(x) ((x) << 12)
674 #define FW_IQ_CMD_IQANDSTINDEX(x) ((x) << 0)
676 #define FW_IQ_CMD_IQDROPRSS (1U << 15)
677 #define FW_IQ_CMD_IQGTSMODE (1U << 14)
678 #define FW_IQ_CMD_IQPCIECH(x) ((x) << 12)
679 #define FW_IQ_CMD_IQDCAEN(x) ((x) << 11)
680 #define FW_IQ_CMD_IQDCACPU(x) ((x) << 6)
681 #define FW_IQ_CMD_IQINTCNTTHRESH(x) ((x) << 4)
682 #define FW_IQ_CMD_IQO (1U << 3)
683 #define FW_IQ_CMD_IQCPRIO(x) ((x) << 2)
684 #define FW_IQ_CMD_IQESIZE(x) ((x) << 0)
686 #define FW_IQ_CMD_IQNS(x) ((x) << 31)
687 #define FW_IQ_CMD_IQRO(x) ((x) << 30)
688 #define FW_IQ_CMD_IQFLINTIQHSEN(x) ((x) << 28)
689 #define FW_IQ_CMD_IQFLINTCONGEN(x) ((x) << 27)
690 #define FW_IQ_CMD_IQFLINTISCSIC(x) ((x) << 26)
691 #define FW_IQ_CMD_FL0CNGCHMAP(x) ((x) << 20)
692 #define FW_IQ_CMD_FL0CACHELOCK(x) ((x) << 15)
693 #define FW_IQ_CMD_FL0DBP(x) ((x) << 14)
694 #define FW_IQ_CMD_FL0DATANS(x) ((x) << 13)
695 #define FW_IQ_CMD_FL0DATARO(x) ((x) << 12)
696 #define FW_IQ_CMD_FL0CONGCIF(x) ((x) << 11)
697 #define FW_IQ_CMD_FL0ONCHIP(x) ((x) << 10)
698 #define FW_IQ_CMD_FL0STATUSPGNS(x) ((x) << 9)
699 #define FW_IQ_CMD_FL0STATUSPGRO(x) ((x) << 8)
700 #define FW_IQ_CMD_FL0FETCHNS(x) ((x) << 7)
701 #define FW_IQ_CMD_FL0FETCHRO(x) ((x) << 6)
702 #define FW_IQ_CMD_FL0HOSTFCMODE(x) ((x) << 4)
703 #define FW_IQ_CMD_FL0CPRIO(x) ((x) << 3)
704 #define FW_IQ_CMD_FL0PADEN (1U << 2)
705 #define FW_IQ_CMD_FL0PACKEN (1U << 1)
706 #define FW_IQ_CMD_FL0CONGEN (1U << 0)
708 #define FW_IQ_CMD_FL0DCAEN(x) ((x) << 15)
709 #define FW_IQ_CMD_FL0DCACPU(x) ((x) << 10)
710 #define FW_IQ_CMD_FL0FBMIN(x) ((x) << 7)
711 #define FW_IQ_CMD_FL0FBMAX(x) ((x) << 4)
712 #define FW_IQ_CMD_FL0CIDXFTHRESHO (1U << 3)
713 #define FW_IQ_CMD_FL0CIDXFTHRESH(x) ((x) << 0)
715 #define FW_IQ_CMD_FL1CNGCHMAP(x) ((x) << 20)
716 #define FW_IQ_CMD_FL1CACHELOCK(x) ((x) << 15)
717 #define FW_IQ_CMD_FL1DBP(x) ((x) << 14)
718 #define FW_IQ_CMD_FL1DATANS(x) ((x) << 13)
719 #define FW_IQ_CMD_FL1DATARO(x) ((x) << 12)
720 #define FW_IQ_CMD_FL1CONGCIF(x) ((x) << 11)
721 #define FW_IQ_CMD_FL1ONCHIP(x) ((x) << 10)
722 #define FW_IQ_CMD_FL1STATUSPGNS(x) ((x) << 9)
723 #define FW_IQ_CMD_FL1STATUSPGRO(x) ((x) << 8)
724 #define FW_IQ_CMD_FL1FETCHNS(x) ((x) << 7)
725 #define FW_IQ_CMD_FL1FETCHRO(x) ((x) << 6)
726 #define FW_IQ_CMD_FL1HOSTFCMODE(x) ((x) << 4)
727 #define FW_IQ_CMD_FL1CPRIO(x) ((x) << 3)
728 #define FW_IQ_CMD_FL1PADEN (1U << 2)
729 #define FW_IQ_CMD_FL1PACKEN (1U << 1)
730 #define FW_IQ_CMD_FL1CONGEN (1U << 0)
732 #define FW_IQ_CMD_FL1DCAEN(x) ((x) << 15)
733 #define FW_IQ_CMD_FL1DCACPU(x) ((x) << 10)
734 #define FW_IQ_CMD_FL1FBMIN(x) ((x) << 7)
735 #define FW_IQ_CMD_FL1FBMAX(x) ((x) << 4)
736 #define FW_IQ_CMD_FL1CIDXFTHRESHO (1U << 3)
737 #define FW_IQ_CMD_FL1CIDXFTHRESH(x) ((x) << 0)
752 #define FW_EQ_ETH_CMD_PFN(x) ((x) << 8)
753 #define FW_EQ_ETH_CMD_VFN(x) ((x) << 0)
754 #define FW_EQ_ETH_CMD_ALLOC (1U << 31)
755 #define FW_EQ_ETH_CMD_FREE (1U << 30)
756 #define FW_EQ_ETH_CMD_MODIFY (1U << 29)
757 #define FW_EQ_ETH_CMD_EQSTART (1U << 28)
758 #define FW_EQ_ETH_CMD_EQSTOP (1U << 27)
760 #define FW_EQ_ETH_CMD_EQID(x) ((x) << 0)
761 #define FW_EQ_ETH_CMD_EQID_GET(x) (((x) >> 0) & 0xfffff)
762 #define FW_EQ_ETH_CMD_PHYSEQID(x) ((x) << 0)
763 #define FW_EQ_ETH_CMD_PHYSEQID_GET(x) (((x) >> 0) & 0xfffff)
765 #define FW_EQ_ETH_CMD_FETCHSZM(x) ((x) << 26)
766 #define FW_EQ_ETH_CMD_STATUSPGNS(x) ((x) << 25)
767 #define FW_EQ_ETH_CMD_STATUSPGRO(x) ((x) << 24)
768 #define FW_EQ_ETH_CMD_FETCHNS(x) ((x) << 23)
769 #define FW_EQ_ETH_CMD_FETCHRO(x) ((x) << 22)
770 #define FW_EQ_ETH_CMD_HOSTFCMODE(x) ((x) << 20)
771 #define FW_EQ_ETH_CMD_CPRIO(x) ((x) << 19)
772 #define FW_EQ_ETH_CMD_ONCHIP(x) ((x) << 18)
773 #define FW_EQ_ETH_CMD_PCIECHN(x) ((x) << 16)
774 #define FW_EQ_ETH_CMD_IQID(x) ((x) << 0)
776 #define FW_EQ_ETH_CMD_DCAEN(x) ((x) << 31)
777 #define FW_EQ_ETH_CMD_DCACPU(x) ((x) << 26)
778 #define FW_EQ_ETH_CMD_FBMIN(x) ((x) << 23)
779 #define FW_EQ_ETH_CMD_FBMAX(x) ((x) << 20)
780 #define FW_EQ_ETH_CMD_CIDXFTHRESHO(x) ((x) << 19)
781 #define FW_EQ_ETH_CMD_CIDXFTHRESH(x) ((x) << 16)
782 #define FW_EQ_ETH_CMD_EQSIZE(x) ((x) << 0)
784 #define FW_EQ_ETH_CMD_VIID(x) ((x) << 16)
796 #define FW_EQ_CTRL_CMD_PFN(x) ((x) << 8)
797 #define FW_EQ_CTRL_CMD_VFN(x) ((x) << 0)
799 #define FW_EQ_CTRL_CMD_ALLOC (1U << 31)
800 #define FW_EQ_CTRL_CMD_FREE (1U << 30)
801 #define FW_EQ_CTRL_CMD_MODIFY (1U << 29)
802 #define FW_EQ_CTRL_CMD_EQSTART (1U << 28)
803 #define FW_EQ_CTRL_CMD_EQSTOP (1U << 27)
805 #define FW_EQ_CTRL_CMD_CMPLIQID(x) ((x) << 20)
806 #define FW_EQ_CTRL_CMD_EQID(x) ((x) << 0)
807 #define FW_EQ_CTRL_CMD_EQID_GET(x) (((x) >> 0) & 0xfffff)
808 #define FW_EQ_CTRL_CMD_PHYSEQID_GET(x) (((x) >> 0) & 0xfffff)
810 #define FW_EQ_CTRL_CMD_FETCHSZM (1U << 26)
811 #define FW_EQ_CTRL_CMD_STATUSPGNS (1U << 25)
812 #define FW_EQ_CTRL_CMD_STATUSPGRO (1U << 24)
813 #define FW_EQ_CTRL_CMD_FETCHNS (1U << 23)
814 #define FW_EQ_CTRL_CMD_FETCHRO (1U << 22)
815 #define FW_EQ_CTRL_CMD_HOSTFCMODE(x) ((x) << 20)
816 #define FW_EQ_CTRL_CMD_CPRIO(x) ((x) << 19)
817 #define FW_EQ_CTRL_CMD_ONCHIP(x) ((x) << 18)
818 #define FW_EQ_CTRL_CMD_PCIECHN(x) ((x) << 16)
819 #define FW_EQ_CTRL_CMD_IQID(x) ((x) << 0)
821 #define FW_EQ_CTRL_CMD_DCAEN(x) ((x) << 31)
822 #define FW_EQ_CTRL_CMD_DCACPU(x) ((x) << 26)
823 #define FW_EQ_CTRL_CMD_FBMIN(x) ((x) << 23)
824 #define FW_EQ_CTRL_CMD_FBMAX(x) ((x) << 20)
825 #define FW_EQ_CTRL_CMD_CIDXFTHRESHO(x) ((x) << 19)
826 #define FW_EQ_CTRL_CMD_CIDXFTHRESH(x) ((x) << 16)
827 #define FW_EQ_CTRL_CMD_EQSIZE(x) ((x) << 0)
839 #define FW_EQ_OFLD_CMD_PFN(x) ((x) << 8)
840 #define FW_EQ_OFLD_CMD_VFN(x) ((x) << 0)
842 #define FW_EQ_OFLD_CMD_ALLOC (1U << 31)
843 #define FW_EQ_OFLD_CMD_FREE (1U << 30)
844 #define FW_EQ_OFLD_CMD_MODIFY (1U << 29)
845 #define FW_EQ_OFLD_CMD_EQSTART (1U << 28)
846 #define FW_EQ_OFLD_CMD_EQSTOP (1U << 27)
848 #define FW_EQ_OFLD_CMD_EQID(x) ((x) << 0)
849 #define FW_EQ_OFLD_CMD_EQID_GET(x) (((x) >> 0) & 0xfffff)
850 #define FW_EQ_OFLD_CMD_PHYSEQID_GET(x) (((x) >> 0) & 0xfffff)
852 #define FW_EQ_OFLD_CMD_FETCHSZM(x) ((x) << 26)
853 #define FW_EQ_OFLD_CMD_STATUSPGNS(x) ((x) << 25)
854 #define FW_EQ_OFLD_CMD_STATUSPGRO(x) ((x) << 24)
855 #define FW_EQ_OFLD_CMD_FETCHNS(x) ((x) << 23)
856 #define FW_EQ_OFLD_CMD_FETCHRO(x) ((x) << 22)
857 #define FW_EQ_OFLD_CMD_HOSTFCMODE(x) ((x) << 20)
858 #define FW_EQ_OFLD_CMD_CPRIO(x) ((x) << 19)
859 #define FW_EQ_OFLD_CMD_ONCHIP(x) ((x) << 18)
860 #define FW_EQ_OFLD_CMD_PCIECHN(x) ((x) << 16)
861 #define FW_EQ_OFLD_CMD_IQID(x) ((x) << 0)
863 #define FW_EQ_OFLD_CMD_DCAEN(x) ((x) << 31)
864 #define FW_EQ_OFLD_CMD_DCACPU(x) ((x) << 26)
865 #define FW_EQ_OFLD_CMD_FBMIN(x) ((x) << 23)
866 #define FW_EQ_OFLD_CMD_FBMAX(x) ((x) << 20)
867 #define FW_EQ_OFLD_CMD_CIDXFTHRESHO(x) ((x) << 19)
868 #define FW_EQ_OFLD_CMD_CIDXFTHRESH(x) ((x) << 16)
869 #define FW_EQ_OFLD_CMD_EQSIZE(x) ((x) << 0)
875 #define FW_VIID_PFN_GET(x) (((x) >> 8) & 0x7)
876 #define FW_VIID_VIVLD_GET(x) (((x) >> 7) & 0x1)
877 #define FW_VIID_VIN_GET(x) (((x) >> 0) & 0x7F)
897 #define FW_VI_CMD_PFN(x) ((x) << 8)
898 #define FW_VI_CMD_VFN(x) ((x) << 0)
899 #define FW_VI_CMD_ALLOC (1U << 31)
900 #define FW_VI_CMD_FREE (1U << 30)
901 #define FW_VI_CMD_VIID(x) ((x) << 0)
902 #define FW_VI_CMD_VIID_GET(x) ((x) & 0xfff)
903 #define FW_VI_CMD_PORTID(x) ((x) << 4)
904 #define FW_VI_CMD_PORTID_GET(x) (((x) >> 4) & 0xf)
905 #define FW_VI_CMD_RSSSIZE_GET(x) (((x) >> 0) & 0x7ff)
908 #define FW_VI_MAC_ADD_MAC 0x3FF
909 #define FW_VI_MAC_ADD_PERSIST_MAC 0x3FE
910 #define FW_VI_MAC_MAC_BASED_FREE 0x3FD
911 #define FW_CLS_TCAM_NUM_ENTRIES 336
941 #define FW_VI_MAC_CMD_VIID(x) ((x) << 0)
942 #define FW_VI_MAC_CMD_FREEMACS(x) ((x) << 31)
943 #define FW_VI_MAC_CMD_HASHVECEN (1U << 23)
944 #define FW_VI_MAC_CMD_HASHUNIEN(x) ((x) << 22)
945 #define FW_VI_MAC_CMD_VALID (1U << 15)
946 #define FW_VI_MAC_CMD_PRIO(x) ((x) << 12)
947 #define FW_VI_MAC_CMD_SMAC_RESULT(x) ((x) << 10)
948 #define FW_VI_MAC_CMD_SMAC_RESULT_GET(x) (((x) >> 10) & 0x3)
949 #define FW_VI_MAC_CMD_IDX(x) ((x) << 0)
950 #define FW_VI_MAC_CMD_IDX_GET(x) (((x) >> 0) & 0x3ff)
952 #define FW_RXMODE_MTU_NO_CHG 65535
961 #define FW_VI_RXMODE_CMD_VIID(x) ((x) << 0)
962 #define FW_VI_RXMODE_CMD_MTU_MASK 0xffff
963 #define FW_VI_RXMODE_CMD_MTU(x) ((x) << 16)
964 #define FW_VI_RXMODE_CMD_PROMISCEN_MASK 0x3
965 #define FW_VI_RXMODE_CMD_PROMISCEN(x) ((x) << 14)
966 #define FW_VI_RXMODE_CMD_ALLMULTIEN_MASK 0x3
967 #define FW_VI_RXMODE_CMD_ALLMULTIEN(x) ((x) << 12)
968 #define FW_VI_RXMODE_CMD_BROADCASTEN_MASK 0x3
969 #define FW_VI_RXMODE_CMD_BROADCASTEN(x) ((x) << 10)
970 #define FW_VI_RXMODE_CMD_VLANEXEN_MASK 0x3
971 #define FW_VI_RXMODE_CMD_VLANEXEN(x) ((x) << 8)
981 #define FW_VI_ENABLE_CMD_VIID(x) ((x) << 0)
982 #define FW_VI_ENABLE_CMD_IEN(x) ((x) << 31)
983 #define FW_VI_ENABLE_CMD_EEN(x) ((x) << 30)
984 #define FW_VI_ENABLE_CMD_LED (1U << 29)
987 #define VI_VF_NUM_STATS 16
1008 #define VI_PF_NUM_STATS 17
1084 #define FW_VI_STATS_CMD_VIID(x) ((x) << 0)
1085 #define FW_VI_STATS_CMD_NSTATS(x) ((x) << 12)
1086 #define FW_VI_STATS_CMD_IX(x) ((x) << 0)
1103 #define FW_ACL_MAC_CMD_PFN(x) ((x) << 8)
1104 #define FW_ACL_MAC_CMD_VFN(x) ((x) << 0)
1105 #define FW_ACL_MAC_CMD_EN(x) ((x) << 31)
1116 #define FW_ACL_VLAN_CMD_PFN(x) ((x) << 8)
1117 #define FW_ACL_VLAN_CMD_VFN(x) ((x) << 0)
1118 #define FW_ACL_VLAN_CMD_EN(x) ((x) << 31)
1119 #define FW_ACL_VLAN_CMD_DROPNOVLAN(x) ((x) << 7)
1120 #define FW_ACL_VLAN_CMD_FM(x) ((x) << 6)
1148 #define FW_PORT_MDI(x) ((x) << 9)
1242 #define FW_PORT_CMD_READ (1U << 22)
1244 #define FW_PORT_CMD_PORTID(x) ((x) << 0)
1245 #define FW_PORT_CMD_PORTID_GET(x) (((x) >> 0) & 0xf)
1247 #define FW_PORT_CMD_ACTION(x) ((x) << 16)
1248 #define FW_PORT_CMD_ACTION_GET(x) (((x) >> 16) & 0xffff)
1250 #define FW_PORT_CMD_CTLBF(x) ((x) << 10)
1251 #define FW_PORT_CMD_OVLAN3(x) ((x) << 7)
1252 #define FW_PORT_CMD_OVLAN2(x) ((x) << 6)
1253 #define FW_PORT_CMD_OVLAN1(x) ((x) << 5)
1254 #define FW_PORT_CMD_OVLAN0(x) ((x) << 4)
1255 #define FW_PORT_CMD_IVLAN0(x) ((x) << 3)
1257 #define FW_PORT_CMD_TXIPG(x) ((x) << 19)
1259 #define FW_PORT_CMD_LSTATUS (1U << 31)
1260 #define FW_PORT_CMD_LSPEED(x) ((x) << 24)
1261 #define FW_PORT_CMD_LSPEED_GET(x) (((x) >> 24) & 0x3f)
1262 #define FW_PORT_CMD_TXPAUSE (1U << 23)
1263 #define FW_PORT_CMD_RXPAUSE (1U << 22)
1264 #define FW_PORT_CMD_MDIOCAP (1U << 21)
1265 #define FW_PORT_CMD_MDIOADDR_GET(x) (((x) >> 16) & 0x1f)
1266 #define FW_PORT_CMD_LPTXPAUSE (1U << 15)
1267 #define FW_PORT_CMD_LPRXPAUSE (1U << 14)
1268 #define FW_PORT_CMD_PTYPE_MASK 0x1f
1269 #define FW_PORT_CMD_PTYPE_GET(x) (((x) >> 8) & FW_PORT_CMD_PTYPE_MASK)
1270 #define FW_PORT_CMD_MODTYPE_MASK 0x1f
1271 #define FW_PORT_CMD_MODTYPE_GET(x) (((x) >> 0) & FW_PORT_CMD_MODTYPE_MASK)
1273 #define FW_PORT_CMD_PPPEN(x) ((x) << 31)
1274 #define FW_PORT_CMD_TPSRC(x) ((x) << 28)
1275 #define FW_PORT_CMD_NCSISRC(x) ((x) << 24)
1277 #define FW_PORT_CMD_CH0(x) ((x) << 20)
1278 #define FW_PORT_CMD_CH1(x) ((x) << 16)
1279 #define FW_PORT_CMD_CH2(x) ((x) << 12)
1280 #define FW_PORT_CMD_CH3(x) ((x) << 8)
1281 #define FW_PORT_CMD_NCSICH(x) ((x) << 4)
1313 #define FW_NUM_PORT_STATS 50
1314 #define FW_NUM_PORT_TX_STATS 23
1315 #define FW_NUM_PORT_RX_STATS 27
1446 #define FW_PORT_STATS_CMD_NSTATS(x) ((x) << 4)
1447 #define FW_PORT_STATS_CMD_BG_BM(x) ((x) << 0)
1448 #define FW_PORT_STATS_CMD_TX(x) ((x) << 7)
1449 #define FW_PORT_STATS_CMD_IX(x) ((x) << 0)
1452 #define FW_NUM_LB_STATS 16
1506 #define FW_PORT_LB_STATS_CMD_LBPORT(x) ((x) << 0)
1507 #define FW_PORT_LB_STATS_CMD_NSTATS(x) ((x) << 4)
1508 #define FW_PORT_LB_STATS_CMD_BG_BM(x) ((x) << 0)
1509 #define FW_PORT_LB_STATS_CMD_IX(x) ((x) << 0)
1513 #define FW_RSS_IND_TBL_CMD_VIID(x) ((x) << 0)
1519 #define FW_RSS_IND_TBL_CMD_IQ0(x) ((x) << 20)
1520 #define FW_RSS_IND_TBL_CMD_IQ1(x) ((x) << 10)
1521 #define FW_RSS_IND_TBL_CMD_IQ2(x) ((x) << 0)
1548 #define FW_RSS_GLB_CONFIG_CMD_SYNMAPEN (1U << 8)
1549 #define FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV6 (1U << 7)
1550 #define FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV6 (1U << 6)
1551 #define FW_RSS_GLB_CONFIG_CMD_SYN4TUPENIPV4 (1U << 5)
1552 #define FW_RSS_GLB_CONFIG_CMD_SYN2TUPENIPV4 (1U << 4)
1553 #define FW_RSS_GLB_CONFIG_CMD_OFDMAPEN (1U << 3)
1554 #define FW_RSS_GLB_CONFIG_CMD_TNLMAPEN (1U << 2)
1555 #define FW_RSS_GLB_CONFIG_CMD_TNLALLLKP (1U << 1)
1556 #define FW_RSS_GLB_CONFIG_CMD_HASHTOEPLITZ (1U << 0)
1563 #define FW_RSS_GLB_CONFIG_CMD_MODE(x) ((x) << 28)
1564 #define FW_RSS_GLB_CONFIG_CMD_MODE_GET(x) (((x) >> 28) & 0xf)
1566 #define FW_RSS_GLB_CONFIG_CMD_MODE_MANUAL 0
1567 #define FW_RSS_GLB_CONFIG_CMD_MODE_BASICVIRTUAL 1
1571 #define FW_RSS_VI_CONFIG_CMD_VIID(x) ((x) << 0)
1582 #define FW_RSS_VI_CONFIG_CMD_DEFAULTQ(x) ((x) << 16)
1583 #define FW_RSS_VI_CONFIG_CMD_DEFAULTQ_GET(x) (((x) >> 16) & 0x3ff)
1584 #define FW_RSS_VI_CONFIG_CMD_IP6FOURTUPEN (1U << 4)
1585 #define FW_RSS_VI_CONFIG_CMD_IP6TWOTUPEN (1U << 3)
1586 #define FW_RSS_VI_CONFIG_CMD_IP4FOURTUPEN (1U << 2)
1587 #define FW_RSS_VI_CONFIG_CMD_IP4TWOTUPEN (1U << 1)
1588 #define FW_RSS_VI_CONFIG_CMD_UDPEN (1U << 0)
1632 #define FW_DEBUG_CMD_TYPE_GET(x) ((x) & 0xff)
1655 #define FW_PCIE_FW_ERR (1U << 31)
1656 #define FW_PCIE_FW_INIT (1U << 30)
1657 #define FW_PCIE_FW_HALT (1U << 29)
1658 #define FW_PCIE_FW_MASTER_VLD (1U << 15)
1659 #define FW_PCIE_FW_MASTER_MASK 0x7
1660 #define FW_PCIE_FW_MASTER_SHIFT 12
1661 #define FW_PCIE_FW_MASTER(x) ((x) << FW_PCIE_FW_MASTER_SHIFT)
1662 #define FW_PCIE_FW_MASTER_GET(x) (((x) >> FW_PCIE_FW_MASTER_SHIFT) & \
1663 FW_PCIE_FW_MASTER_MASK)
1686 #define FW_HDR_FW_VER_MAJOR_GET(x) (((x) >> 24) & 0xff)
1687 #define FW_HDR_FW_VER_MINOR_GET(x) (((x) >> 16) & 0xff)
1688 #define FW_HDR_FW_VER_MICRO_GET(x) (((x) >> 8) & 0xff)
1689 #define FW_HDR_FW_VER_BUILD_GET(x) (((x) >> 0) & 0xff)