Skip to content

Commit

Permalink
qed: Fix setting/clearing bit in completion bitmap
Browse files Browse the repository at this point in the history
Slowpath completion handling is incorrectly changing
SPQ_RING_SIZE bits instead of a single one.

Fixes: 76a9a36 ("qed: fix handling of concurrent ramrods")
Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Manish Chopra authored and David S. Miller committed Jul 26, 2016
1 parent ba66bbe commit 59d3f1c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/ethernet/qlogic/qed/qed_spq.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,13 +815,12 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
* in a bitmap and increasing the chain consumer only
* for the first successive completed entries.
*/
bitmap_set(p_spq->p_comp_bitmap, pos, SPQ_RING_SIZE);
__set_bit(pos, p_spq->p_comp_bitmap);

while (test_bit(p_spq->comp_bitmap_idx,
p_spq->p_comp_bitmap)) {
bitmap_clear(p_spq->p_comp_bitmap,
p_spq->comp_bitmap_idx,
SPQ_RING_SIZE);
__clear_bit(p_spq->comp_bitmap_idx,
p_spq->p_comp_bitmap);
p_spq->comp_bitmap_idx++;
qed_chain_return_produced(&p_spq->chain);
}
Expand Down

0 comments on commit 59d3f1c

Please sign in to comment.