From patchwork Mon Dec 20 14:11:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 12687957 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7186DC433F5 for ; Mon, 20 Dec 2021 14:04:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233448AbhLTOEY (ORCPT ); Mon, 20 Dec 2021 09:04:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233445AbhLTOEV (ORCPT ); Mon, 20 Dec 2021 09:04:21 -0500 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9BCEC061574 for ; Mon, 20 Dec 2021 06:04:20 -0800 (PST) Received: by mail-pl1-x62c.google.com with SMTP id x15so7806719plg.1 for ; Mon, 20 Dec 2021 06:04:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=E8SKM0GuzfjjpX7cd+/mVCJWJgjh00csaRPJLamdcVQ=; b=TKf6nCrXR8a1p33Do78o8Rhgmm63Gg1vm3JzPZFAm1H184/GKiPacLyoubowI2Lw5P a+IEHdSwsxnpMqKpG9CUEV2UehiX1VD/o1ayBkh4uiWKxxiREps5dyzfa1lCLESaPyrn uRwttyZ7Gqig1EBnyFxDSVv5izBDbFXO5zuyM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=E8SKM0GuzfjjpX7cd+/mVCJWJgjh00csaRPJLamdcVQ=; b=SilycsU4pnN5i9Ugha/ygfIPONVd9FC05OgDs4ATu8OrhY/Dfw0i9wdhuANUbArqzY kz306S84p8KnR733Y8ix5o36AX0iyaAbiKlu17h0tSaYjtVCf96ZaKekFIpOMYehjaCV 2/UnDa74TJ1dSA49w6kcsSbGQav6/09Q0t8Dcc5jisP5JLWvC9JRf4vJ2ZQqNLRoAg82 g4/h/SkqYhgquKmU7sdOcGRqor7IZveNuncGTlN7Y+M5bzHBZmBEV8Fcb/fStG0YvWaZ naVTF7ToKyX4VvemBBprf5/jwEBRbFFHKZMXt7UKkM0rDPXbkR7QgqRD91q5xPbXilO5 upGA== X-Gm-Message-State: AOAM530GkWD/LNYkbH5mHjy6HyzUWRedTN230RevBbzKkASl/WF4HPch cvKocOURjOgN5iKvSgdvYgsNhqQLagIAr718PgyghkC9FOkDIStSkurZXzoJDKkgI7F1XyzP2QM Fqw9b+tA35WGDEcOjvS/b1oTv1xw7giqEO52Mn2HTAVdVBE6E9JdobXgKL3io04HfaAQ5wLOJVc s12tqwRhqr X-Google-Smtp-Source: ABdhPJzmdRhIJp/8hqgvlaFgb4kXHeTINQPnWzWyIa219zgumLd+56fmqlq/VL5HdLki1RBmZAcymQ== X-Received: by 2002:a17:902:b197:b0:148:a2e8:2c59 with SMTP id s23-20020a170902b19700b00148a2e82c59mr16848482plr.168.1640009059852; Mon, 20 Dec 2021 06:04:19 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id b4sm5434180pjm.17.2021.12.20.06.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Dec 2021 06:04:18 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 08/25] mpi3mr: Increase internal cmnds timeout to 60s Date: Mon, 20 Dec 2021 19:41:42 +0530 Message-Id: <20211220141159.16117-9-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211220141159.16117-1-sreekanth.reddy@broadcom.com> References: <20211220141159.16117-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org - Increase internal command timeouts to 60 seconds, - Enabled 16 device removal handshake processing in parallel in the device removal handshake infrastructure. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr.h | 8 ++++---- drivers/scsi/mpi3mr/mpi3mr_os.c | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h index fe3cfd5..fdbedf2 100644 --- a/drivers/scsi/mpi3mr/mpi3mr.h +++ b/drivers/scsi/mpi3mr/mpi3mr.h @@ -91,7 +91,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) @@ -102,10 +102,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 diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 2fe7fcb..e961bb2 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -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); @@ -3597,6 +3599,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), };