From fd08bd622d255252095a7d5b20b8305916c6f64e Mon Sep 17 00:00:00 2001 From: Bhanu Prakash Gollapudi Date: Wed, 27 Jul 2011 11:32:11 -0700 Subject: [SCSI] bnx2fc: Do not arm CQ when there are no CQEs Signed-off-by: Bhanu Prakash Gollapudi Signed-off-by: James Bottomley --- drivers/scsi/bnx2fc/bnx2fc_hwi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/scsi/bnx2fc') diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c index 9f38c5725b8..357a63d192e 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c +++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c @@ -1070,8 +1070,10 @@ unlock: 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; } -- cgit v1.2.3-70-g09d2