Commit 910b2202 authored by Dmitry Kravkov's avatar Dmitry Kravkov Committed by David S. Miller

bnx2x: added TLV_NOT_FOUND flags to the dcb

The new error flags are supported by the bnx2x FW.
Signed-off-by: default avatarDmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9d4884f9
...@@ -206,8 +206,11 @@ static void bnx2x_dcbx_get_ap_feature(struct bnx2x *bp, ...@@ -206,8 +206,11 @@ static void bnx2x_dcbx_get_ap_feature(struct bnx2x *bp,
if (GET_FLAGS(error, DCBX_LOCAL_APP_MISMATCH)) if (GET_FLAGS(error, DCBX_LOCAL_APP_MISMATCH))
DP(BNX2X_MSG_DCB, "DCBX_LOCAL_APP_MISMATCH\n"); DP(BNX2X_MSG_DCB, "DCBX_LOCAL_APP_MISMATCH\n");
if (GET_FLAGS(error, DCBX_REMOTE_APP_TLV_NOT_FOUND))
DP(BNX2X_MSG_DCB, "DCBX_REMOTE_APP_TLV_NOT_FOUND\n");
if (app->enabled && if (app->enabled &&
!GET_FLAGS(error, DCBX_LOCAL_APP_ERROR | DCBX_LOCAL_APP_MISMATCH)) { !GET_FLAGS(error, DCBX_LOCAL_APP_ERROR | DCBX_LOCAL_APP_MISMATCH |
DCBX_REMOTE_APP_TLV_NOT_FOUND)) {
bp->dcbx_port_params.app.enabled = true; bp->dcbx_port_params.app.enabled = true;
...@@ -258,6 +261,8 @@ static void bnx2x_dcbx_get_ets_feature(struct bnx2x *bp, ...@@ -258,6 +261,8 @@ static void bnx2x_dcbx_get_ets_feature(struct bnx2x *bp,
if (GET_FLAGS(error, DCBX_LOCAL_ETS_ERROR)) if (GET_FLAGS(error, DCBX_LOCAL_ETS_ERROR))
DP(BNX2X_MSG_DCB, "DCBX_LOCAL_ETS_ERROR\n"); DP(BNX2X_MSG_DCB, "DCBX_LOCAL_ETS_ERROR\n");
if (GET_FLAGS(error, DCBX_REMOTE_ETS_TLV_NOT_FOUND))
DP(BNX2X_MSG_DCB, "DCBX_REMOTE_ETS_TLV_NOT_FOUND\n");
/* Clean up old settings of ets on COS */ /* Clean up old settings of ets on COS */
for (i = 0; i < ARRAY_SIZE(bp->dcbx_port_params.ets.cos_params) ; i++) { for (i = 0; i < ARRAY_SIZE(bp->dcbx_port_params.ets.cos_params) ; i++) {
...@@ -267,9 +272,9 @@ static void bnx2x_dcbx_get_ets_feature(struct bnx2x *bp, ...@@ -267,9 +272,9 @@ static void bnx2x_dcbx_get_ets_feature(struct bnx2x *bp,
cos_params[i].pri_bitmask = 0; cos_params[i].pri_bitmask = 0;
} }
if (bp->dcbx_port_params.app.enabled && if (bp->dcbx_port_params.app.enabled && ets->enabled &&
!GET_FLAGS(error, DCBX_LOCAL_ETS_ERROR) && !GET_FLAGS(error,
ets->enabled) { DCBX_LOCAL_ETS_ERROR | DCBX_REMOTE_ETS_TLV_NOT_FOUND)) {
DP(BNX2X_MSG_DCB, "DCBX_LOCAL_ETS_ENABLE\n"); DP(BNX2X_MSG_DCB, "DCBX_LOCAL_ETS_ENABLE\n");
bp->dcbx_port_params.ets.enabled = true; bp->dcbx_port_params.ets.enabled = true;
...@@ -301,9 +306,11 @@ static void bnx2x_dcbx_get_pfc_feature(struct bnx2x *bp, ...@@ -301,9 +306,11 @@ static void bnx2x_dcbx_get_pfc_feature(struct bnx2x *bp,
if (GET_FLAGS(error, DCBX_LOCAL_PFC_ERROR)) if (GET_FLAGS(error, DCBX_LOCAL_PFC_ERROR))
DP(BNX2X_MSG_DCB, "DCBX_LOCAL_PFC_ERROR\n"); DP(BNX2X_MSG_DCB, "DCBX_LOCAL_PFC_ERROR\n");
if (bp->dcbx_port_params.app.enabled && if (GET_FLAGS(error, DCBX_REMOTE_PFC_TLV_NOT_FOUND))
!GET_FLAGS(error, DCBX_LOCAL_PFC_ERROR | DCBX_LOCAL_PFC_MISMATCH) && DP(BNX2X_MSG_DCB, "DCBX_REMOTE_PFC_TLV_NOT_FOUND\n");
pfc->enabled) { if (bp->dcbx_port_params.app.enabled && pfc->enabled &&
!GET_FLAGS(error, DCBX_LOCAL_PFC_ERROR | DCBX_LOCAL_PFC_MISMATCH |
DCBX_REMOTE_PFC_TLV_NOT_FOUND)) {
bp->dcbx_port_params.pfc.enabled = true; bp->dcbx_port_params.pfc.enabled = true;
bp->dcbx_port_params.pfc.priority_non_pauseable_mask = bp->dcbx_port_params.pfc.priority_non_pauseable_mask =
~(pfc->pri_en_bitmap); ~(pfc->pri_en_bitmap);
......
...@@ -1833,6 +1833,9 @@ struct lldp_local_mib { ...@@ -1833,6 +1833,9 @@ struct lldp_local_mib {
#define DCBX_LOCAL_PFC_MISMATCH 0x00000010 #define DCBX_LOCAL_PFC_MISMATCH 0x00000010
#define DCBX_LOCAL_APP_MISMATCH 0x00000020 #define DCBX_LOCAL_APP_MISMATCH 0x00000020
#define DCBX_REMOTE_MIB_ERROR 0x00000040 #define DCBX_REMOTE_MIB_ERROR 0x00000040
#define DCBX_REMOTE_ETS_TLV_NOT_FOUND 0x00000080
#define DCBX_REMOTE_PFC_TLV_NOT_FOUND 0x00000100
#define DCBX_REMOTE_APP_TLV_NOT_FOUND 0x00000200
struct dcbx_features features; struct dcbx_features features;
u32 suffix_seq_num; u32 suffix_seq_num;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment