Message ID | 20171120182505.12947-1-v.minet@criteo.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> 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 900DD602B7 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 20 Nov 2017 18:46:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 797C628904 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 20 Nov 2017 18:46:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E4D728988; Mon, 20 Nov 2017 18:46:05 +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.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, 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 8B6E628904 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 20 Nov 2017 18:46:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751928AbdKTSqD (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Mon, 20 Nov 2017 13:46:03 -0500 Received: from mx08-00287e01.pphosted.com ([62.209.51.156]:52080 "EHLO mx07-00287e01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751902AbdKTSqC (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Mon, 20 Nov 2017 13:46:02 -0500 X-Greylist: delayed 1214 seconds by postgrey-1.27 at vger.kernel.org; Mon, 20 Nov 2017 13:46:02 EST Received: from pps.filterd (m0111318.ppops.net [127.0.0.1]) by mx07-00287e01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAKIP4hE030631; Mon, 20 Nov 2017 19:25:39 +0100 Received: from eur02-he1-obe.outbound.protection.outlook.com (mail-he1eur02lp0182.outbound.protection.outlook.com [213.199.180.182]) by mx07-00287e01.pphosted.com with ESMTP id 2eaanvhd11-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 20 Nov 2017 19:25:39 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=criteo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LoF23la9qx8yTda/XdvBqbnSA467SEVcI4Q5qIQ/0hY=; b=N7T5MZzm1MeGVCzQ8C+StubEhZ/MaaVUJ9AniGUgYkI+JhLLRYbZcgQtOMVoWbdxx2+7o3KQI5UcktrmUvlF6tVki0+I7/M1MOu4y/idTSq419C5Vmb3ozso3/SfAtndICz8ADgSmEIJV9pq662+wtdPOgAOSvCdkRPsOM3F7ig= Received: from criteo.com (91.199.242.236) by VI1PR0402MB3807.eurprd04.prod.outlook.com (2603:10a6:803:20::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.239.5; Mon, 20 Nov 2017 18:25:36 +0000 From: Vincent Minet <v.minet@criteo.com> To: linux-scsi@vger.kernel.org Cc: esc.storagedev@microsemi.com, Don Brace <don.brace@microsemi.com>, "Martin K. Petersen" <martin.petersen@oracle.com> Subject: [PATCH] scsi: smartpqi: put controller in SIS mode at shutdown Date: Mon, 20 Nov 2017 19:25:05 +0100 Message-Id: <20171120182505.12947-1-v.minet@criteo.com> X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [91.199.242.236] X-ClientProxiedBy: VI1PR08CA0172.eurprd08.prod.outlook.com (2603:10a6:800:d1::26) To VI1PR0402MB3807.eurprd04.prod.outlook.com (2603:10a6:803:20::28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 41b2c0b3-1507-4731-a37d-08d530441804 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603258); SRVR:VI1PR0402MB3807; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0402MB3807; 3:J9cjYKDGd0TF/sv80nas6H1BuSZJaJDPd/nIgGaKTt+A3gifUABJW07NmRxE6b1GVNfxC8592i1fHv28uZWnApf1ds8RJiY0PO7jNH7YA9/ScjL736/rqd1G5AEzTFpoNxZ3Dhkw7ExMyC2DUisDo14T8e7amcYzkp7xo71Jym6QG0ZYR6Wbo+g4BUJcUapa5aUh0CEx+xRVeUhNiv03omV0iwviP2iCuGwTbyeadTof9tvK/P02U0LcPaU4Nx7G; 25:pyRKiqmTYQbjY8Fea+C39mJJUCteRZe0vw3Amx06oEi6BuqRFH44SVJUNK7icyOGplNgFNq64HV2Dibqfh93Iso0f+4pFMuDqqwEA0H2H+5Uqc25CdtO3Sl5Z2otU76lQ0qgNnhY/Bq+1TdzmCe+HhIW/PgBueVCOE/m6HB/Q6VMT609CKJ7yneJuEyckcAZYVEio2iuA98j88NbBso2/IL3uMeh3e2hdbncIIga1pHcFnMcvZJu8siNAXqES3dTtBx//aZKUYp0xsz6rSfpjPQN0Om04l7qxsJKiCe6wd6diMQmElawco9iGpD6rRP7WaKegX7ZXGncb7tvbDEDFQ==; 31:Cm6u/fFWQYX+juSrDwqk3wDie582QEvvZ88k+vOhky+XYEyzYuhoIz8aC1zp0IgpoUBDmnbsuiFz4dyD2R63Z5giZAXdLZPyH1G2MWi9ylBXoLKGCfe26irfwUC9bBACzKWsXxUfzLZkDiHalXIZhN7ARkVzwCmDnAoZOZaxFnSTRhjWhlWK/lg6CTc2Rmq4vcko3okKSYsCx4KuXCnjp5oeDZqZdsTbCOXc4Uz6cQs= X-MS-TrafficTypeDiagnostic: VI1PR0402MB3807: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0402MB3807; 20:FDABvl8YAD7wTXaA/JfL0W1RXCHaX7bvVzQbflk0w87ILX06mxdNCRKQWSXtZED9MSn93sUJ2TpWyxcGpzrn2U4vD/lSTOxy+vqbncQJIIzVhOwM4GL8Sw9YWVm0ZHvMrxYqdihbKt72M5jJE0GaOAfZsJFusgXhZLiNUvyYHhx7Qcpj5+pu4ig0D5mCVjukOHN+ZsBCet0P+Y5AQe/FkDM1EqjmFNvf0gngsc70GdDRjajReJQ2Tr57JrIUx/LRENUlJI9MBkMlwwzBw9jEaNXCDZR9HvKajCK23WjQgl/i9Slkd0CxeXRUChz7EUMikgPNDM8VzFCDiVhdZ5aR697hOQVwvG0FWDtiSmsBRg+qj7k5ZCVidPwuHh5+LOkAHJHy6fE8tDmMwWjXUbrdXU6iaFY/CTZuz2icQLk9dwlzCFevUGuiejARn+i0dhb/gBr1P4ma+mtWOsHFK3PXuuYVQ4tJmAaBLINYFFuPiIbURk5zq8gHKL77fpKbXEr6; 4:GVIYev8JNA0dz4/vXYA8iRHLKBL20G3hhEgg3+8aN43xq6Qmk2M7riBpr/xtqH8KSWFzd10O1FYClqVyllzoF+Mtzekww+2YIni6angqarPtCOiNLXTwLrAEBrDonFqqP2xzOGKwQiB9D0GSC/nW5c/1pw2y2AhjglulNI/xwZMTsdn40NMJltJPbTBJZ93P0y7mkm9bHfeCZhWnclZSHHvVD718TWqDHGIDg/u9deyoSOdqGNNNj3LB5q8n6JH6+jy8FKXEUn9A4A+CrGlC/A== X-Microsoft-Antispam-PRVS: <VI1PR0402MB3807D886BA63CC47C1F962FB90220@VI1PR0402MB3807.eurprd04.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(100000703101)(100105400095)(10201501046)(3231022)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR0402MB3807; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR0402MB3807; X-Forefront-PRVS: 04976078F0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(376002)(346002)(199003)(189002)(81166006)(97736004)(2351001)(2361001)(7736002)(5660300001)(189998001)(25786009)(55016002)(5003940100001)(36756003)(106356001)(50466002)(305945005)(50226002)(101416001)(48376002)(68736007)(8676002)(16526018)(33646002)(8656006)(53936002)(316002)(33026002)(81156014)(16586007)(69596002)(54906003)(4326008)(1076002)(3846002)(66066001)(6116002)(8936002)(47776003)(6916009)(478600001)(50986999)(86362001)(105586002)(2906002)(6666003)(21086003); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0402MB3807; H:criteo.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: criteo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0402MB3807; 23:/ZZOwi53EU494boeTjOmqYW/PYijLSSFeo/dYOP?= =?us-ascii?Q?s9rGg/tZ5TksDPC1kE2UAjuCjTqMF+YN6tWNRVBzqTEf8MIGFY1qRGpOPmRS?= =?us-ascii?Q?7Lh6BJRiaI7iwspsHEunedlxX3JTXmEVHGagZmIMX0YQyxnVbTo9gYcS1raw?= =?us-ascii?Q?oKHQUzZ4JsBluPRC1G6calmiY/qofYw3MvQ9574K5OlJrB/ci569ufswHEsi?= =?us-ascii?Q?Fa7Yet0e963QDET+lMDa7+8CkGU7gWOymjpV3K/jQbP1JmPHHNq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+t69a3MjLz3mM0QR2Xl?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0402MB3807; 6:kvYJm2BqfGfcoF1z3WbZjtRkUJ46k/mh60zptb7VmO1XW/7QFVoQpHQAncXZgFOMPy2nFie8UfD6GtAi3XmSxfKy1DUfS6qr1tlPW1/nPiygV0VHvqdOK3Rval4Ug6HFSvLgU+bsBG+2aR/YgKHcBfXnTpcPwB3athm7TOxT3jhbb4yIxfVTMcqkWsxxp11hEMJ+WuEO3V7au2mQoe+UX40/yWoYJIgvHTMOtVneRajLGs92YlgUK7LT3HJ6WMybqwzz7N5r+44njOKBTslsYscaDPI5Uyg6Sw0yn3h5wNvx2lBZId5uZbn76mYNVNgBmb4wpba9YKVytjVZC7NtKa3Fyw7KquwiGLGMsw4zH2Q=; 5:POKqFJ30KCkj0erQg8T2A2vBcWjOW130Fh5td0iLtTxcJikVFetrddjsBk+FB3wBrUm7ncYmfW6ghV5bDyK79gPGzu1IHaFA3lM5pmF5BXV18y1ybTN/TLT/+osXbOpOr+BU80wdv798PxAh5MggphJPcqCMxP+h1TK5tDRbSJg=; 24:ikPth8i1cYFRDSSs9oKZt1EJ34aqDSFusKn6PC9v/fgJRpcMHbK3B1ndFe+HKGiV+ph1OnbWsznzpEqFrNmiY9v953+K/iMB9C2YIpo/Hno=; 7:iCBYYrb+n8lmptqoGQp9MIKllJy6GR1LoRwCoF4GoBINjqP+jI4zxHRwPkQ3SJtVtl7mX7riOkr/Pctq9uWMg1pJRb+gyLukqgeaAgmNIkmziW4UHCoMUIWJi6Obyy24iLKuzYFEdZ0oZ9OVhS1hmt2wnYBfNCZDyt8pnedggyfhjMg2/WcRmMJufDsekeq5KvLMPesRqKk3iGN8kxe0zbWPvNuiie3LHT9i649yt2MYv7j31L+PFFtaPFbS2x2S SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: criteo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2017 18:25:36.0409 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 41b2c0b3-1507-4731-a37d-08d530441804 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 2a35d8fd-574d-48e3-927c-8c398e225a01 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3807 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c index b2880c7709e6..5e898dd9ae2b 100644 --- a/drivers/scsi/smartpqi/smartpqi_init.c +++ b/drivers/scsi/smartpqi/smartpqi_init.c @@ -6699,7 +6699,12 @@ static void pqi_shutdown(struct pci_dev *pci_dev) * storage. */ rc = pqi_flush_cache(ctrl_info, SHUTDOWN); - pqi_reset(ctrl_info); + + if (ctrl_info->pqi_mode_enabled) + pqi_revert_to_sis_mode(ctrl_info); + else + pqi_reset(ctrl_info); + if (rc == 0) return;
Since commit 162d7753fce9 ("scsi: smartpqi: ensure controller is in SIS mode at init"), the driver is able to work even if the controller is in PQI mode at startup. This made it possible to keep using the controller across a kexec. But kernels built before that patch still expect the controller to be in SIS mode at startup. They will fail when kexec'd. To handle that case, this patch reverts the controller to SIS mode during the ->shutdown() callback. Signed-off-by: Vincent Minet <v.minet@criteo.com> --- drivers/scsi/smartpqi/smartpqi_init.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)