]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
i40e: check for and deal with non-contiguous TCs
authorDave Ertman <david.m.ertman@intel.com>
Tue, 14 Mar 2017 14:24:54 +0000 (09:24 -0500)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 6 Apr 2017 08:23:31 +0000 (09:23 +0100)
commitdb6196c4521e6da1b8e94462438eaa0bdb68d9ed
treed554aee319920fcfa401306d1ce30a764a380857
parentf068ccac8a390dca36ee914ca3dfe7c8fb82bc12
i40e: check for and deal with non-contiguous TCs

BugLink: http://bugs.launchpad.net/bugs/1672550
The i40e driver was causing a kernel panic when
non-contiguous Traffic Classes, or Traffic Classes not
starting with TC0, were configured on a link partner switch.
i40e does not support non-contiguous TCs.

To fix this, the patch changes the logic when determining
the total number of TCs enabled.  Before, this would use the
highest TC number enabled and assume that all TCs below it were
also enabled.  Now, we create a bitmask of enabled TCs and scan
it to determine not only the number of TCs, but also if the set
of enabled TCs starts at zero and is contiguous.  If not, then
DCB is disabled by only returning one TC.

Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit fbfe12c64f9650aa22f434dd9dd22df7ddf63221)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/net/ethernet/intel/i40e/i40e_main.c