Skip to content

Commit

Permalink
bnx2x: fix vector traveling while looking for an empty entry
Browse files Browse the repository at this point in the history
Fixes the bug that may prevent from mac to be configured,
while there is an empty slot for it.

Reported-by: Maciej Żenczykowski <zenczykowski@gmail.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dmitry Kravkov authored and David S. Miller committed Mar 28, 2012
1 parent 452427b commit c54e9bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3847,7 +3847,7 @@ static bool bnx2x_credit_pool_get_entry(
continue;

/* If we've got here we are going to find a free entry */
for (idx = vec * BNX2X_POOL_VEC_SIZE, i = 0;
for (idx = vec * BIT_VEC64_ELEM_SZ, i = 0;
i < BIT_VEC64_ELEM_SZ; idx++, i++)

if (BIT_VEC64_TEST_BIT(o->pool_mirror, idx)) {
Expand Down

0 comments on commit c54e9bd

Please sign in to comment.