]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: dcb: use DCB config values for FCoE traffic class on open
authorJohn Fastabend <john.r.fastabend@intel.com>
Sat, 11 Feb 2012 06:26:00 +0000 (06:26 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 15:05:37 +0000 (23:05 +0800)
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 <john.r.fastabend@intel.com>
Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/ixgbe/ixgbe_main.c

index c9e1fe50f86982add7a1ed70d4478fa69ed8db60..cbac465fc7880147dfca6b07c9d696509df02f5e 100644 (file)
@@ -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;
        }