summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Fastabend <john.r.fastabend@intel.com>2012-02-11 06:26:00 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-03-14 00:49:10 -0700
commitcdf485be3a63d1f34293740fb726088c6840ceea (patch)
tree55261192fd0d075d195a7ae2e03bbf9bbddae492
parentd2f5e7f3af777d52ce110ae60e8cb788bc93141c (diff)
downloadlinux-cdf485be3a63d1f34293740fb726088c6840ceea.tar.gz
linux-cdf485be3a63d1f34293740fb726088c6840ceea.tar.bz2
linux-cdf485be3a63d1f34293740fb726088c6840ceea.zip
ixgbe: dcb: use DCB config values for FCoE traffic class on open
Disabling and enabling DCB can cause FCoE hardware initialization to occur on the incorrect traffic class when the up2tc mapping has not yet been reconfigured. Fix this by using the DCB configuration maps that are correct and will be pushed at mqprio after DCB driver setup completes successfully. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index e1444bde02bb..167e898fbba6 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4391,11 +4391,13 @@ static inline bool ixgbe_set_dcb_queues(struct ixgbe_adapter *adapter)
* configuration later.
*/
if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) {
+ u8 prio_tc[MAX_USER_PRIORITY] = {0};
int tc;
struct ixgbe_ring_feature *f =
&adapter->ring_feature[RING_F_FCOE];
- tc = netdev_get_prio_tc_map(dev, adapter->fcoe.up);
+ ixgbe_dcb_unpack_map(&adapter->dcb_cfg, DCB_TX_CONFIG, prio_tc);
+ tc = prio_tc[adapter->fcoe.up];
f->indices = dev->tc_to_txq[tc].count;
f->mask = dev->tc_to_txq[tc].offset;
}