]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ixgbe: DCB: IEEE transitions may fail to reprogram hardware.
authorJohn Fastabend <john.r.fastabend@intel.com>
Sat, 12 Nov 2011 01:12:22 +0000 (01:12 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 14:34:41 +0000 (22:34 +0800)
commit1bb95c45fbf45db45fe1474c0c907bf39aa93bde
tree25f658243f576869cd8c6449205cbd9eedffd0fc
parente6ec5b0980386c93822eb14545da0a7c6b4a2cca
ixgbe: DCB: IEEE transitions may fail to reprogram hardware.

Transitioning through an IEEE DCBX version from a CEE DCBX
and back (CEE->IEEE->CEE) may leave IEEE attributes programmed
in the hardware. DCB uses a bit field in the set routines to
determine which attributes PG, PFC, APP need to be reprogrammed.
This is needed because user flow allows queueing a series
of changes and then reprogramming the hardware with the
entire set in one operation.

When transitioning from IEEE DCBX mode back into CEE DCBX
mode the PG and PFC bits need to be set so the possibly

different CEE attributes get programmed into the device.

This patch fixes broken logic that was evaluating to 0
and never setting any bits. Further this removes some
checks for num_tc in set routines. This logic only worked
when the number of traffic classes and user priorities
were equal. This is no longer the case for X540 devices.
Besides we can trust user input in this case if the
device is incorrectly configured the DCB bandwidths will
be incorrectly mapped but no OOPs, BUG, or hardware
failure will occur.

(cherry picked from commit 43497cc21889725a0fa0dcea1ce72ec567796f3a)
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_dcb_nl.c