Commit 59d3f1ce authored by Manish Chopra's avatar Manish Chopra Committed by David S. Miller

qed: Fix setting/clearing bit in completion bitmap

Slowpath completion handling is incorrectly changing
SPQ_RING_SIZE bits instead of a single one.

Fixes: 76a9a364 ("qed: fix handling of concurrent ramrods")
Signed-off-by: default avatarManish Chopra <manish.chopra@qlogic.com>
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ba66bbe5
...@@ -815,13 +815,12 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn, ...@@ -815,13 +815,12 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
* in a bitmap and increasing the chain consumer only * in a bitmap and increasing the chain consumer only
* for the first successive completed entries. * 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, while (test_bit(p_spq->comp_bitmap_idx,
p_spq->p_comp_bitmap)) { p_spq->p_comp_bitmap)) {
bitmap_clear(p_spq->p_comp_bitmap, __clear_bit(p_spq->comp_bitmap_idx,
p_spq->comp_bitmap_idx, p_spq->p_comp_bitmap);
SPQ_RING_SIZE);
p_spq->comp_bitmap_idx++; p_spq->comp_bitmap_idx++;
qed_chain_return_produced(&p_spq->chain); qed_chain_return_produced(&p_spq->chain);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment