From patchwork Fri Dec 7 22:29:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Brace X-Patchwork-Id: 10718963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19BD81750 for ; Fri, 7 Dec 2018 22:29:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 088F42F0A8 for ; Fri, 7 Dec 2018 22:29:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F14632F2D9; Fri, 7 Dec 2018 22:29:22 +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,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 89C322F0A8 for ; Fri, 7 Dec 2018 22:29:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726093AbeLGW3M (ORCPT ); Fri, 7 Dec 2018 17:29:12 -0500 Received: from mail-eopbgr720074.outbound.protection.outlook.com ([40.107.72.74]:6057 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726065AbeLGW3M (ORCPT ); Fri, 7 Dec 2018 17:29:12 -0500 Received: from BN6PR19CA0071.namprd19.prod.outlook.com (2603:10b6:404:e3::33) by DM5PR19MB1420.namprd19.prod.outlook.com (2603:10b6:3:145::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.19; Fri, 7 Dec 2018 22:29:07 +0000 Received: from BN1AFFO11FD025.protection.gbl (2a01:111:f400:7c10::152) by BN6PR19CA0071.outlook.office365.com (2603:10b6:404:e3::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1404.18 via Frontend Transport; Fri, 7 Dec 2018 22:29:07 +0000 Authentication-Results: spf=pass (sender IP is 208.19.99.221) smtp.mailfrom=microsemi.com; linux.vnet.ibm.com; dkim=none (message not signed) header.d=none;linux.vnet.ibm.com; dmarc=bestguesspass action=none header.from=microsemi.com; Received-SPF: Pass (protection.outlook.com: domain of microsemi.com designates 208.19.99.221 as permitted sender) receiver=protection.outlook.com; client-ip=208.19.99.221; helo=AUSMBX1.microsemi.net; Received: from AUSMBX1.microsemi.net (208.19.99.221) by BN1AFFO11FD025.mail.protection.outlook.com (10.58.52.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.1404.13 via Frontend Transport; Fri, 7 Dec 2018 22:29:07 +0000 Received: from AUSMBX2.microsemi.net (10.201.34.32) by AUSMBX1.microsemi.net (10.201.34.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1531.3; Fri, 7 Dec 2018 16:29:06 -0600 Received: from [127.0.1.1] (10.238.32.34) by ausmbx2.microsemi.net (10.201.34.32) with Microsoft SMTP Server id 15.1.1531.3 via Frontend Transport; Fri, 7 Dec 2018 16:29:05 -0600 Subject: [PATCH 10/20] smartpqi: wake up drives after os resumes from suspend From: Don Brace To: , , , , , , , , , , , CC: Date: Fri, 7 Dec 2018 16:29:05 -0600 Message-ID: <154422174585.1218.16702694893501412742.stgit@brunhilda> In-Reply-To: <154422079293.1218.12539829857034151457.stgit@brunhilda> References: <154422079293.1218.12539829857034151457.stgit@brunhilda> User-Agent: StGit/0.19-dirty MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:208.19.99.221;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(7916004)(396003)(39860400002)(346002)(376002)(136003)(2980300002)(199004)(189003)(44832011)(8936002)(103116003)(11346002)(53936002)(486006)(446003)(476003)(5660300001)(126002)(2906002)(8676002)(9686003)(186003)(316002)(14444005)(305945005)(97736004)(356004)(230700001)(77096007)(26005)(81166006)(47776003)(81156014)(106466001)(106002)(336012)(4326008)(68736007)(33896004)(2201001)(33716001)(50466002)(69596002)(23676004)(58126008)(2486003)(575784001)(86362001)(110136005)(16576012)(76176011)(478600001)(921003)(83996005)(2101003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR19MB1420;H:AUSMBX1.microsemi.net;FPR:;SPF:Pass;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;BN1AFFO11FD025;1:HPReKj3g4bpIxq107sM0C8uiQ5Fzh8izgnP5KTmOCEUHl91fLw+m3hc8b/G0dkW+YUFPm4mA/JcpsWVPJ0PzcCceut6RIhybFdUxQbUmo9YOU8KC+dS/7GCNnPSA8sHi X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5aa829c9-b138-4ffb-8ed4-08d65c9366e9 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4608076)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060);SRVR:DM5PR19MB1420; X-Microsoft-Exchange-Diagnostics: 1;DM5PR19MB1420;3:Pp2JcpDLqEA+wtlxLyz0SzIWnsR4GgG09PgejU7Sr6/12XJH2Na9FfSnDVC4jpYFYPaMJQEbeAuPrL2iMfkBz7TuXZFengf/FlmoJ7YGGabgH12+ae76tSI+1hWvmt6VghXyDxmOG2MfFlMg8sq7M94w8ysXb11rtCYLYMGTS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Jh5MXcrq+PrJIxwmqqTMxcvFRNhh4YvyHhylhsGX0KUveNp4vwpzvr/f6QnakN+qsIuD8aI0yoCR7NvAQhvjRi3Y7uXkAl8IcHQnfJzp+Cq/62r4+ImroUfKI57XQao6JoH0TEmjyoMaIY/ZA5Ucranl+7U/Htn/kyUKtMSFXfpuis7g8oMWis+3ehWPs1aVyqcvZBiHSTYJDT/SpBN5y2XkDZoNP5W8aQhMNByaDOKObNYnBFgjVJyFkRXCfhOmvLFX3pNOHgynDHhrVfDcaqMTphm9D3E2hxhcRY7SiJ5Iga X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231455)(999002)(944501520)(52105112)(93006095)(93004095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(201708071742011)(7699051)(76991095);SRVR:DM5PR19MB1420;BCL:0;PCL:0;RULEID:;SRVR:DM5PR19MB1420; X-Microsoft-Exchange-Diagnostics: 1;DM5PR19MB1420;4:8Fme4Ad7mYnYbIYdDbQrmcOLuA59rLjdNyu/l58rPF5ue1wX+lDnDRlGAlwcWdFkUMF/cdduYdibYgIxIuq/yqnU5kudBWxfz2fzrPLD/ELRGosF+XjCD6OENheYFehpTRb5CxJ1gREa8aoxUwOimDGQDc+y3ISLhz+CdS5iiIhzVCluFlISo+5yNK2nxJCJ6pc2T2I7EC+TVk4mF9be2ECZdqI8cGP1/c3gywgYhHXE3v4sE+aQvacvDIlNkiAJiXtG6cYWE+rQNEEuN9fQ6Q== X-Forefront-PRVS: 0879599414 X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BDM5PR19MB1420=3B23=3AJmPQ/XI?= =?utf-8?q?73B3Qr4uYWc2kFtYJeu/WNNYzfzvjm0FhbNyQ+WqKDX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GEiCyKUojlMDjE+fUTcrcNL+2dqkPYr7pbijlz9jyv6L/aTWOz37pQrchFS1hTrDOiQO7vD4l46Gg+EzPq3IY9aLH8PBlovG0iioQ8QpqHkpBPEscAOadEVgL/jPzFDzf25CLxZ3Th+S2dp3EXbGw==;5:beS7AOqoD2Dpg9PL1hgQe4PN712sB3bOWiNQ/kDTgH49s5NkCCPY3HbtfKgL34pfFfsx44uMOZE4b4m8fsBdFq5niOhQy6JlIWUH09CASoiC++bqS3T3UGu0ppglg/aA7ZBy4k8OAAT/Ati0Oasuwy4x+3q+WBUSv7uizQKpy04=;7:4IJeH6fcxEZutRTtjW+cMXMG+avNcGG9E4tXZkiU3Hj19H2tsic3WF7YuXOK4uWVjYoMjoqwVm5uDVNYR6/l/p2PoxfDBSrPQjQKslwXnVQKj0SjCOlkUh1GFDo8G/IAxBnnA0GKdzag38OLIQsoow== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: microsemi.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2018 22:29:07.4940 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5aa829c9-b138-4ffb-8ed4-08d65c9366e9 X-MS-Exchange-CrossTenant-Id: f267a5c8-86d8-4cc9-af71-1fd2c67c8fad X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f267a5c8-86d8-4cc9-af71-1fd2c67c8fad;Ip=[208.19.99.221];Helo=[AUSMBX1.microsemi.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR19MB1420 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: Dave Carroll - set allow_restart option during scsi_device init. This allows the kernel to send a START/STOP Unit command to the drive if it encounters a 4/2 check condition in sense data. Reviewed-by: Murthy Bhat Reviewed-by: Mahesh Rajashekhara Reviewed-by: Kevin Barnett Signed-off-by: Dave Carroll Signed-off-by: Don Brace --- drivers/scsi/smartpqi/smartpqi_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index 6716d30dc5ef..acde0abbbf43 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -5434,6 +5434,8 @@ static int pqi_slave_alloc(struct scsi_device *sdev) } if (pqi_is_logical_device(device)) pqi_disable_write_same(sdev); + else + sdev->allow_restart = 1; } spin_unlock_irqrestore(&ctrl_info->scsi_device_list_lock, flags);