From: John Fastabend Date: Sat, 11 Feb 2012 06:26:00 +0000 (+0000) Subject: ixgbe: dcb: use DCB config values for FCoE traffic class on open X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~92 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d7d45ec5dd16477c7879f206653d69fef0045246;p=users%2Fjedix%2Flinux-maple.git 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. (cherry picked from commit cdf485be3a63d1f34293740fb726088c6840ceea) Signed-off-by: John Fastabend Tested-by: Marcus Dennis Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index c9e1fe50f869..cbac465fc788 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -4375,11 +4375,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; }