From patchwork Thu May 5 18:48:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 12840022 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 1FAD2C433F5 for ; Thu, 5 May 2022 18:44:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383527AbiEESro (ORCPT ); Thu, 5 May 2022 14:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384651AbiEESrV (ORCPT ); Thu, 5 May 2022 14:47:21 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D8ED606CD for ; Thu, 5 May 2022 11:37:51 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id o69so4956060pjo.3 for ; Thu, 05 May 2022 11:37:51 -0700 (PDT) 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=87P4GGNrbFYwrgAteETtzuNfoSgkZbvBxXYnS7QSs4I=; b=F965xnfWU7KY1pQVEQTeWXctWSYz+7G0iwvTDHSRSC9j5QPyWNa+0gwInLMjCQdJfI ezNsylloYmPWYZpYxhJeQO/QQ2+JxPFn2Kp8v9ISSEwvd7JnCdUIcfw2NMfP3tXTpVRr J4ktFeAD8Zu/KCkijw74SjsrggS5DaErJuOnQ= 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=87P4GGNrbFYwrgAteETtzuNfoSgkZbvBxXYnS7QSs4I=; b=f+lw4Goku7DUNI77amAHr02o14nw4tO/G7SMrTWySmpzCAniYVxAalnLShETpBH37/ eIs1lxag34zRmbSdnxHwl4YxqNKNtmvqPl7rNEG8fvolVRVpgUuzmt1TDRVi/kKll2m9 Zw/9j79Avb/VN1Z8XCqD7CGAvmOBllEVnIijmkRuI4WYGUJ6sgeYBuetgfivwiP6Xwx8 1kdrl48gsuoB9LXN+LOR4lq3VASWr5QedFPuMDjdIZ6Bj6tzmhgCgtJ6GAyiLvgMVYkY 2xyNgGs6FHOPZdTRv9//714WN5LhSPOT8NbgLS0NllIHCPq2SoBIyDwRZNq0i/8Sm3of QsOQ== X-Gm-Message-State: AOAM531vm02vQU7g06dcQ7OUnmrvNCnwVWZQUTLy7jZmASi7HoP86sMV 3AiIBIr+yCrdMmE6wiAON8Xro13zmDIbm5XTlpc2fuAryBGSYrmB8pHlD+i+/pzClvEhSDeb9l6 blq8blyqdRPowb2YvQQguyltnmMDEfpe0Cjly9PEplEjvcD/t3mMotWdF+ZZy/M8Z/TAuawJ9sM dy+gH1Ukp+u8I= X-Google-Smtp-Source: ABdhPJxbu9XnR9KxxgCY+8sg1nFXbUoi/H3CobM6WIWAyZC1XQ59yeqEN2vOSkF1FVxpuzV5Y3dfbw== X-Received: by 2002:a17:90b:245:b0:1dc:1597:20e with SMTP id fz5-20020a17090b024500b001dc1597020emr7695975pjb.151.1651775870295; Thu, 05 May 2022 11:37:50 -0700 (PDT) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 4-20020a170902c24400b0015edb22aba1sm1696166plg.270.2022.05.05.11.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 May 2022 11:37:49 -0700 (PDT) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, Sreekanth Reddy Subject: [PATCH] mpi3mr: Increase IO timeout value to 60s Date: Fri, 6 May 2022 00:18:08 +0530 Message-Id: <20220505184808.24049-3-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220505184808.24049-1-sreekanth.reddy@broadcom.com> References: <20220505184808.24049-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Set each SCSI device's default IO timeout and default error handling IO timeout to 60s. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr.h | 3 +++ drivers/scsi/mpi3mr/mpi3mr_os.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h index 8612b66..584659e 100644 --- a/drivers/scsi/mpi3mr/mpi3mr.h +++ b/drivers/scsi/mpi3mr/mpi3mr.h @@ -124,6 +124,9 @@ extern atomic64_t event_counter; #define MPI3MR_WATCHDOG_INTERVAL 1000 /* in milli seconds */ +#define MPI3MR_SCMD_TIMEOUT (60 * HZ) +#define MPI3MR_EH_SCMD_TIMEOUT (60 * HZ) + /* Internal admin command state definitions*/ #define MPI3MR_CMD_NOTUSED 0x8000 #define MPI3MR_CMD_COMPLETE 0x0001 diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 5ba490c..f5c345d 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -3727,6 +3727,10 @@ static int mpi3mr_slave_configure(struct scsi_device *sdev) return -ENXIO; mpi3mr_change_queue_depth(sdev, tgt_dev->q_depth); + + sdev->eh_timeout = MPI3MR_EH_SCMD_TIMEOUT; + blk_queue_rq_timeout(sdev->request_queue, MPI3MR_SCMD_TIMEOUT); + switch (tgt_dev->dev_type) { case MPI3_DEVICE_DEVFORM_PCIE: /*The block layer hw sector size = 512*/