Skip to content

Commit d373163

Browse files
cp890582martinkpetersen
authored andcommitted
scsi: mpi3mr: Read missing IOCFacts flag for reply queue full overflow
The driver was not reading the MAX_REQ_PER_REPLY_QUEUE_LIMIT IOCFacts flag, so the reply-queue-full handling was never enabled, even on firmware that supports it. Reading this flag enables the feature and prevents reply queue overflow. Fixes: f08b24d ("scsi: mpi3mr: Avoid reply queue full condition") Cc: stable@vger.kernel.org Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com> Link: https://patch.msgid.link/20251211002929.22071-1-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 1f7d6e2 commit d373163

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/scsi/mpi3mr/mpi/mpi30_ioc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ struct mpi3_ioc_facts_data {
166166
#define MPI3_IOCFACTS_FLAGS_SIGNED_NVDATA_REQUIRED (0x00010000)
167167
#define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_MASK (0x0000ff00)
168168
#define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT (8)
169+
#define MPI3_IOCFACTS_FLAGS_MAX_REQ_PER_REPLY_QUEUE_LIMIT (0x00000040)
169170
#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_MASK (0x00000030)
170171
#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_SHIFT (4)
171172
#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_NOT_STARTED (0x00000000)

drivers/scsi/mpi3mr/mpi3mr_fw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3158,6 +3158,8 @@ static void mpi3mr_process_factsdata(struct mpi3mr_ioc *mrioc,
31583158
mrioc->facts.dma_mask = (facts_flags &
31593159
MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_MASK) >>
31603160
MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT;
3161+
mrioc->facts.max_req_limit = (facts_flags &
3162+
MPI3_IOCFACTS_FLAGS_MAX_REQ_PER_REPLY_QUEUE_LIMIT);
31613163
mrioc->facts.protocol_flags = facts_data->protocol_flags;
31623164
mrioc->facts.mpi_version = le32_to_cpu(facts_data->mpi_version.word);
31633165
mrioc->facts.max_reqs = le16_to_cpu(facts_data->max_outstanding_requests);

0 commit comments

Comments
 (0)