]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
scsi: mpi3mr: Increase internal cmnds timeout to 60s
authorSreekanth Reddy <sreekanth.reddy@broadcom.com>
Mon, 20 Dec 2021 14:11:42 +0000 (19:41 +0530)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 10:00:27 +0000 (12:00 +0200)
BugLink: https://bugs.launchpad.net/bugs/1967116
 - Increase internal command timeout to 60 seconds.

 - Enable 16 device removal handshake processing in parallel in the device
   removal handshake infrastructure.

Link: https://lore.kernel.org/r/20211220141159.16117-9-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 4f08b9637f639fed9c36fde4e238274c47ca5f53)
Signed-off-by: Jeff Lane <jeffrey.lane@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/scsi/mpi3mr/mpi3mr.h
drivers/scsi/mpi3mr/mpi3mr_os.c

index 034f3fab286f3732fc47d40a95262ce9c2d690ec..ff4382ed493de11c2966422cdf484beb1882bf2a 100644 (file)
@@ -92,7 +92,7 @@ extern int prot_mask;
 #define MPI3MR_HOSTTAG_IOCTLCMDS       2
 #define MPI3MR_HOSTTAG_BLK_TMS         5
 
-#define MPI3MR_NUM_DEVRMCMD            1
+#define MPI3MR_NUM_DEVRMCMD            16
 #define MPI3MR_HOSTTAG_DEVRMCMD_MIN    (MPI3MR_HOSTTAG_BLK_TMS + 1)
 #define MPI3MR_HOSTTAG_DEVRMCMD_MAX    (MPI3MR_HOSTTAG_DEVRMCMD_MIN + \
                                                MPI3MR_NUM_DEVRMCMD - 1)
@@ -103,10 +103,10 @@ extern int prot_mask;
 #define MPI3MR_HOST_IOS_KDUMP          128
 
 /* command/controller interaction timeout definitions in seconds */
-#define MPI3MR_INTADMCMD_TIMEOUT               10
+#define MPI3MR_INTADMCMD_TIMEOUT               60
 #define MPI3MR_PORTENABLE_TIMEOUT              300
-#define MPI3MR_ABORTTM_TIMEOUT                 30
-#define MPI3MR_RESETTM_TIMEOUT                 30
+#define MPI3MR_ABORTTM_TIMEOUT                 60
+#define MPI3MR_RESETTM_TIMEOUT                 60
 #define MPI3MR_RESET_HOST_IOWAIT_TIMEOUT       5
 #define MPI3MR_TSUPDATE_INTERVAL               900
 #define MPI3MR_DEFAULT_SHUTDOWN_TIME           120
index adb36c861864356f976fff69c3483b78f61c91aa..c6f7c2508e5a91a1036b53b26f43fe739291e381 100644 (file)
@@ -877,9 +877,11 @@ static void mpi3mr_update_tgtdev(struct mpi3mr_ioc *mrioc,
                            le32_to_cpu(pcieinf->maximum_data_transfer_size);
                        tgtdev->dev_spec.pcie_inf.pgsz = pcieinf->page_size;
                        tgtdev->dev_spec.pcie_inf.reset_to =
-                           pcieinf->controller_reset_to;
+                           max_t(u8, pcieinf->controller_reset_to,
+                            MPI3MR_INTADMCMD_TIMEOUT);
                        tgtdev->dev_spec.pcie_inf.abort_to =
-                           pcieinf->nvme_abort_to;
+                           max_t(u8, pcieinf->nvme_abort_to,
+                           MPI3MR_INTADMCMD_TIMEOUT);
                }
                if (tgtdev->dev_spec.pcie_inf.mdts > (1024 * 1024))
                        tgtdev->dev_spec.pcie_inf.mdts = (1024 * 1024);
@@ -3599,6 +3601,7 @@ static struct scsi_host_template mpi3mr_driver_template = {
         */
        .max_sectors                    = 2048,
        .cmd_per_lun                    = MPI3MR_MAX_CMDS_LUN,
+       .max_segment_size               = 0xffffffff,
        .track_queue_depth              = 1,
        .cmd_size                       = sizeof(struct scmd_priv),
 };