ice_sriov.h 936 B

12345678910111213141516171819202122232425262728293031323334
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright (c) 2018, Intel Corporation. */
  3. #ifndef _ICE_SRIOV_H_
  4. #define _ICE_SRIOV_H_
  5. #include "ice_common.h"
  6. #ifdef CONFIG_PCI_IOV
  7. enum ice_status
  8. ice_aq_send_msg_to_vf(struct ice_hw *hw, u16 vfid, u32 v_opcode, u32 v_retval,
  9. u8 *msg, u16 msglen, struct ice_sq_cd *cd);
  10. u32 ice_conv_link_speed_to_virtchnl(bool adv_link_support, u16 link_speed);
  11. #else /* CONFIG_PCI_IOV */
  12. static inline enum ice_status
  13. ice_aq_send_msg_to_vf(struct ice_hw __always_unused *hw,
  14. u16 __always_unused vfid, u32 __always_unused v_opcode,
  15. u32 __always_unused v_retval, u8 __always_unused *msg,
  16. u16 __always_unused msglen,
  17. struct ice_sq_cd __always_unused *cd)
  18. {
  19. return 0;
  20. }
  21. static inline u32
  22. ice_conv_link_speed_to_virtchnl(bool __always_unused adv_link_support,
  23. u16 __always_unused link_speed)
  24. {
  25. return 0;
  26. }
  27. #endif /* CONFIG_PCI_IOV */
  28. #endif /* _ICE_SRIOV_H_ */