Skip to content

Commit 243bcc8

Browse files
sreekanthbrcmmartinkpetersen
authored andcommitted
scsi: mpi3mr: Fixes around reply request queues
Set reply queue depth of 1K for B0 and 4K for A0. While freeing the segmented request queues use the actual queue depth that is used while creating them. Link: https://lore.kernel.org/r/20211220141159.16117-25-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent a91603a commit 243bcc8

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

drivers/scsi/mpi3mr/mpi3mr.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ extern int prot_mask;
8080

8181
/* Operational queue management definitions */
8282
#define MPI3MR_OP_REQ_Q_QD 512
83-
#define MPI3MR_OP_REP_Q_QD 4096
83+
#define MPI3MR_OP_REP_Q_QD 1024
84+
#define MPI3MR_OP_REP_Q_QD4K 4096
8485
#define MPI3MR_OP_REQ_Q_SEG_SIZE 4096
8586
#define MPI3MR_OP_REP_Q_SEG_SIZE 4096
8687
#define MPI3MR_MAX_SEG_LIST_SIZE 4096

drivers/scsi/mpi3mr/mpi3mr_fw.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1523,7 +1523,7 @@ static void mpi3mr_free_op_req_q_segments(struct mpi3mr_ioc *mrioc, u16 q_idx)
15231523
mrioc->op_reply_qinfo[q_idx].q_segment_list = NULL;
15241524
}
15251525
} else
1526-
size = mrioc->req_qinfo[q_idx].num_requests *
1526+
size = mrioc->req_qinfo[q_idx].segment_qd *
15271527
mrioc->facts.op_req_sz;
15281528

15291529
for (j = 0; j < mrioc->req_qinfo[q_idx].num_segments; j++) {
@@ -1810,6 +1810,8 @@ static int mpi3mr_create_op_reply_q(struct mpi3mr_ioc *mrioc, u16 qidx)
18101810

18111811
reply_qid = qidx + 1;
18121812
op_reply_q->num_replies = MPI3MR_OP_REP_Q_QD;
1813+
if (!mrioc->pdev->revision)
1814+
op_reply_q->num_replies = MPI3MR_OP_REP_Q_QD4K;
18131815
op_reply_q->ci = 0;
18141816
op_reply_q->ephase = 1;
18151817
atomic_set(&op_reply_q->pend_ios, 0);

0 commit comments

Comments
 (0)