ixgbe: Switch if_sriov read/write back to ixgbe_mbx APIs

These are more succinct than jumping through the function pointers
directly and add some additional error handling.

(cherry picked from commit 1e3b1870ad2a426de6e3f5445211b698f20f7f1f)
This commit is contained in:
Kevin Bowling 2024-09-28 21:15:53 -07:00
parent a67cc4b031
commit 941833b9bb

View file

@ -100,7 +100,7 @@ ixgbe_send_vf_msg(struct ixgbe_hw *hw, struct ixgbe_vf *vf, u32 msg)
if (vf->flags & IXGBE_VF_CTS)
msg |= IXGBE_VT_MSGTYPE_CTS;
hw->mbx.ops[vf->pool].write(hw, &msg, 1, vf->pool);
ixgbe_write_mbx(hw, &msg, 1, vf->pool);
}
static inline void
@ -595,8 +595,7 @@ ixgbe_process_vf_msg(if_ctx_t ctx, struct ixgbe_vf *vf)
hw = &sc->hw;
error = hw->mbx.ops[vf->pool].read(hw, msg, IXGBE_VFMAILBOX_SIZE,
vf->pool);
error = ixgbe_read_mbx(hw, msg, IXGBE_VFMAILBOX_SIZE, vf->pool);
if (error != 0)
return;