/* This function copies a message from the mailbox buffer to the caller's memory buffer. The presumption is that the caller knows that there was a message due to a VF request so no polling for message is needed.  */
static s32 igb_read_mbx_pf(struct e1000_hw *hw, u32 *msg, u16 size, u16 vf_number)
/* This function copies a message from the mailbox buffer to the caller's memory buffer. The presumption is that the caller knows that there was a message due to a VF request so no polling for message is needed.  */
static s32 igb_read_mbx_pf(struct e1000_hw *hw, u32 *msg, u16 size, u16 vf_number)
{
	s32 ret_val;
	u16 i;
	ret_val = igb_obtain_mbx_lock_pf(hw, vf_number);
	if (ret_val)
		goto out_no_read;
	for (i = 0; i < size; i++)
		msg[i] = array_rd32(E1000_VMBMEM(vf_number), i);
	wr32(E1000_P2VMAILBOX(vf_number), E1000_P2VMAILBOX_ACK);
	hw->mbx.stats.msgs_rx++;
out_no_read:
	return ret_val;
}