net/ice/base: fix DCBx initialization
authorLeyi Rong <leyi.rong@intel.com>
Wed, 19 Jun 2019 15:17:40 +0000 (23:17 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 28 Jun 2019 18:31:48 +0000 (20:31 +0200)
When a port is not cabled, but DCBx is enabled in the firmware, the
status of DCBx will be NOT_STARTED. This is a valid state for FW
enabled and should not be treated as a is_fw_lldp true automatically.

Add the code to treat NOT_STARTED as another valid state.

Fixes: 1082f786547e ("net/ice/base: support DCB")
Cc: stable@dpdk.org
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/base/ice_dcb.c

index 4e213d4..100c4bb 100644 (file)
@@ -945,7 +945,8 @@ enum ice_status ice_init_dcb(struct ice_hw *hw, bool enable_mib_change)
        pi->dcbx_status = ice_get_dcbx_status(hw);
 
        if (pi->dcbx_status == ICE_DCBX_STATUS_DONE ||
-           pi->dcbx_status == ICE_DCBX_STATUS_IN_PROGRESS) {
+           pi->dcbx_status == ICE_DCBX_STATUS_IN_PROGRESS ||
+           pi->dcbx_status == ICE_DCBX_STATUS_NOT_STARTED) {
                /* Get current DCBX configuration */
                ret = ice_get_dcb_cfg(pi);
                pi->is_sw_lldp = (hw->adminq.sq_last_status == ICE_AQ_RC_EPERM);