]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Fix kernel panic on enable/disable LLDP
authorDave Ertman <david.m.ertman@intel.com>
Tue, 30 Aug 2016 00:38:26 +0000 (17:38 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Sep 2016 21:20:28 +0000 (14:20 -0700)
commit11a2adb800661a46093e1af3007fced4d6097115
tree2284d5be041c49060cfc4959b7693245872c7ce5
parentd2c47fefaaf4f4a2222f882e061d4d22f60b180b
i40e: Fix kernel panic on enable/disable LLDP

If DCB is configured on the link partner switch with an
unsupported traffic class configuration (e.g. non-contiguous TCs),
the driver is flagging DCB as disabled.  But, for future DCB
LLDPDUs, the driver was checking if the interface was DCB capable
instead of enabled.  This was causing a kernel panic when LLDP
was enabled/disabled on the link partner switch.

This patch corrects the situation by having the LLDP event handler
check the correct flag in the pf structure.  It also cleans up the
setting and clearing of the enabled flag for other checks.

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/i40e/i40e_main.c