]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: fixup remaining call sites for arbitrary TCs
authorJohn Fastabend <john.r.fastabend@intel.com>
Mon, 18 Jul 2011 22:38:25 +0000 (22:38 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 14:00:54 +0000 (22:00 +0800)
One existing call sites still expect either 4 or 8 traffic
classes to be specified. This fixes this allowing arbitrary
values up to 8 to work as expected.

(cherry picked from commit 4fa2e0e178b23819283839b64dcb56f0f259ba39)
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@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 5f4b77ede106779ec3cf10e469021d8a28dd7071..cb2fa6b81646fa082831c0b789b19e3419322afb 100644 (file)
@@ -4480,7 +4480,7 @@ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc,
                break;
        case ixgbe_mac_82599EB:
        case ixgbe_mac_X540:
-               if (num_tcs == 8) {
+               if (num_tcs > 4) {
                        if (tc < 3) {
                                *tx = tc << 5;
                                *rx = tc << 4;
@@ -4491,7 +4491,7 @@ static void ixgbe_get_first_reg_idx(struct ixgbe_adapter *adapter, u8 tc,
                                *tx = ((tc + 8) << 3);
                                *rx = tc << 4;
                        }
-               } else if (num_tcs == 4) {
+               } else {
                        *rx =  tc << 5;
                        switch (tc) {
                        case 0: