aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
diff options
context:
space:
mode:
authorYuval Mintz <yuvalmin@broadcom.com>2013-06-01 20:06:18 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-03 00:36:47 -0400
commit16a5fd9265e757121bb5f1b9ad757836f370e76c (patch)
tree96353769dbb151fdd948ccd87beb7d0e5afd688f /drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
parentd76a611187c4840a4a45fb3f493f9b63c19df4ca (diff)
bnx2x: Revise comments and alignment
This patch correct various typos, fix comments conventions and adds/removes a few comments. 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>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
index 2689f28010fd..210614e37b9b 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c
@@ -687,7 +687,7 @@ static inline void bnx2x_dcbx_update_tc_mapping(struct bnx2x *bp)
687 } 687 }
688 688
689 /* setup tc must be called under rtnl lock, but we can't take it here 689 /* setup tc must be called under rtnl lock, but we can't take it here
690 * as we are handling an attetntion on a work queue which must be 690 * as we are handling an attention on a work queue which must be
691 * flushed at some rtnl-locked contexts (e.g. if down) 691 * flushed at some rtnl-locked contexts (e.g. if down)
692 */ 692 */
693 if (!test_and_set_bit(BNX2X_SP_RTNL_SETUP_TC, &bp->sp_rtnl_state)) 693 if (!test_and_set_bit(BNX2X_SP_RTNL_SETUP_TC, &bp->sp_rtnl_state))
@@ -707,7 +707,7 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state)
707 */ 707 */
708 bnx2x_dcbnl_update_applist(bp, true); 708 bnx2x_dcbnl_update_applist(bp, true);
709 709
710 /* Read rmeote mib if dcbx is in the FW */ 710 /* Read remote mib if dcbx is in the FW */
711 if (bnx2x_dcbx_read_shmem_remote_mib(bp)) 711 if (bnx2x_dcbx_read_shmem_remote_mib(bp))
712 return; 712 return;
713#endif 713#endif
@@ -738,7 +738,7 @@ void bnx2x_dcbx_set_params(struct bnx2x *bp, u32 state)
738 bnx2x_dcbx_update_tc_mapping(bp); 738 bnx2x_dcbx_update_tc_mapping(bp);
739 739
740 /* 740 /*
741 * allow other funtions to update their netdevices 741 * allow other functions to update their netdevices
742 * accordingly 742 * accordingly
743 */ 743 */
744 if (IS_MF(bp)) 744 if (IS_MF(bp))
@@ -860,7 +860,7 @@ static void bnx2x_dcbx_admin_mib_updated_params(struct bnx2x *bp,
860 i, DCBX_PRI_PG_GET(af->ets.pri_pg_tbl, i)); 860 i, DCBX_PRI_PG_GET(af->ets.pri_pg_tbl, i));
861 } 861 }
862 862
863 /*For IEEE admin_recommendation_bw_precentage 863 /*For IEEE admin_recommendation_bw_percentage
864 *For IEEE admin_recommendation_ets_pg */ 864 *For IEEE admin_recommendation_ets_pg */
865 af->pfc.pri_en_bitmap = (u8)dp->admin_pfc_bitmap; 865 af->pfc.pri_en_bitmap = (u8)dp->admin_pfc_bitmap;
866 for (i = 0; i < DCBX_CONFIG_MAX_APP_PROTOCOL; i++) { 866 for (i = 0; i < DCBX_CONFIG_MAX_APP_PROTOCOL; i++) {
@@ -1070,7 +1070,7 @@ static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp,
1070 bool pg_found = false; 1070 bool pg_found = false;
1071 u32 i, traf_type, add_traf_type, add_pg; 1071 u32 i, traf_type, add_traf_type, add_pg;
1072 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority; 1072 u32 *ttp = bp->dcbx_port_params.app.traffic_type_priority;
1073 struct pg_entry_help_data *data = help_data->data; /*shotcut*/ 1073 struct pg_entry_help_data *data = help_data->data; /*shortcut*/
1074 1074
1075 /* Set to invalid */ 1075 /* Set to invalid */
1076 for (i = 0; i < LLFC_DRIVER_TRAFFIC_TYPE_MAX; i++) 1076 for (i = 0; i < LLFC_DRIVER_TRAFFIC_TYPE_MAX; i++)
@@ -1166,7 +1166,8 @@ static void bnx2x_dcbx_separate_pauseable_from_non(struct bnx2x *bp,
1166 DCBX_PG_BW_GET(ets->pg_bw_tbl, pg_entry)); 1166 DCBX_PG_BW_GET(ets->pg_bw_tbl, pg_entry));
1167 else 1167 else
1168 /* If we join a group and one is strict 1168 /* If we join a group and one is strict
1169 * than the bw rulls */ 1169 * than the bw rules
1170 */
1170 cos_data->data[entry].strict = 1171 cos_data->data[entry].strict =
1171 BNX2X_DCBX_STRICT_COS_HIGHEST; 1172 BNX2X_DCBX_STRICT_COS_HIGHEST;
1172 } 1173 }
@@ -1277,7 +1278,7 @@ static void bnx2x_dcbx_2cos_limit_cee_single_pg_to_cos_params(struct bnx2x *bp,
1277 } else { 1278 } else {
1278 /* If there are only pauseable priorities or 1279 /* If there are only pauseable priorities or
1279 * only non-pauseable,* the lower priorities go 1280 * only non-pauseable,* the lower priorities go
1280 * to the first queue and the higherpriorities go 1281 * to the first queue and the higher priorities go
1281 * to the second queue. 1282 * to the second queue.
1282 */ 1283 */
1283 cos_data->data[0].pausable = 1284 cos_data->data[0].pausable =
@@ -1477,7 +1478,7 @@ static void bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params(
1477 * queue and one priority goes to the second queue. 1478 * queue and one priority goes to the second queue.
1478 * 1479 *
1479 * We will join this two cases: 1480 * We will join this two cases:
1480 * if one is BW limited it will go to the secoend queue 1481 * if one is BW limited it will go to the second queue
1481 * otherwise the last priority will get it 1482 * otherwise the last priority will get it
1482 */ 1483 */
1483 1484
@@ -1497,7 +1498,8 @@ static void bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params(
1497 false == b_found_strict) 1498 false == b_found_strict)
1498 /* last entry will be handled separately 1499 /* last entry will be handled separately
1499 * If no priority is strict than last 1500 * If no priority is strict than last
1500 * enty goes to last queue.*/ 1501 * entry goes to last queue.
1502 */
1501 entry = 1; 1503 entry = 1;
1502 cos_data->data[entry].pri_join_mask |= 1504 cos_data->data[entry].pri_join_mask |=
1503 pri_tested; 1505 pri_tested;
@@ -1509,7 +1511,8 @@ static void bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params(
1509 b_found_strict = true; 1511 b_found_strict = true;
1510 cos_data->data[1].pri_join_mask |= pri_tested; 1512 cos_data->data[1].pri_join_mask |= pri_tested;
1511 /* If we join a group and one is strict 1513 /* If we join a group and one is strict
1512 * than the bw rulls */ 1514 * than the bw rules
1515 */
1513 cos_data->data[1].strict = 1516 cos_data->data[1].strict =
1514 BNX2X_DCBX_STRICT_COS_HIGHEST; 1517 BNX2X_DCBX_STRICT_COS_HIGHEST;
1515 } 1518 }
@@ -1838,7 +1841,7 @@ static void bnx2x_dcbx_fw_struct(struct bnx2x *bp,
1838 1841
1839void bnx2x_dcbx_pmf_update(struct bnx2x *bp) 1842void bnx2x_dcbx_pmf_update(struct bnx2x *bp)
1840{ 1843{
1841 /* if we need to syncronize DCBX result from prev PMF 1844 /* if we need to synchronize DCBX result from prev PMF
1842 * read it from shmem and update bp and netdev accordingly 1845 * read it from shmem and update bp and netdev accordingly
1843 */ 1846 */
1844 if (SHMEM2_HAS(bp, drv_flags) && 1847 if (SHMEM2_HAS(bp, drv_flags) &&
@@ -1932,14 +1935,14 @@ static void bnx2x_dcbnl_set_pg_tccfg_tx(struct net_device *netdev, int prio,
1932 return; 1935 return;
1933 1936
1934 /** 1937 /**
1935 * bw_pct ingnored - band-width percentage devision between user 1938 * bw_pct ignored - band-width percentage devision between user
1936 * priorities within the same group is not 1939 * priorities within the same group is not
1937 * standard and hence not supported 1940 * standard and hence not supported
1938 * 1941 *
1939 * prio_type igonred - priority levels within the same group are not 1942 * prio_type ignored - priority levels within the same group are not
1940 * standard and hence are not supported. According 1943 * standard and hence are not supported. According
1941 * to the standard pgid 15 is dedicated to strict 1944 * to the standard pgid 15 is dedicated to strict
1942 * prioirty traffic (on the port level). 1945 * priority traffic (on the port level).
1943 * 1946 *
1944 * up_map ignored 1947 * up_map ignored
1945 */ 1948 */
@@ -1984,14 +1987,14 @@ static void bnx2x_dcbnl_get_pg_tccfg_tx(struct net_device *netdev, int prio,
1984 DP(BNX2X_MSG_DCB, "prio = %d\n", prio); 1987 DP(BNX2X_MSG_DCB, "prio = %d\n", prio);
1985 1988
1986 /** 1989 /**
1987 * bw_pct ingnored - band-width percentage devision between user 1990 * bw_pct ignored - band-width percentage devision between user
1988 * priorities within the same group is not 1991 * priorities within the same group is not
1989 * standard and hence not supported 1992 * standard and hence not supported
1990 * 1993 *
1991 * prio_type igonred - priority levels within the same group are not 1994 * prio_type ignored - priority levels within the same group are not
1992 * standard and hence are not supported. According 1995 * standard and hence are not supported. According
1993 * to the standard pgid 15 is dedicated to strict 1996 * to the standard pgid 15 is dedicated to strict
1994 * prioirty traffic (on the port level). 1997 * priority traffic (on the port level).
1995 * 1998 *
1996 * up_map ignored 1999 * up_map ignored
1997 */ 2000 */