Message ID | 1618366694-14092-2-git-send-email-Prike.Liang@amd.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7AE4C433B4 for <stable@archiver.kernel.org>; Wed, 14 Apr 2021 02:19:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B1727613CC for <stable@archiver.kernel.org>; Wed, 14 Apr 2021 02:19:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232226AbhDNCTt (ORCPT <rfc822;stable@archiver.kernel.org>); Tue, 13 Apr 2021 22:19:49 -0400 Received: from mail-mw2nam12on2063.outbound.protection.outlook.com ([40.107.244.63]:4800 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229710AbhDNCTs (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 13 Apr 2021 22:19:48 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b3EkyBX6mYB2BY9Y96koQilS6zcJzWw0KOtNwGJvqhJQQHxSKCjCwgS8G1Su57cbvuDDAqyB8QnTbr9u5hFHMGkF2X3hvznFy3L5wsd/fnNI7aZpXZHjjiahvKSc5GAHMc3GzNd4gRXISh9n/wKrM6T3M21U/H/rRvxOBWgSX9lotJlhK+yRGS7QqX9EmNJ3GcCou54RMJlYTRyW3VO4yKyG29O/qkHimB0xwcn55mg6SOVM7zaj+M52aD5k/sKCrtKnYcngaTO9uFuKLw08f3TYKQGzi4AMhGy/oRyI3/EdH3s6u2o2/DOZYXENH0mkY0BQimgorE6Cx1FsMIYRFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eDJLbHPz4FknAPNEquUiwyE7zt+v0K60WCCqM3pC8As=; b=k49HGxqvpUAcwLvdeArrgPV1AxSK/Cne3/C9CqarioAga3/VTObf/ocCLwcX3+9277Ubl0CtkNkdVhPsydtHt14E62oaEckjrgJ3G3lscWFrxxKjSQ3wEBtva9o/RFT13hlj4cfnnTalM+Fh7zCdC3fW1u0fEYN0y7FEYZZlsSOkc7POAItE84W9sDlUlRfnXa8AWZnqL19GVn3XPxkwk1uE3r3dAW89LRLVdd0VG9gyMb8djaL4qcjQW8on3aYha0wls/zVnKz6a2JMvFsXuRi0m0iz9kICXmszZist5wkpTW/B8M+zJmvJh7b6a16HXhgSdLiLzAwDNr9tu4cv6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eDJLbHPz4FknAPNEquUiwyE7zt+v0K60WCCqM3pC8As=; b=AB91yUIqRhoenftzFguO2PV11EcZ4m0tYwkxbRKWqFRrTvr2tzAuOakM3jx72kKCcl6cFLBTj45hTwlY52+qDgdua6IAGQG+0wJBKIlDG+KHGN9dR644Iok3dHK4FFUbA10sqiDC5FcAAtE+adYVwrFhYAafBZS/O3P+Z0fSxfE= Authentication-Results: lists.infradead.org; dkim=none (message not signed) header.d=none; lists.infradead.org; dmarc=none action=none header.from=amd.com; Received: from BYAPR12MB3238.namprd12.prod.outlook.com (2603:10b6:a03:13b::20) by BYAPR12MB2600.namprd12.prod.outlook.com (2603:10b6:a03:69::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.22; Wed, 14 Apr 2021 02:19:27 +0000 Received: from BYAPR12MB3238.namprd12.prod.outlook.com ([fe80::5870:fcd6:b13a:c49c]) by BYAPR12MB3238.namprd12.prod.outlook.com ([fe80::5870:fcd6:b13a:c49c%5]) with mapi id 15.20.4020.022; Wed, 14 Apr 2021 02:19:27 +0000 From: Prike Liang <Prike.Liang@amd.com> To: linux-nvme@lists.infradead.org, kbusch@kernel.org, Chaitanya.Kulkarni@wdc.com, gregkh@linuxfoundation.org, hch@infradead.org Cc: stable@vger.kernel.org, Shyam-sundar.S-k@amd.com, Alexander.Deucher@amd.com, Prike Liang <Prike.Liang@amd.com>, Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Subject: [PATCH 2/2] nvme-pci: add AMD PCIe quirk for suspend/resume Date: Wed, 14 Apr 2021 10:18:14 +0800 Message-Id: <1618366694-14092-2-git-send-email-Prike.Liang@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1618366694-14092-1-git-send-email-Prike.Liang@amd.com> References: <1618366694-14092-1-git-send-email-Prike.Liang@amd.com> Content-Type: text/plain X-Originating-IP: [180.167.199.189] X-ClientProxiedBy: HK2PR03CA0053.apcprd03.prod.outlook.com (2603:1096:202:17::23) To BYAPR12MB3238.namprd12.prod.outlook.com (2603:10b6:a03:13b::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from prike.amd.com (180.167.199.189) by HK2PR03CA0053.apcprd03.prod.outlook.com (2603:1096:202:17::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4042.6 via Frontend Transport; Wed, 14 Apr 2021 02:19:24 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8c921e9b-ea81-480b-ee9d-08d8feebba36 X-MS-TrafficTypeDiagnostic: BYAPR12MB2600: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <BYAPR12MB2600023F3F481C41A31C1364FB4E9@BYAPR12MB2600.namprd12.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1N70bft35xyt5NpjDTmlK56XeyisPsFbStj9XnYTbuXTR+N53LKlzd+MIoGFAtcMQWicuoahEt7KXUXya98rClKkzyHSaKl75aPFuRybudDsc7ZXSRlz+eLXYhJqQGaKPZiswzZGSS7pf/j5dKDjsIvTGdiGXAO+XnfE66l9YGYtEII/7SBMVy0R/nwABtK749abERqLeca0x+E6tXoViwasCMazTSso9+WMzkGHisMUYU8rjDI2uvvmU3LHGI6WCvwYzgXQ2DWZLoCs9FJSWQM2Jp8GynNqHHL2Qea79BspkHv/4Ty5V0IYsgLlSVvZmDK7ZWFSuHnNE8y1znR1GyEpIEILwfvxiCVItCNMi2bWYLppNPWnBieaYG4rTtyWlnHmiCR8l7Qc8S+Dl2BCr3HovZc2alqf38mbF1ONhuWgwqO7TFBKhhEXXfc+U3OyT/DnGw+sbBqjkb1EvBhp/MctQwZsQkhe5rxRK72v+SnBlty5GnnX0X5BNAUyzln6JkjznOyJFEVvqd4gt3rJRTRMDJyztEHddReWRAgLnV8VY/arv/qJpSUh6ACLuN8Ey9n9j5BUt5U0MbkQuOp2POWgFBZQKWbf3efqCqD1Kh7QSMtq8wxqAzaLSQLzs+/Y3rip81fvMPnnBUah6aYHk0iQrGQvcmINvisJf1iCPfg= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR12MB3238.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(376002)(366004)(396003)(39860400002)(136003)(346002)(4326008)(6486002)(54906003)(5660300002)(38100700002)(26005)(83380400001)(36756003)(52116002)(186003)(66946007)(2906002)(16526019)(38350700002)(86362001)(478600001)(66556008)(8676002)(15650500001)(7696005)(6666004)(956004)(316002)(8936002)(66476007)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: qsyWw3x5Tx2jmk2I9SY6+k99pAyNHTw+kQ53lApAKI0RRWg7XMaL3AxeP1kMXlQTy2tuAFmlxoarxYaYpnZmcd7xE/ZCeBz26ZvutwmzcSJrpXX1RVi9bE6EJJqudh2TSQS/BSMxRBZvbt1VHgmjcFqb9yjl8kA0XfM14TMHFo0QbSwNtcomigoX2LV5gwimjc1yngwfwdtWMRZbK/GR6KnSBr2GJo4yWNmks+6YuQu5ymqdiXXfzHVmKeSPhhrJeGvD2G1pTRqyVfz4FTQT+4LfHrLmIq93bCv1N3CM9pK8wBM2IXHy9Mc8/D2PZGFK4s3A33pUkeAqm6A564xx9yq4Vu2VVir7hry5vrQgGt3Msm15lVZagoSnQR/IeYf29QZmRym3ku2Oy60pPVnmkRQvUkaEmwyY3Jo6Bic+CBlPnAuCgcyBQl0QZgg2uBEeYlJEfQAzIUMK1VAFvwLWOq+NCbkV6C1ZZZ49Aa8PCPVCuxzsSkowrwes4C301bwZ/jNPhgAhGcVip78XAJ60Z5TBj1wSpGtVF4WOJ2LX4BzWV4/1Nsjh9YJ1iHFXc7uMcTAjYSCwZz7tnmYDcBRn100kmh+m7NRKOIg7yinzPIQLeVMpArYCPCBlIwtsL0dtf3wa1IwgWNwMjbOPVl1Rh+olno2vMj7eUPkjq6RMiCbjgPqflcrhyVkvq9vaNgAVT5s2WEGiCPhao0zY4/c5WOrsdhREQ9z14aE/lmBpXppyC/fh1gi1zcWZvC2/vzJfEZJ2QNkNoVWga7iuj6I7XUllBwEoXSe237n79PYG2nyv/g1Tum3H50ofL/AZnLfNo7GkC9sNs9pQ3kj82RprBGsxU6ylRDL2IJ3gzcGf3D6XGbfRnqFo0fHwW2y2NPogtjWCNjDt15ICXlWSNsLeMs8NuwWJdsjsPXCm62w33jp5was9a1zFAoX7prhBLXeL+H9NBSmM0fXMy12LgS4LNZIQK6FFeADGIQcCCX1RNSYGYuNlh0PSUhvqvXYEuH6NqGokrvOIFCaiQRcxu6lHsU5O2tGSHHsXufv1G93L6Na+CvvPs1ax9/SIzSUwO6KK8uWB4eRtzmkimceiUoPrspLfI/XVnis6Uv0u/mdHiOxKM0tEeLsMsh0fLpqFAqlzZpbvbpu2Qn86Hs3fKeVoJ00i9cnBoZk2hyebwSD6Th8O8FRo+ZTYTordpiig7hYE7/RYAtmAU3yT8WeAwJ3UoSGmAXf5Khg5tSecRi0/wJKRRX+rCodHx8wBPaBjq8EgTzq+9OfgQQXZ6bs2YHRaJ4e9TbaIttNCyc+9IuVEiBFXdY3/Gl0APlX5MqzcWcYg X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8c921e9b-ea81-480b-ee9d-08d8feebba36 X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB3238.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Apr 2021 02:19:27.0585 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: ZYmRB8YQRGCHEZ89kLxiWmq4dVVesyQ985gpLr3c2Gqq26sRXHVmTRpVaMMmdTXD X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2600 Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 6bad4d4..dd46d9e 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2832,6 +2832,7 @@ static bool nvme_acpi_storage_d3(struct pci_dev *dev) { struct acpi_device *adev; struct pci_dev *root; + struct pci_dev *rdev; acpi_handle handle; acpi_status status; u8 val; @@ -2845,6 +2846,10 @@ static bool nvme_acpi_storage_d3(struct pci_dev *dev) if (!root) return false; + rdev = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0)); + if (rdev->dev_flags & PCI_DEV_FLAGS_AMD_NVME_SIMPLE_SUSPEND) + return NVME_QUIRK_SIMPLE_SUSPEND; + adev = ACPI_COMPANION(&root->dev); if (!adev) return false;