Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263901
b: refs/heads/master
c: c482e6c
h: refs/heads/master
i:
  263899: 0d1ff3b
v: v3
  • Loading branch information
Yaniv Rosner authored and David S. Miller committed Sep 15, 2011
1 parent 6868e64 commit 8b086f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31dda0ae933bb9fea9cfe000b698c41af0417cac
refs/heads/master: c482e6c064613b3fd40758ef6c33318462b83789
18 changes: 6 additions & 12 deletions trunk/drivers/net/bnx2x/bnx2x_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,9 @@ static int bnx2x_ets_e3b0_set_cos_bw(struct bnx2x *bp,
{
u32 nig_reg_adress_crd_weight = 0;
u32 pbf_reg_adress_crd_weight = 0;
/* Calculate and set BW for this COS*/
const u32 cos_bw_nig = (bw * min_w_val_nig) / total_bw;
const u32 cos_bw_pbf = (bw * min_w_val_pbf) / total_bw;
/* Calculate and set BW for this COS - use 1 instead of 0 for BW */
const u32 cos_bw_nig = ((bw ? bw : 1) * min_w_val_nig) / total_bw;
const u32 cos_bw_pbf = ((bw ? bw : 1) * min_w_val_pbf) / total_bw;

switch (cos_entry) {
case 0:
Expand Down Expand Up @@ -852,18 +852,12 @@ static int bnx2x_ets_e3b0_get_total_bw(
/* Calculate total BW requested */
for (cos_idx = 0; cos_idx < ets_params->num_of_cos; cos_idx++) {
if (bnx2x_cos_state_bw == ets_params->cos[cos_idx].state) {

if (0 == ets_params->cos[cos_idx].params.bw_params.bw) {
DP(NETIF_MSG_LINK, "bnx2x_ets_E3B0_config BW"
"was set to 0\n");
return -EINVAL;
*total_bw +=
ets_params->cos[cos_idx].params.bw_params.bw;
}
*total_bw +=
ets_params->cos[cos_idx].params.bw_params.bw;
}
}

/*Check taotl BW is valid */
/* Check total BW is valid */
if ((100 != *total_bw) || (0 == *total_bw)) {
if (0 == *total_bw) {
DP(NETIF_MSG_LINK, "bnx2x_ets_E3B0_config toatl BW"
Expand Down

0 comments on commit 8b086f4

Please sign in to comment.