]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scsi: mpi3mr: Read missing IOCFacts flag for reply queue full overflow
authorChandrakanth Patil <chandrakanth.patil@broadcom.com>
Thu, 11 Dec 2025 00:29:29 +0000 (05:59 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:14:19 +0000 (10:14 +0100)
commit d373163194982f43b92c552c138c29d9f0b79553 upstream.

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>
Link: https://patch.msgid.link/20251211002929.22071-1-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/mpi3mr/mpi/mpi30_ioc.h
drivers/scsi/mpi3mr/mpi3mr_fw.c

index c374867f9ba0884a03b467c860b47d2c7735c2d1..e19fd2f911490d14fa906c213458aaec4c82bc17 100644 (file)
@@ -160,6 +160,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_NOT_STARTED   (0x00000000)
 #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_IN_PROGRESS   (0x00000010)
index acb2f7b04fb8f9ff05e9d693f3a5771bf27c05ec..4198830bf10b7f42445a17fb9f0f2348c7cb6d83 100644 (file)
@@ -3135,6 +3135,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);