41 if (!mbx->
ops.check_for_msg)
44 while (countdown && mbx->
ops.check_for_msg(hw)) {
67 if (!mbx->
ops.check_for_ack)
70 while (countdown && mbx->
ops.check_for_ack(hw)) {
99 ret_val = e1000_poll_for_msg(hw);
103 ret_val = mbx->
ops.read(hw, msg, size);
127 ret_val = mbx->
ops.write(hw, msg, size);
131 ret_val = e1000_poll_for_ack(hw);
143 static u32 e1000_read_v2p_mailbox(
struct e1000_hw *hw)
145 u32 v2p_mailbox =
er32(V2PMAILBOX(0));
163 u32 v2p_mailbox = e1000_read_v2p_mailbox(hw);
166 if (v2p_mailbox & mask)
180 static s32 e1000_check_for_msg_vf(
struct e1000_hw *hw)
186 hw->
mbx.stats.reqs++;
198 static s32 e1000_check_for_ack_vf(
struct e1000_hw *hw)
204 hw->
mbx.stats.acks++;
216 static s32 e1000_check_for_rst_vf(
struct e1000_hw *hw)
223 hw->
mbx.stats.rsts++;
235 static s32 e1000_obtain_mbx_lock_vf(
struct e1000_hw *hw)
263 err = e1000_obtain_mbx_lock_vf(hw);
268 e1000_check_for_ack_vf(hw);
269 e1000_check_for_msg_vf(hw);
272 for (i = 0; i <
size; i++)
276 hw->
mbx.stats.msgs_tx++;
299 err = e1000_obtain_mbx_lock_vf(hw);
304 for (i = 0; i <
size; i++)
311 hw->
mbx.stats.msgs_rx++;
334 mbx->
ops.read = e1000_read_mbx_vf;
335 mbx->
ops.write = e1000_write_mbx_vf;
336 mbx->
ops.read_posted = e1000_read_posted_mbx;
337 mbx->
ops.write_posted = e1000_write_posted_mbx;
338 mbx->
ops.check_for_msg = e1000_check_for_msg_vf;
339 mbx->
ops.check_for_ack = e1000_check_for_ack_vf;
340 mbx->
ops.check_for_rst = e1000_check_for_rst_vf;
342 mbx->
stats.msgs_tx = 0;
343 mbx->
stats.msgs_rx = 0;