aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManish Chopra <manish.chopra@qlogic.com>2016-07-25 12:07:46 -0400
committerDavid S. Miller <davem@davemloft.net>2016-07-26 00:41:19 -0400
commit59d3f1ceb69b54569685d0c34dff16a1e0816b19 (patch)
tree51dd53053148141129844bd5ef0b637a226dcab2
parentba66bbe5480a012108958a71cff88b23dce84956 (diff)
qed: Fix setting/clearing bit in completion bitmap
Slowpath completion handling is incorrectly changing SPQ_RING_SIZE bits instead of a single one. Fixes: 76a9a3642a0b ("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>
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_spq.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_spq.c b/drivers/net/ethernet/qlogic/qed/qed_spq.c
index 97ffeae262bb..d73456eab1d7 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_spq.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_spq.c
@@ -815,13 +815,12 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
815 * in a bitmap and increasing the chain consumer only 815 * in a bitmap and increasing the chain consumer only
816 * for the first successive completed entries. 816 * for the first successive completed entries.
817 */ 817 */
818 bitmap_set(p_spq->p_comp_bitmap, pos, SPQ_RING_SIZE); 818 __set_bit(pos, p_spq->p_comp_bitmap);
819 819
820 while (test_bit(p_spq->comp_bitmap_idx, 820 while (test_bit(p_spq->comp_bitmap_idx,
821 p_spq->p_comp_bitmap)) { 821 p_spq->p_comp_bitmap)) {
822 bitmap_clear(p_spq->p_comp_bitmap, 822 __clear_bit(p_spq->comp_bitmap_idx,
823 p_spq->comp_bitmap_idx, 823 p_spq->p_comp_bitmap);
824 SPQ_RING_SIZE);
825 p_spq->comp_bitmap_idx++; 824 p_spq->comp_bitmap_idx++;
826 qed_chain_return_produced(&p_spq->chain); 825 qed_chain_return_produced(&p_spq->chain);
827 } 826 }