OSDN Git Service

ice: Fix DCB rebuild after reset
authorDave Ertman <david.m.ertman@intel.com>
Thu, 6 Feb 2020 09:19:59 +0000 (01:19 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 12 Feb 2020 19:48:10 +0000 (11:48 -0800)
commit242b5e068b25119d6f1d63dac076b79d89580b4b
tree9375eed346604c7a8c02504a1e3ca2e9806abde8
parentb9287f2ac321ecac56eb51e6231f6579683dcdae
ice: Fix DCB rebuild after reset

The function ice_dcb_rebuild had some logic
flaws in it, and also didn't differentiate
between FW and SW modes needs.

For FW flow, the willing setting was being
forced to OFF and left that way.  Unwilling
in DCB FW mode is not a supported model.

Leave the config alone and use the return value
from the set command to determine if setting the
config was successful.

The SW DCB flow does not need to need to register
for MIB change events (as they are not used in
SW mode).

Use !is_sw_lldp checks to only perform FW specific
task while in FW mode.

Also adding a reapplication of the current DCB
config after a link event.  Some NVMs are not
maintaining their DCB configs across link events.

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>
drivers/net/ethernet/intel/ice/ice_dcb_lib.c
drivers/net/ethernet/intel/ice/ice_main.c