summaryrefslogtreecommitdiff
path: root/drivers/scsi/be2iscsi/be_main.c
diff options
context:
space:
mode:
authorJitendra Bhivare <jitendra.bhivare@broadcom.com>2016-02-04 10:19:17 (GMT)
committerMartin K. Petersen <martin.petersen@oracle.com>2016-02-24 02:27:02 (GMT)
commit090e2184ba8fedff44b65e480d0f30229bb85621 (patch)
tree74349555eec0766a33678016b958801efee26b01 /drivers/scsi/be2iscsi/be_main.c
parent291fef26e0f85bd2c1f7152138fc3459e7a00ea1 (diff)
downloadlinux-090e2184ba8fedff44b65e480d0f30229bb85621.tar.xz
be2iscsi: Couple MCC tag and WRB alloc and free
WARN_ON(atomic_read(&mccq->used) >= mccq->len) seen when FW gets into UE. MCCQ overflow is happening because driver discards any new request and frees up the tag. The tag allocation controls the number of MCC WRB posted. It is being replenished but WRBs are not hence the WARN_ON. Allocation and freeing of WRB and tags for MCC is now done in one place. This helps to achieve proper accounting of WRB indices and MCC tags. Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/be2iscsi/be_main.c')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index dfc2ee9..3f08a11 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -2047,7 +2047,6 @@ void beiscsi_process_mcc_cq(struct beiscsi_hba *phba)
beiscsi_process_async_event(phba, mcc_compl);
} else if (mcc_compl->flags & CQE_FLAGS_COMPLETED_MASK) {
beiscsi_process_mcc_compl(&phba->ctrl, mcc_compl);
- atomic_dec(&phba->ctrl.mcc_obj.q.used);
}
mcc_compl->flags = 0;
@@ -5245,7 +5244,7 @@ static int beiscsi_bsg_request(struct bsg_job *job)
extd_status = (phba->ctrl.mcc_tag_status[tag] &
CQE_STATUS_ADDL_MASK) >> CQE_STATUS_ADDL_SHIFT;
status = phba->ctrl.mcc_tag_status[tag] & CQE_STATUS_MASK;
- free_mcc_tag(&phba->ctrl, tag);
+ free_mcc_wrb(&phba->ctrl, tag);
resp = (struct be_cmd_resp_hdr *)nonemb_cmd.va;
sg_copy_from_buffer(job->reply_payload.sg_list,
job->reply_payload.sg_cnt,