aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c
diff options
context:
space:
mode:
authorAmir Hanania <amir.hanania@intel.com>2013-04-18 04:23:52 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-05-21 03:14:21 -0700
commite8915bebb4b33c63d6e08161edc3fbda32a840a7 (patch)
treec7ba40149e72007f984ba8f85b2a15c270deebd6 /drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c
parentigb: Removed unused i2c function (diff)
downloadlinux-dev-e8915bebb4b33c63d6e08161edc3fbda32a840a7.tar.xz
linux-dev-e8915bebb4b33c63d6e08161edc3fbda32a840a7.zip
IXGBE: Set the SW prio_tc values at initialization to the HW setting.
Set the SW prio_tc values at initialization to the HW setting. Setting the SW prio_tc default values to be the HW setting by reading the rtrup2tc register. For any TC change we need to reset the device. This will remove the need to reset the device at the first time we call ixgbe_dcbnl_ieee_setets. Signed-off-by: Amir Hanania <amir.hanania@intel.com> Tested-by: Jack Morgan<jack.morgan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c
index 1f2c805684dd..e055e000131b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c
@@ -380,3 +380,26 @@ s32 ixgbe_dcb_hw_ets_config(struct ixgbe_hw *hw,
}
return 0;
}
+
+static void ixgbe_dcb_read_rtrup2tc_82599(struct ixgbe_hw *hw, u8 *map)
+{
+ u32 reg, i;
+
+ reg = IXGBE_READ_REG(hw, IXGBE_RTRUP2TC);
+ for (i = 0; i < MAX_USER_PRIORITY; i++)
+ map[i] = IXGBE_RTRUP2TC_UP_MASK &
+ (reg >> (i * IXGBE_RTRUP2TC_UP_SHIFT));
+ return;
+}
+
+void ixgbe_dcb_read_rtrup2tc(struct ixgbe_hw *hw, u8 *map)
+{
+ switch (hw->mac.type) {
+ case ixgbe_mac_82599EB:
+ case ixgbe_mac_X540:
+ ixgbe_dcb_read_rtrup2tc_82599(hw, map);
+ break;
+ default:
+ break;
+ }
+}