Linux Audio

Check our new training course

Linux debugging, profiling, tracing and performance analysis training

Apr 14-17, 2025
Register
Loading...
v6.13.7
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/* Copyright (c) 2018, Intel Corporation. */
 3
 4#ifndef _ICE_VF_MBX_H_
 5#define _ICE_VF_MBX_H_
 6
 7#include "ice_type.h"
 8#include "ice_controlq.h"
 9
10/* Defining the mailbox message threshold as 63 asynchronous
11 * pending messages. Normal VF functionality does not require
12 * sending more than 63 asynchronous pending message.
13 */
14#define ICE_ASYNC_VF_MSG_THRESHOLD	63
15
16#ifdef CONFIG_PCI_IOV
17int
18ice_aq_send_msg_to_vf(struct ice_hw *hw, u16 vfid, u32 v_opcode, u32 v_retval,
19		      u8 *msg, u16 msglen, struct ice_sq_cd *cd);
20
21u32 ice_conv_link_speed_to_virtchnl(bool adv_link_support, u16 link_speed);
22void ice_mbx_vf_dec_trig_e830(const struct ice_hw *hw,
23			      const struct ice_rq_event_info *event);
24void ice_mbx_vf_clear_cnt_e830(const struct ice_hw *hw, u16 vf_id);
25int
26ice_mbx_vf_state_handler(struct ice_hw *hw, struct ice_mbx_data *mbx_data,
27			 struct ice_mbx_vf_info *vf_info, bool *report_malvf);
28void ice_mbx_clear_malvf(struct ice_mbx_vf_info *vf_info);
29void ice_mbx_init_vf_info(struct ice_hw *hw, struct ice_mbx_vf_info *vf_info);
30void ice_mbx_init_snapshot(struct ice_hw *hw);
31#else /* CONFIG_PCI_IOV */
32static inline int
33ice_aq_send_msg_to_vf(struct ice_hw __always_unused *hw,
34		      u16 __always_unused vfid, u32 __always_unused v_opcode,
35		      u32 __always_unused v_retval, u8 __always_unused *msg,
36		      u16 __always_unused msglen,
37		      struct ice_sq_cd __always_unused *cd)
38{
39	return 0;
40}
41
42static inline u32
43ice_conv_link_speed_to_virtchnl(bool __always_unused adv_link_support,
44				u16 __always_unused link_speed)
45{
46	return 0;
47}
48
49static inline void ice_mbx_init_snapshot(struct ice_hw *hw)
50{
51}
52
53static inline void
54ice_mbx_vf_dec_trig_e830(const struct ice_hw *hw,
55			 const struct ice_rq_event_info *event)
56{
57}
58
59#endif /* CONFIG_PCI_IOV */
60#endif /* _ICE_VF_MBX_H_ */
v6.8
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/* Copyright (c) 2018, Intel Corporation. */
 3
 4#ifndef _ICE_VF_MBX_H_
 5#define _ICE_VF_MBX_H_
 6
 7#include "ice_type.h"
 8#include "ice_controlq.h"
 9
10/* Defining the mailbox message threshold as 63 asynchronous
11 * pending messages. Normal VF functionality does not require
12 * sending more than 63 asynchronous pending message.
13 */
14#define ICE_ASYNC_VF_MSG_THRESHOLD	63
15
16#ifdef CONFIG_PCI_IOV
17int
18ice_aq_send_msg_to_vf(struct ice_hw *hw, u16 vfid, u32 v_opcode, u32 v_retval,
19		      u8 *msg, u16 msglen, struct ice_sq_cd *cd);
20
21u32 ice_conv_link_speed_to_virtchnl(bool adv_link_support, u16 link_speed);
 
 
 
22int
23ice_mbx_vf_state_handler(struct ice_hw *hw, struct ice_mbx_data *mbx_data,
24			 struct ice_mbx_vf_info *vf_info, bool *report_malvf);
25void ice_mbx_clear_malvf(struct ice_mbx_vf_info *vf_info);
26void ice_mbx_init_vf_info(struct ice_hw *hw, struct ice_mbx_vf_info *vf_info);
27void ice_mbx_init_snapshot(struct ice_hw *hw);
28#else /* CONFIG_PCI_IOV */
29static inline int
30ice_aq_send_msg_to_vf(struct ice_hw __always_unused *hw,
31		      u16 __always_unused vfid, u32 __always_unused v_opcode,
32		      u32 __always_unused v_retval, u8 __always_unused *msg,
33		      u16 __always_unused msglen,
34		      struct ice_sq_cd __always_unused *cd)
35{
36	return 0;
37}
38
39static inline u32
40ice_conv_link_speed_to_virtchnl(bool __always_unused adv_link_support,
41				u16 __always_unused link_speed)
42{
43	return 0;
44}
45
46static inline void ice_mbx_init_snapshot(struct ice_hw *hw)
 
 
 
 
 
 
47{
48}
49
50#endif /* CONFIG_PCI_IOV */
51#endif /* _ICE_VF_MBX_H_ */