提交 c54e9bd3 编写于 作者: D Dmitry Kravkov 提交者: David S. Miller

bnx2x: fix vector traveling while looking for an empty entry

Fixes the bug that may prevent from mac to be configured,
while there is an empty slot for it.
Reported-by: NMaciej Żenczykowski <zenczykowski@gmail.com>
Signed-off-by: NDmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 452427b0
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册