Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

bnx2x: added TLV_NOT_FOUND flags to the dcb

The new error flags are supported by the bnx2x FW.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Dmitry Kravkov and committed by
David S. Miller
910b2202 9d4884f9

+17 -7
+14 -7
drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
··· 206 206 if (GET_FLAGS(error, DCBX_LOCAL_APP_MISMATCH)) 207 207 DP(BNX2X_MSG_DCB, "DCBX_LOCAL_APP_MISMATCH\n"); 208 208 209 + if (GET_FLAGS(error, DCBX_REMOTE_APP_TLV_NOT_FOUND)) 210 + DP(BNX2X_MSG_DCB, "DCBX_REMOTE_APP_TLV_NOT_FOUND\n"); 209 211 if (app->enabled && 210 - !GET_FLAGS(error, DCBX_LOCAL_APP_ERROR | DCBX_LOCAL_APP_MISMATCH)) { 212 + !GET_FLAGS(error, DCBX_LOCAL_APP_ERROR | DCBX_LOCAL_APP_MISMATCH | 213 + DCBX_REMOTE_APP_TLV_NOT_FOUND)) { 211 214 212 215 bp->dcbx_port_params.app.enabled = true; 213 216 ··· 261 258 if (GET_FLAGS(error, DCBX_LOCAL_ETS_ERROR)) 262 259 DP(BNX2X_MSG_DCB, "DCBX_LOCAL_ETS_ERROR\n"); 263 260 261 + if (GET_FLAGS(error, DCBX_REMOTE_ETS_TLV_NOT_FOUND)) 262 + DP(BNX2X_MSG_DCB, "DCBX_REMOTE_ETS_TLV_NOT_FOUND\n"); 264 263 265 264 /* Clean up old settings of ets on COS */ 266 265 for (i = 0; i < ARRAY_SIZE(bp->dcbx_port_params.ets.cos_params) ; i++) { ··· 272 267 cos_params[i].pri_bitmask = 0; 273 268 } 274 269 275 - if (bp->dcbx_port_params.app.enabled && 276 - !GET_FLAGS(error, DCBX_LOCAL_ETS_ERROR) && 277 - ets->enabled) { 270 + if (bp->dcbx_port_params.app.enabled && ets->enabled && 271 + !GET_FLAGS(error, 272 + DCBX_LOCAL_ETS_ERROR | DCBX_REMOTE_ETS_TLV_NOT_FOUND)) { 278 273 DP(BNX2X_MSG_DCB, "DCBX_LOCAL_ETS_ENABLE\n"); 279 274 bp->dcbx_port_params.ets.enabled = true; 280 275 ··· 306 301 if (GET_FLAGS(error, DCBX_LOCAL_PFC_ERROR)) 307 302 DP(BNX2X_MSG_DCB, "DCBX_LOCAL_PFC_ERROR\n"); 308 303 309 - if (bp->dcbx_port_params.app.enabled && 310 - !GET_FLAGS(error, DCBX_LOCAL_PFC_ERROR | DCBX_LOCAL_PFC_MISMATCH) && 311 - pfc->enabled) { 304 + if (GET_FLAGS(error, DCBX_REMOTE_PFC_TLV_NOT_FOUND)) 305 + DP(BNX2X_MSG_DCB, "DCBX_REMOTE_PFC_TLV_NOT_FOUND\n"); 306 + if (bp->dcbx_port_params.app.enabled && pfc->enabled && 307 + !GET_FLAGS(error, DCBX_LOCAL_PFC_ERROR | DCBX_LOCAL_PFC_MISMATCH | 308 + DCBX_REMOTE_PFC_TLV_NOT_FOUND)) { 312 309 bp->dcbx_port_params.pfc.enabled = true; 313 310 bp->dcbx_port_params.pfc.priority_non_pauseable_mask = 314 311 ~(pfc->pri_en_bitmap);
+3
drivers/net/ethernet/broadcom/bnx2x/bnx2x_hsi.h
··· 1833 1833 #define DCBX_LOCAL_PFC_MISMATCH 0x00000010 1834 1834 #define DCBX_LOCAL_APP_MISMATCH 0x00000020 1835 1835 #define DCBX_REMOTE_MIB_ERROR 0x00000040 1836 + #define DCBX_REMOTE_ETS_TLV_NOT_FOUND 0x00000080 1837 + #define DCBX_REMOTE_PFC_TLV_NOT_FOUND 0x00000100 1838 + #define DCBX_REMOTE_APP_TLV_NOT_FOUND 0x00000200 1836 1839 struct dcbx_features features; 1837 1840 u32 suffix_seq_num; 1838 1841 };