* [PATCH] mpi3mr: Read missing IOCFacts flag for reply queue full overflow
@ 2025-12-11 0:29 Chandrakanth Patil
2025-12-17 3:40 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Chandrakanth Patil @ 2025-12-11 0:29 UTC (permalink / raw)
To: linux-scsi; +Cc: sathya.prakash, ranjan.kumar, Chandrakanth Patil, stable
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: f08b24d82749 ("scsi: mpi3mr: Avoid reply queue full condition")
Cc: stable@vger.kernel.org
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
---
drivers/scsi/mpi3mr/mpi/mpi30_ioc.h | 1 +
drivers/scsi/mpi3mr/mpi3mr_fw.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h b/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h
index b42933fcd423..6561f98c3cb2 100644
--- a/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h
+++ b/drivers/scsi/mpi3mr/mpi/mpi30_ioc.h
@@ -166,6 +166,7 @@ struct mpi3_ioc_facts_data {
#define MPI3_IOCFACTS_FLAGS_SIGNED_NVDATA_REQUIRED (0x00010000)
#define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_MASK (0x0000ff00)
#define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT (8)
+#define MPI3_IOCFACTS_FLAGS_MAX_REQ_PER_REPLY_QUEUE_LIMIT (0x00000040)
#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_MASK (0x00000030)
#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_SHIFT (4)
#define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_NOT_STARTED (0x00000000)
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index 8fe6e0bf342e..8c4bb7169a87 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -3158,6 +3158,8 @@ static void mpi3mr_process_factsdata(struct mpi3mr_ioc *mrioc,
mrioc->facts.dma_mask = (facts_flags &
MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_MASK) >>
MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT;
+ mrioc->facts.max_req_limit = (facts_flags &
+ MPI3_IOCFACTS_FLAGS_MAX_REQ_PER_REPLY_QUEUE_LIMIT);
mrioc->facts.protocol_flags = facts_data->protocol_flags;
mrioc->facts.mpi_version = le32_to_cpu(facts_data->mpi_version.word);
mrioc->facts.max_reqs = le16_to_cpu(facts_data->max_outstanding_requests);
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mpi3mr: Read missing IOCFacts flag for reply queue full overflow
2025-12-11 0:29 [PATCH] mpi3mr: Read missing IOCFacts flag for reply queue full overflow Chandrakanth Patil
@ 2025-12-17 3:40 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2025-12-17 3:40 UTC (permalink / raw)
To: linux-scsi, Chandrakanth Patil
Cc: Martin K . Petersen, sathya.prakash, ranjan.kumar, stable
On Thu, 11 Dec 2025 05:59:29 +0530, Chandrakanth Patil wrote:
> 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
>
>
Applied to 6.19/scsi-fixes, thanks!
[1/1] mpi3mr: Read missing IOCFacts flag for reply queue full overflow
https://git.kernel.org/mkp/scsi/c/d37316319498
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-17 3:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-11 0:29 [PATCH] mpi3mr: Read missing IOCFacts flag for reply queue full overflow Chandrakanth Patil
2025-12-17 3:40 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox