aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ixgbevf/vf.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-07-20 08:09:48 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-08-30 19:22:22 -0700
commitdd1fe113e7532c7513ff03f832312d81628a23ff (patch)
tree806824ec5329475884ffed5c5cedc40e953d5ec6 /drivers/net/ethernet/intel/ixgbevf/vf.c
parent0ac1e8cee674d492d336355b99bf63c906f0a2e4 (diff)
ixgbevf: Cleanup handling of configuration for jumbo frames
This change moves the code for notifying the PF of the VF maximum packet size into the vf.c file. The main motivation behind this is that the vf.c file is supposed to contain all of the messages used when communicating with the PF. In addition it creates a separate function for setting the Rx buffer size so that we have on centralized area to review what buffer sizes will be requested by the VF. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf/vf.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/vf.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c b/drivers/net/ethernet/intel/ixgbevf/vf.c
index ec89b86f7ca4..3d555a10f592 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.c
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.c
@@ -419,6 +419,20 @@ static s32 ixgbevf_check_mac_link_vf(struct ixgbe_hw *hw,
return 0;
}
+/**
+ * ixgbevf_rlpml_set_vf - Set the maximum receive packet length
+ * @hw: pointer to the HW structure
+ * @max_size: value to assign to max frame size
+ **/
+void ixgbevf_rlpml_set_vf(struct ixgbe_hw *hw, u16 max_size)
+{
+ u32 msgbuf[2];
+
+ msgbuf[0] = IXGBE_VF_SET_LPE;
+ msgbuf[1] = max_size;
+ ixgbevf_write_msg_read_ack(hw, msgbuf, 2);
+}
+
static const struct ixgbe_mac_operations ixgbevf_mac_ops = {
.init_hw = ixgbevf_init_hw_vf,
.reset_hw = ixgbevf_reset_hw_vf,