aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Kravkov <dmitry@broadcom.com>2013-08-19 02:11:58 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-20 03:21:47 -0400
commit79b17a9493a79923cc1af4da64e1c4931273f0f5 (patch)
treebcc7ecc8d9543b1c8221bf6bd46d9bd62181c597
parent07b4eb3b53f692a75fc0bc35c43345f331b7cca4 (diff)
bnx2x: Consider DCBX remote error
When publishing information via getfeatcfg(), bnx2x driver didn't consider remote errors (e.g., switch that doesn't support DCBX) when setting the error flags. Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Ariel Elior <ariele@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
index d537d51a2d2b..fcf2761d8828 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
@@ -2391,21 +2391,24 @@ static u8 bnx2x_dcbnl_get_featcfg(struct net_device *netdev, int featid,
2391 case DCB_FEATCFG_ATTR_PG: 2391 case DCB_FEATCFG_ATTR_PG:
2392 if (bp->dcbx_local_feat.ets.enabled) 2392 if (bp->dcbx_local_feat.ets.enabled)
2393 *flags |= DCB_FEATCFG_ENABLE; 2393 *flags |= DCB_FEATCFG_ENABLE;
2394 if (bp->dcbx_error & DCBX_LOCAL_ETS_ERROR) 2394 if (bp->dcbx_error & (DCBX_LOCAL_ETS_ERROR |
2395 DCBX_REMOTE_MIB_ERROR))
2395 *flags |= DCB_FEATCFG_ERROR; 2396 *flags |= DCB_FEATCFG_ERROR;
2396 break; 2397 break;
2397 case DCB_FEATCFG_ATTR_PFC: 2398 case DCB_FEATCFG_ATTR_PFC:
2398 if (bp->dcbx_local_feat.pfc.enabled) 2399 if (bp->dcbx_local_feat.pfc.enabled)
2399 *flags |= DCB_FEATCFG_ENABLE; 2400 *flags |= DCB_FEATCFG_ENABLE;
2400 if (bp->dcbx_error & (DCBX_LOCAL_PFC_ERROR | 2401 if (bp->dcbx_error & (DCBX_LOCAL_PFC_ERROR |
2401 DCBX_LOCAL_PFC_MISMATCH)) 2402 DCBX_LOCAL_PFC_MISMATCH |
2403 DCBX_REMOTE_MIB_ERROR))
2402 *flags |= DCB_FEATCFG_ERROR; 2404 *flags |= DCB_FEATCFG_ERROR;
2403 break; 2405 break;
2404 case DCB_FEATCFG_ATTR_APP: 2406 case DCB_FEATCFG_ATTR_APP:
2405 if (bp->dcbx_local_feat.app.enabled) 2407 if (bp->dcbx_local_feat.app.enabled)
2406 *flags |= DCB_FEATCFG_ENABLE; 2408 *flags |= DCB_FEATCFG_ENABLE;
2407 if (bp->dcbx_error & (DCBX_LOCAL_APP_ERROR | 2409 if (bp->dcbx_error & (DCBX_LOCAL_APP_ERROR |
2408 DCBX_LOCAL_APP_MISMATCH)) 2410 DCBX_LOCAL_APP_MISMATCH |
2411 DCBX_REMOTE_MIB_ERROR))
2409 *flags |= DCB_FEATCFG_ERROR; 2412 *flags |= DCB_FEATCFG_ERROR;
2410 break; 2413 break;
2411 default: 2414 default: