From patchwork Fri Apr 6 09:02:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shivasharan Srikanteshwara X-Patchwork-Id: 10325789 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1672D60541 for ; Fri, 6 Apr 2018 09:02:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0755D284BD for ; Fri, 6 Apr 2018 09:02:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF8A02889A; Fri, 6 Apr 2018 09:02:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98616284BD for ; Fri, 6 Apr 2018 09:02:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751722AbeDFJCd (ORCPT ); Fri, 6 Apr 2018 05:02:33 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:38101 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751705AbeDFJCc (ORCPT ); Fri, 6 Apr 2018 05:02:32 -0400 Received: by mail-qk0-f194.google.com with SMTP id 132so404314qkd.5 for ; Fri, 06 Apr 2018 02:02:32 -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; bh=u/xDNQxMmx4RPVqKAGeme/vZga4GmstQBsaEUpvvfyc=; b=NTcgAJfCeNMoxkdy0Nm3ZAU69ZUr0oZ6LztAGHxjog6UMeZypxSIPuCRPjXvATyzq2 EesHEe6Pj3KnLXxRlnydxO9rXyiYyejGLqgSeIyDDXXyQ54G9dd11WXxZxYWveh/OLaW fcG1+SKnDOVaiLclWKPDe5nfUGCFSunhFcDqo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=u/xDNQxMmx4RPVqKAGeme/vZga4GmstQBsaEUpvvfyc=; b=UOQWn7EMM9mn0yzCByeYt3poo0A/sX5Ik32DAZ3vkChiqXYC+AAkiFhvO0GRZiK5tl ETYtFK/PpiKv+NqquSE6b627RVU0SHWVcLce3fWqynvyXNhLyxSvjgdzcEJg4f4pmH+h xkiNBcwjd7/nDOu3nTyr+D+/wCBmh0vMrwuHDB6vsK1AP9aoA6iDRgNrxgTDbybeQiG+ QfaQrgfVlDBOdcts4Bcs9+1Hs8PvRDBLyirRl3wh4euIqgQFq9wKXdHJQ2GNdcXH//Lr Su60J5Hq0o4Vbecbi9VonBx5l9DR6HnDM1AP4Qd8L+c2rG07qmRjCGaj3EfwsPfXkG2C OFCA== X-Gm-Message-State: ALQs6tDQi8H3jNEGTdF1Q+Mq0DBY2HjRrtrUe0DwR87eRHwr67CSkBIW FuEEPTXdEjQoURIifgJ9zibFWen0 X-Google-Smtp-Source: AIpwx4+9QkFL/rugYitlVC4pgNXXWWYaviPJ8DgXXCgJRj8k/1/KsDLF9mNkjhBKIToce4SeuhyXsw== X-Received: by 10.55.203.8 with SMTP id d8mr35355758qkj.95.1523005351389; Fri, 06 Apr 2018 02:02:31 -0700 (PDT) Received: from dhcp-135-24-192-142.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id s184sm6927475qkb.23.2018.04.06.02.02.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Apr 2018 02:02:30 -0700 (PDT) From: Shivasharan S To: linux-scsi@vger.kernel.org Cc: kashyap.desai@broadcom.com, sumit.saxena@broadcom.com, Shivasharan S Subject: [PATCH 2/3] megaraid_sas: Increase timeout by 1 sec for non-RAID fastpath IOs Date: Fri, 6 Apr 2018 02:02:11 -0700 Message-Id: <1523005332-1375-3-git-send-email-shivasharan.srikanteshwara@broadcom.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1523005332-1375-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> References: <1523005332-1375-1-git-send-email-shivasharan.srikanteshwara@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Problem description: Hardware could timeout Fastpath IOs one second earlier than the timeout provided by the host. For non-RAID devices, driver provides timeout value based on OS provided timeout value. Under certain scenarios, if the OS provides a timeout value of 1 second, due to above behavior hardware will timeout immediately. Fix: Increase timeout value for non-RAID fastpath IOs by 1second. Signed-off-by: Shivasharan S --- drivers/scsi/megaraid/megaraid_sas_fusion.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index 57da0acae986..c2ad37d483a2 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -2998,6 +2998,9 @@ megasas_build_syspd_fusion(struct megasas_instance *instance, pRAID_Context->timeout_value = cpu_to_le16(os_timeout_value); pRAID_Context->virtual_disk_tgt_id = cpu_to_le16(device_id); } else { + if (os_timeout_value) + os_timeout_value++; + /* system pd Fast Path */ io_request->Function = MPI2_FUNCTION_SCSI_IO_REQUEST; timeout_limit = (scmd->device->type == TYPE_DISK) ?