Skip to content

Commit 59d3f1c

Browse files
Manish Chopradavem330
authored andcommitted
qed: Fix setting/clearing bit in completion bitmap
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>
1 parent ba66bbe commit 59d3f1c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/net/ethernet/qlogic/qed/qed_spq.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -815,13 +815,12 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
815815
* in a bitmap and increasing the chain consumer only
816816
* for the first successive completed entries.
817817
*/
818-
bitmap_set(p_spq->p_comp_bitmap, pos, SPQ_RING_SIZE);
818+
__set_bit(pos, p_spq->p_comp_bitmap);
819819

820820
while (test_bit(p_spq->comp_bitmap_idx,
821821
p_spq->p_comp_bitmap)) {
822-
bitmap_clear(p_spq->p_comp_bitmap,
823-
p_spq->comp_bitmap_idx,
824-
SPQ_RING_SIZE);
822+
__clear_bit(p_spq->comp_bitmap_idx,
823+
p_spq->p_comp_bitmap);
825824
p_spq->comp_bitmap_idx++;
826825
qed_chain_return_produced(&p_spq->chain);
827826
}

0 commit comments

Comments
 (0)