18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/* Copyright (c) 2018, Intel Corporation. */
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#ifndef _ICE_SRIOV_H_
58c2ecf20Sopenharmony_ci#define _ICE_SRIOV_H_
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#include "ice_common.h"
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#ifdef CONFIG_PCI_IOV
108c2ecf20Sopenharmony_cienum ice_status
118c2ecf20Sopenharmony_ciice_aq_send_msg_to_vf(struct ice_hw *hw, u16 vfid, u32 v_opcode, u32 v_retval,
128c2ecf20Sopenharmony_ci		      u8 *msg, u16 msglen, struct ice_sq_cd *cd);
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciu32 ice_conv_link_speed_to_virtchnl(bool adv_link_support, u16 link_speed);
158c2ecf20Sopenharmony_ci#else /* CONFIG_PCI_IOV */
168c2ecf20Sopenharmony_cistatic inline enum ice_status
178c2ecf20Sopenharmony_ciice_aq_send_msg_to_vf(struct ice_hw __always_unused *hw,
188c2ecf20Sopenharmony_ci		      u16 __always_unused vfid, u32 __always_unused v_opcode,
198c2ecf20Sopenharmony_ci		      u32 __always_unused v_retval, u8 __always_unused *msg,
208c2ecf20Sopenharmony_ci		      u16 __always_unused msglen,
218c2ecf20Sopenharmony_ci		      struct ice_sq_cd __always_unused *cd)
228c2ecf20Sopenharmony_ci{
238c2ecf20Sopenharmony_ci	return 0;
248c2ecf20Sopenharmony_ci}
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_cistatic inline u32
278c2ecf20Sopenharmony_ciice_conv_link_speed_to_virtchnl(bool __always_unused adv_link_support,
288c2ecf20Sopenharmony_ci				u16 __always_unused link_speed)
298c2ecf20Sopenharmony_ci{
308c2ecf20Sopenharmony_ci	return 0;
318c2ecf20Sopenharmony_ci}
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#endif /* CONFIG_PCI_IOV */
348c2ecf20Sopenharmony_ci#endif /* _ICE_SRIOV_H_ */
35