From patchwork Mon May 7 06:53:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ching Huang X-Patchwork-Id: 10383295 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 F38CD60159 for ; Mon, 7 May 2018 06:53:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2F3827D29 for ; Mon, 7 May 2018 06:53:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D5F1A28B30; Mon, 7 May 2018 06:53:46 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, 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 7E3B827D29 for ; Mon, 7 May 2018 06:53:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750904AbeEGGxo (ORCPT ); Mon, 7 May 2018 02:53:44 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35104 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbeEGGxn (ORCPT ); Mon, 7 May 2018 02:53:43 -0400 Received: by mail-pf0-f194.google.com with SMTP id x9so2935644pfm.2 for ; Sun, 06 May 2018 23:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=areca-com-tw.20150623.gappssmtp.com; s=20150623; h=subject:from:to:cc:date:message-id:mime-version :content-transfer-encoding; bh=jLYSkQM7wCaQRxB/kU+APM3UGesrO+At+pews8e4cMo=; b=c2oje0Fy3UESm2XEBf0V4j8qN8+pQeTGq1ckbjvnY3cIMg3GWuv/xKA35NOwdw/DSh Ma+ztap5yPd6i0BVEPqX/aEqVvnzdXvI9+cJHnKi8qGH0o4I0Z0ph+Zzr4vOImPyK6Zw LRpJD/O5gJDvLVsxzdxlPq3evNr9PrpxRngGjlYwREpjPM2mdj6g6Pw2MsMVupa9EZcE rAOz4fwR2D4GhtN35TAtggLh8Zs/gZWAR1/HnFaRidWPWGZDEXGcfTu6oP7baJ+hoCoI jd1wlFzJ248KoyvH3RZkSDzicil8+Wnyboa/5W5rqVDVCR50od9qG7qO1sa6+Na8YO5i 3U1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:date:message-id:mime-version :content-transfer-encoding; bh=jLYSkQM7wCaQRxB/kU+APM3UGesrO+At+pews8e4cMo=; b=eBOhmK7hTH6v3MCqjwuH4qdP8dJ6sD0OuyfW1xGBHI8hXcteCsksF+py2Z7jSGEo1C KS9vnyeCF8V4YtK0CRktvYaPqBgV1TMq42/WGBEs6ZArk70k1PzwUU0L5gbnFDB6syVb 9CRxwn/5Wj29Fx40kWwxz1sT/VWCM1DkDIhEfP/kExIGsrRLiWwDGVpcFUVUAhyhOlND 7vaXqeA4Dpg+bPpkGavBQXHFvl3cZ06d9Wj4FN9hrwvC5YvwjGhRuxOYo8lmT7P6NXHu Y73w2kc/D/i8TPFyHWQWF0A5d82EbRPjYwbtTvQlw3b1Hbt7ecIMctlbPNkvcO6jLWM5 5sjw== X-Gm-Message-State: ALQs6tBiMNMJpaqDeglZ6qap2Wkp8elDmEaoCchGsIX8TiArHKL2C7MT /QYLlKHL72N9ngp929YrC1Ap+A== X-Google-Smtp-Source: AB8JxZpeVXzTPENPZjWb6t7f0DFqxYpcvPKpFc26MK0kzVeW/QWon8HSVqiWaZlSCIXiS2MrA4r1rg== X-Received: by 2002:a17:902:24c7:: with SMTP id l7-v6mr38033910plg.320.1525676023377; Sun, 06 May 2018 23:53:43 -0700 (PDT) Received: from [192.168.0.101] (60-248-88-209.HINET-IP.hinet.net. [60.248.88.209]) by smtp.gmail.com with ESMTPSA id x2-v6sm31680711pgc.53.2018.05.06.23.53.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 May 2018 23:53:42 -0700 (PDT) Subject: [PATCH 1/3] scsi: arcmsr: Add driver parameter cmd_timeout, default value is ARCMSR_DEFAULT_TIMEOUT From: Ching Huang To: martin.petersen@oracle.com, James.Bottomley@HansenPartnership.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: dan.carpenter@oracle.com, hch@infradead.org, colin.king@canonical.com Date: Mon, 07 May 2018 14:53:39 +0800 Message-ID: <1525676019.8876.15.camel@Centos6.3-64> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 (2.32.3-37.el6) 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 From Ching Huang Add driver parameter cmd_timeout, default value is ARCMSR_DEFAULT_TIMEOUT Signed-off-by: Ching Huang diff --git a/drivers/scsi/arcmsr/arcmsr.h b/drivers/scsi/arcmsr/arcmsr.h index 2e51ccc..62eeef5 100755 --- a/drivers/scsi/arcmsr/arcmsr.h +++ b/drivers/scsi/arcmsr/arcmsr.h @@ -82,6 +82,7 @@ struct device_attribute; #endif #define ARCMSR_HOURS (1000 * 60 * 60 * 4) #define ARCMSR_MINUTES (1000 * 60 * 60) +#define ARCMSR_DEFAULT_TIMEOUT 90 /* ********************************************************************************** ** diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 732b5d9..f6ddaec 100755 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -95,6 +95,10 @@ static int set_date_time = 0; module_param(set_date_time, int, S_IRUGO); MODULE_PARM_DESC(set_date_time, " send date, time to iop(0 ~ 1), set_date_time=1(enable), default(=0) is disable"); +static int cmd_timeout = ARCMSR_DEFAULT_TIMEOUT; +module_param(cmd_timeout, int, S_IRUGO); +MODULE_PARM_DESC(cmd_timeout, " scsi cmd timeout(0 ~ 120 sec.), default is 90"); + #define ARCMSR_SLEEPTIME 10 #define ARCMSR_RETRYCOUNT 12