Skip to content

Commit

Permalink
[SCSI] bnx2fc: Do not arm CQ when there are no CQEs
Browse files Browse the repository at this point in the history
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Bhanu Prakash Gollapudi authored and James Bottomley committed Jul 28, 2011
1 parent bd4d5de commit fd08bd6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/scsi/bnx2fc/bnx2fc_hwi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,8 +1070,10 @@ int bnx2fc_process_new_cqes(struct bnx2fc_rport *tgt)
1 - tgt->cq_curr_toggle_bit;
}
}
bnx2fc_arm_cq(tgt);
atomic_add(num_free_sqes, &tgt->free_sqes);
if (num_free_sqes) {
bnx2fc_arm_cq(tgt);
atomic_add(num_free_sqes, &tgt->free_sqes);
}
spin_unlock_bh(&tgt->cq_lock);
return 0;
}
Expand Down

0 comments on commit fd08bd6

Please sign in to comment.