42 while (countdown && mbx->
ops.check_for_msg(hw)) {
60 static s32 ixgbevf_poll_for_ack(
struct ixgbe_hw *hw)
65 while (countdown && mbx->
ops.check_for_ack(hw)) {
94 ret_val = ixgbevf_poll_for_msg(hw);
98 ret_val = mbx->
ops.read(hw, msg, size);
122 ret_val = mbx->
ops.write(hw, msg, size);
126 ret_val = ixgbevf_poll_for_ack(hw);
138 static u32 ixgbevf_read_v2p_mailbox(
struct ixgbe_hw *hw)
142 v2p_mailbox |= hw->
mbx.v2p_mailbox;
161 if (v2p_mailbox & mask)
164 hw->
mbx.v2p_mailbox &= ~mask;
175 static s32 ixgbevf_check_for_msg_vf(
struct ixgbe_hw *hw)
181 hw->
mbx.stats.reqs++;
193 static s32 ixgbevf_check_for_ack_vf(
struct ixgbe_hw *hw)
199 hw->
mbx.stats.acks++;
211 static s32 ixgbevf_check_for_rst_vf(
struct ixgbe_hw *hw)
218 hw->
mbx.stats.rsts++;
230 static s32 ixgbevf_obtain_mbx_lock_vf(
struct ixgbe_hw *hw)
259 ret_val = ixgbevf_obtain_mbx_lock_vf(hw);
264 ixgbevf_check_for_msg_vf(hw);
265 ixgbevf_check_for_ack_vf(hw);
268 for (i = 0; i <
size; i++)
272 hw->
mbx.stats.msgs_tx++;
295 ret_val = ixgbevf_obtain_mbx_lock_vf(hw);
300 for (i = 0; i <
size; i++)
307 hw->
mbx.stats.msgs_rx++;
319 static s32 ixgbevf_init_mbx_params_vf(
struct ixgbe_hw *hw)
330 mbx->
stats.msgs_tx = 0;
331 mbx->
stats.msgs_rx = 0;
340 .init_params = ixgbevf_init_mbx_params_vf,
341 .read = ixgbevf_read_mbx_vf,
342 .write = ixgbevf_write_mbx_vf,
343 .read_posted = ixgbevf_read_posted_mbx,
344 .write_posted = ixgbevf_write_posted_mbx,
345 .check_for_msg = ixgbevf_check_for_msg_vf,
346 .check_for_ack = ixgbevf_check_for_ack_vf,
347 .check_for_rst = ixgbevf_check_for_rst_vf,