diff options
author | Bhanu Prakash Gollapudi <bprakash@broadcom.com> | 2011-07-27 14:32:11 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-07-28 04:00:33 -0400 |
commit | fd08bd622d255252095a7d5b20b8305916c6f64e (patch) | |
tree | c69f12d4e6268e5135c91d98020dac9f63e904cd /drivers/scsi | |
parent | bd4d5de8b9b97ff100342948c39634b44c43fe81 (diff) |
[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')
-rw-r--r-- | drivers/scsi/bnx2fc/bnx2fc_hwi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c index 9f38c5725b86..357a63d192e2 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c +++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c | |||
@@ -1070,8 +1070,10 @@ unlock: | |||
1070 | 1 - tgt->cq_curr_toggle_bit; | 1070 | 1 - tgt->cq_curr_toggle_bit; |
1071 | } | 1071 | } |
1072 | } | 1072 | } |
1073 | bnx2fc_arm_cq(tgt); | 1073 | if (num_free_sqes) { |
1074 | atomic_add(num_free_sqes, &tgt->free_sqes); | 1074 | bnx2fc_arm_cq(tgt); |
1075 | atomic_add(num_free_sqes, &tgt->free_sqes); | ||
1076 | } | ||
1075 | spin_unlock_bh(&tgt->cq_lock); | 1077 | spin_unlock_bh(&tgt->cq_lock); |
1076 | return 0; | 1078 | return 0; |
1077 | } | 1079 | } |