Lines Matching +full:mbox +full:- +full:dir
1 /* SPDX-License-Identifier: GPL-2.0 */
39 #define INTR_MASK(pfvfs) ((pfvfs < 64) ? (BIT_ULL(pfvfs) - 1) : (~0ull))
41 #define MBOX_RSP_TIMEOUT 6000 /* Time(ms) to wait for mbox response */
43 #define MBOX_MSG_ALIGN 16 /* Align mbox msg start to 16bytes */
61 void *mbase; /* This dev's mbox region */
72 void *hwbase; /* Mbox region advertised by HW */
74 u64 trigger; /* Trigger mbox notification */
75 u16 tr_shift; /* Mbox trigger shift */
76 u64 rx_start; /* Offset of Rx region in mbox memory */
77 u64 tx_start; /* Offset of Tx region in mbox memory */
84 /* Header which precedes all mbox messages */
95 u16 id; /* Mbox message ID */
105 void otx2_mbox_reset(struct otx2_mbox *mbox, int devid);
106 void __otx2_mbox_reset(struct otx2_mbox *mbox, int devid);
107 void otx2_mbox_destroy(struct otx2_mbox *mbox);
108 int otx2_mbox_init(struct otx2_mbox *mbox, void __force *hwbase,
112 int otx2_mbox_regions_init(struct otx2_mbox *mbox, void __force **hwbase,
115 void otx2_mbox_msg_send(struct otx2_mbox *mbox, int devid);
116 void otx2_mbox_msg_send_up(struct otx2_mbox *mbox, int devid);
117 int otx2_mbox_wait_for_rsp(struct otx2_mbox *mbox, int devid);
118 int otx2_mbox_busy_poll_for_rsp(struct otx2_mbox *mbox, int devid);
119 struct mbox_msghdr *otx2_mbox_alloc_msg_rsp(struct otx2_mbox *mbox, int devid,
121 struct mbox_msghdr *otx2_mbox_get_rsp(struct otx2_mbox *mbox, int devid,
123 int otx2_mbox_check_rsp_msgs(struct otx2_mbox *mbox, int devid);
124 int otx2_reply_invalid_msg(struct otx2_mbox *mbox, int devid,
126 bool otx2_mbox_nonempty(struct otx2_mbox *mbox, int devid);
128 static inline struct mbox_msghdr *otx2_mbox_alloc_msg(struct otx2_mbox *mbox, in otx2_mbox_alloc_msg() argument
131 return otx2_mbox_alloc_msg_rsp(mbox, devid, size, 0); in otx2_mbox_alloc_msg()
134 bool otx2_mbox_wait_for_zero(struct otx2_mbox *mbox, int devid);
142 /* Generic mbox IDs (range 0x000 - 0x1FF) */ \
159 /* CGX mbox IDs (range 0x200 - 0x3FF) */ \
200 /* NPA mbox IDs (range 0x400 - 0x5FF) */ \
206 /* SSO/SSOW mbox IDs (range 0x600 - 0x7FF) */ \
207 /* TIM mbox IDs (range 0x800 - 0x9FF) */ \
208 /* CPT mbox IDs (range 0xA00 - 0xBFF) */ \
223 /* SDP mbox IDs (range 0x1000 - 0x11FF) */ \
226 /* NPC mbox IDs (range 0x6000 - 0x7FFF) */ \
276 /* NIX mbox IDs (range 0x8000 - 0xFFFF) */ \
339 /* MCS mbox IDs (range 0xA000 - 0xBFFF) */ \
390 /* Messages initiated by AF (range 0xC00 - 0xEFF) */
417 /* Generic request msg used for those mbox messages which
424 /* Generic response msg used an ack or response for those mbox
432 * Range 256 - 300.
435 RVU_INVALID_VF_ID = -256,
453 * attach->cptlfs = 3; <3 LFs from CPT0>
456 * attach->modify = 1;
457 * attach->cpt_blkaddr = BLKADDR_CPT1;
458 * attach->cptlfs = 2; <2 LFs from CPT1>
540 /* CGX mbox message formats */
752 /* NPA mbox message formats */
761 u8 dir; member
770 /* NPA mbox message formats */
773 * Range 301 - 400.
776 NPA_AF_ERR_PARAM = -301,
777 NPA_AF_ERR_AQ_FULL = -302,
778 NPA_AF_ERR_AQ_ENQUEUE = -303,
779 NPA_AF_ERR_AF_LF_INVALID = -304,
780 NPA_AF_ERR_AF_LF_ALLOC = -305,
781 NPA_AF_ERR_LF_RESET = -306,
841 /* NIX mbox message formats */
844 * Range 401 - 500.
847 NIX_AF_ERR_PARAM = -401,
848 NIX_AF_ERR_AQ_FULL = -402,
849 NIX_AF_ERR_AQ_ENQUEUE = -403,
850 NIX_AF_ERR_AF_LF_INVALID = -404,
851 NIX_AF_ERR_AF_LF_ALLOC = -405,
852 NIX_AF_ERR_TLX_ALLOC_FAIL = -406,
853 NIX_AF_ERR_TLX_INVALID = -407,
854 NIX_AF_ERR_RSS_SIZE_INVALID = -408,
855 NIX_AF_ERR_RSS_GRPS_INVALID = -409,
856 NIX_AF_ERR_FRS_INVALID = -410,
857 NIX_AF_ERR_RX_LINK_INVALID = -411,
858 NIX_AF_INVAL_TXSCHQ_CFG = -412,
859 NIX_AF_SMQ_FLUSH_FAILED = -413,
860 NIX_AF_ERR_LF_RESET = -414,
861 NIX_AF_ERR_RSS_NOSPC_FIELD = -415,
862 NIX_AF_ERR_RSS_NOSPC_ALGO = -416,
863 NIX_AF_ERR_MARK_CFG_FAIL = -417,
864 NIX_AF_ERR_LSO_CFG_FAIL = -418,
865 NIX_AF_INVAL_NPA_PF_FUNC = -419,
866 NIX_AF_INVAL_SSO_PF_FUNC = -420,
867 NIX_AF_ERR_TX_VTAG_NOSPC = -421,
868 NIX_AF_ERR_RX_VTAG_INUSE = -422,
869 NIX_AF_ERR_PTP_CONFIG_FAIL = -423,
870 NIX_AF_ERR_NPC_KEY_NOT_SUPP = -424,
871 NIX_AF_ERR_INVALID_NIXBLK = -425,
872 NIX_AF_ERR_INVALID_BANDPROF = -426,
873 NIX_AF_ERR_IPOLICER_NOTSUPP = -427,
874 NIX_AF_ERR_BANDPROF_INVAL_REQ = -428,
875 NIX_AF_ERR_CQ_CTX_WRITE_ERR = -429,
876 NIX_AF_ERR_AQ_CTX_RETRY_WRITE = -430,
877 NIX_AF_ERR_LINK_CREDITS = -431,
878 NIX_AF_ERR_INVALID_BPID = -434,
879 NIX_AF_ERR_INVALID_BPID_REQ = -435,
880 NIX_AF_ERR_INVALID_MCAST_GRP = -436,
881 NIX_AF_ERR_INVALID_MCAST_DEL_REQ = -437,
882 NIX_AF_ERR_NON_CONTIG_MCE_LIST = -438,
1023 u16 schq[NIX_TXSCH_LVL_CNT]; /* No of non-contiguous queues */
1054 #define TXSCHQ_IDX_MASK (BIT_ULL(10) - 1)
1129 * when nix_vtag_config mbox requested for vtag0 and/
1260 u8 dir; member
1428 /* NPC mbox message structs */
1434 * Range 701 - 800.
1437 NPC_MCAM_INVALID_REQ = -701,
1438 NPC_MCAM_ALLOC_DENIED = -702,
1439 NPC_MCAM_ALLOC_FAILED = -703,
1440 NPC_MCAM_PERM_DENIED = -704,
1441 NPC_FLOW_INTF_INVALID = -707,
1442 NPC_FLOW_CHAN_INVALID = -708,
1443 NPC_FLOW_NO_NIXLF = -709,
1444 NPC_FLOW_NOT_SUPPORTED = -710,
1445 NPC_FLOW_VF_PERM_DENIED = -711,
1446 NPC_FLOW_VF_NOT_INIT = -712,
1447 NPC_FLOW_VF_OVERLAP = -713,
1465 * Invalid incase of non-contiguous.
1525 * Invalid incase of non-contiguous.
1825 * Range 901 - 1000.
1828 CPT_AF_ERR_PARAM = -901,
1829 CPT_AF_ERR_GRP_INVALID = -902,
1830 CPT_AF_ERR_LF_INVALID = -903,
1831 CPT_AF_ERR_ACCESS_DENIED = -904,
1832 CPT_AF_ERR_SSO_PF_FUNC_INVALID = -905,
1833 CPT_AF_ERR_NIX_PF_FUNC_INVALID = -906,
1834 CPT_AF_ERR_INLINE_IPSEC_INB_ENA = -907,
1835 CPT_AF_ERR_INLINE_IPSEC_OUT_ENA = -908
1838 /* CPT mbox message formats */
1868 u8 dir; member
1984 * Range 1101 - 1200.
1987 LMAC_AF_ERR_INVALID_PARAM = -1101,
1988 LMAC_AF_ERR_PF_NOT_MAPPED = -1102,
1989 LMAC_AF_ERR_PERM_DENIED = -1103,
1990 LMAC_AF_ERR_PFC_ENADIS_PERM_DENIED = -1104,
1991 LMAC_AF_ERR_8023PAUSE_ENADIS_PERM_DENIED = -1105,
1992 LMAC_AF_ERR_CMD_TIMEOUT = -1106,
1993 LMAC_AF_ERR_FIRMWARE_DATA_NOT_MAPPED = -1107,
1994 LMAC_AF_ERR_EXACT_MATCH_TBL_ADD_FAILED = -1108,
1995 LMAC_AF_ERR_EXACT_MATCH_TBL_DEL_FAILED = -1109,
1996 LMAC_AF_ERR_EXACT_MATCH_TBL_LOOK_UP_FAILED = -1110,
2016 u8 dir; /* Macsec ingress or egress side */ member
2030 u8 dir; member
2040 u8 dir; member
2049 u64 sci; /* CNF10K-B for tx_secy_mem_map */
2052 u8 sc_id; /* Valid if dir = MCS_TX, SC_CAM id mapped to flowid */
2056 u8 dir; member
2065 u8 dir; member
2085 u8 dir; member
2108 u8 an; /* value range 0-3, sc_id + an used as index SA_MEM_MAP */
2118 u8 dir; member
2127 u8 dir; member
2197 u8 dir; member
2207 u8 dir; member
2212 * Range 1201 - 1300.
2215 MCS_AF_ERR_INVALID_MCSID = -1201,
2216 MCS_AF_ERR_NOT_MAPPED = -1202,
2224 u8 dir; member
2240 u8 dir; /* Macsec ingress or egress side */ member
2249 u8 dir; member
2258 u8 dir; member
2271 u8 dir; member
2279 u8 dir; member
2308 u64 pkt_ctl_cnt; /* CN10K-B */
2309 u64 pkt_notag_cnt; /* CNF10K-B */
2323 u64 preempt_err_cnt; /* CNF10K-B */
2328 /* Only for CN10K-B */
2351 u64 pkt_delay_cnt; /* CNF10K-B */
2352 u64 pkt_ok_cnt; /* CNF10K-B */
2353 u64 octet_decrypt_cnt; /* CN10K-B */
2354 u64 octet_validate_cnt; /* CN10K-B */
2358 u64 octet_encrypt_cnt; /* CN10K-B */
2359 u64 octet_protected_cnt; /* CN10K-B */
2373 u8 dir; member