summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/bnx2fc
diff options
context:
space:
mode:
authorBhanu Prakash Gollapudi <bprakash@broadcom.com>2011-07-27 11:32:11 -0700
committerJames Bottomley <JBottomley@Parallels.com>2011-07-28 12:00:33 +0400
commitfd08bd622d255252095a7d5b20b8305916c6f64e (patch)
treec69f12d4e6268e5135c91d98020dac9f63e904cd /drivers/scsi/bnx2fc
parentbd4d5de8b9b97ff100342948c39634b44c43fe81 (diff)
downloadop-kernel-dev-fd08bd622d255252095a7d5b20b8305916c6f64e.zip
op-kernel-dev-fd08bd622d255252095a7d5b20b8305916c6f64e.tar.gz
[SCSI] bnx2fc: Do not arm CQ when there are no CQEs
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bnx2fc')
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_hwi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 9f38c57..357a63d 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;
}
OpenPOWER on IntegriCloud