From patchwork Wed Oct 5 20:23:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 612804 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 458DBC433F5 for ; Wed, 5 Oct 2022 20:23:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230011AbiJEUXw (ORCPT ); Wed, 5 Oct 2022 16:23:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229926AbiJEUXq (ORCPT ); Wed, 5 Oct 2022 16:23:46 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2083.outbound.protection.outlook.com [40.107.93.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 997636D56F; Wed, 5 Oct 2022 13:23:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PHKd8yu3NX2dytOklX62NuhZ4WhXTTx1wwsABvvKcVda5MqqrnzLbGAnALtOVPnLsYKVU0FuiLChUyoprhMg98S0fDg1SpFeZ/vFh7HANjCjCUCR0ABhADxPpadphISoNdnrk1bVUngR8b2E+h0C/E+3OCKj6IETKbKZEmqE5LbutG9EpxahzDtI+CvFKIecDdV7zdeBkgWNlrr2JqIjTJDT/9VHF9UJv3B71lIEAtIC25ysvMX/dEGlr/vJELpMO76MEC6FEivbtChtoc2DvXHDSfx+2mVD4XNZ7qJhz8wzooNBtqZT27fK7z8r/Z0SeFjrVBj4DRbVg4uH/qsCmA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uCALTAQQVZcBwtKhpI+tt3MRR/jVv+tSWPzP5/hza5M=; b=KaLjbz41dwv468gnI1E0wZFYE+UG+Tr6HVzxzw6xAW7DE/D+KSH0kMGfglVL/zu7mEI1mLSiRcnv6dvzSBkUrm1y/4YdHvA/RPnl6E4VbZ6+u6DPQiSVWjHXR59zxWyrBiUwMW315ahiPtNteVMfQkLUXXQlOGpkL4hkcIixHDR7HDJgyZhdMClQknwNHqkv1VGrTed7qwSNs4qmxqBTUj3tJW6PimMmv9K4nU4jjgHQGHYk7LliEpZszkxyJ0SDP4pCMAJuj3261aT0bhPzA/VdIfiDk0aAcDY9arld3z2SXGueWSVorxJzUq+elVG1k2M7lrDjAZdlmwKKwiJlKA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=uCALTAQQVZcBwtKhpI+tt3MRR/jVv+tSWPzP5/hza5M=; b=X839/0l+xMkYu+AuHywp/UxrdmJyvgQocTHLOTWloDcBRfoTCjlc9ijoAqyVTjcUJ0CxQKomitl0befsGlfPGwBiw02j3vWIDmpOfnKi93X0gbwJFJjuvFW9IFpPBCJ/7k9JntPDFItE/3lvH+L3vflrpjO7NpLUXUU3EzhEvDg= Received: from DM6PR14CA0066.namprd14.prod.outlook.com (2603:10b6:5:18f::43) by SN7PR12MB7321.namprd12.prod.outlook.com (2603:10b6:806:298::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.20; Wed, 5 Oct 2022 20:23:43 +0000 Received: from DM6NAM11FT085.eop-nam11.prod.protection.outlook.com (2603:10b6:5:18f:cafe::70) by DM6PR14CA0066.outlook.office365.com (2603:10b6:5:18f::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.29 via Frontend Transport; Wed, 5 Oct 2022 20:23:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT085.mail.protection.outlook.com (10.13.172.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5709.10 via Frontend Transport; Wed, 5 Oct 2022 20:23:43 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 5 Oct 2022 15:23:41 -0500 From: Mario Limonciello To: , CC: , Mario Limonciello , "Greg Kroah-Hartman" , , Subject: [PATCH 2/4] xhci-pci: Move PCI IDs for runtime allow into a table Date: Wed, 5 Oct 2022 15:23:50 -0500 Message-ID: <20221005202353.1269-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221005202353.1269-1-mario.limonciello@amd.com> References: <20221005202353.1269-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT085:EE_|SN7PR12MB7321:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d6ed391-f631-48d9-8c80-08daa70f7fa1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9lBt8Ifn4kRxBp0ZeKqdqu7XLraDoLJbT5rSYyruhibwH+NLbfMtdGqj+R9OvLG7jPF3KAo+1HpLau/+bfcewUwqObMbV1HriPbii0jdmKyrHL03jHgg5P66JzbxY5o851Ny2RS9WKzf0387vK3DaSn21VYy1vSYCggTKW/boGw+y1QWtbYEOSEpviiLD5QwshQbyKZwc/t0AWoFmXk3WSFQe0LfMueht+gCuNCf6dHxL3S73hr2oijt1n6JQVREvbI3qdeRUAj/MlGPUIXPmdj+ntRQ7VL8d3I6y9SDWS5m4KwIqhmKGJ3jDal9HE9oaNGvvp0Zmm1c8f48ouyxXBhAqhH2CoCDjuwbK3GbVFT1vtD6yL2hqcoNOQ9VPUtajTxkuxYQHmyQKYD+JD2+nN2QLwHrNYlGaJH8o6nRaBnE2SCMUrCJ3/88leaxpsJ4HO+SvKLqDMe2pk0JvkVAIP15wlnBvii084BDhTl1NCfU9tyjrJvBmYKI8OxiZaBM6eE3F5Eav2XKTzd6st03IZcVEPbKPWSKsXAGoM/4sZcwp5iA5tIxOk3i0rmeXgumzq/GQ6MGwtsCFQ0BucNu7bL35EHG45wlNC7Y7cRJhwaymufdg9BoXjaB2wi4wJKGOOVZfUdQH7KF1FU5mMEdnwEZtOf9qN016anFIb/YrVkLm5HR0tXZNa/Wy7cPAOShn1A+BkI45GUC9DTEIZDTXTLGltwj9HqpuwzLf6vtnecJDjzztxlwzFpfp0378YAgzKopr5kxWYNOgBTXzLZu3bckjN2A6MS6QjjmdqPEFxZY1phVPss2ktUdI6qm+z5s X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(39860400002)(136003)(346002)(376002)(396003)(451199015)(40470700004)(36840700001)(46966006)(82310400005)(36756003)(86362001)(40480700001)(110136005)(54906003)(8936002)(316002)(8676002)(70586007)(81166007)(82740400003)(2906002)(4326008)(356005)(36860700001)(41300700001)(478600001)(186003)(83380400001)(70206006)(40460700003)(2616005)(1076003)(47076005)(16526019)(26005)(426003)(336012)(44832011)(7696005)(6666004)(5660300002)(2101003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2022 20:23:43.2894 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3d6ed391-f631-48d9-8c80-08daa70f7fa1 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT085.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7321 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Every time an new ID is added to this file, it ends up in a list that will require changing the last parenthesis or a curly brace or both. To make for cleaner patches in the future, match devices against a table. While moving IDs over, rename the Yellow Carp ones to Rembrandt as it has launched. No functional changes intended by this change. Signed-off-by: Mario Limonciello --- RFC v1->PATCH v1 * New patch --- drivers/usb/host/xhci-pci.c | 74 +++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index dce6c0ec8d340..6e5bcec9b2b16 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -69,14 +69,14 @@ #define PCI_DEVICE_ID_AMD_PROMONTORYA_3 0x43ba #define PCI_DEVICE_ID_AMD_PROMONTORYA_2 0x43bb #define PCI_DEVICE_ID_AMD_PROMONTORYA_1 0x43bc -#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1 0x161a -#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2 0x161b -#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3 0x161d -#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4 0x161e -#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5 0x15d6 -#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6 0x15d7 -#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_7 0x161c -#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_8 0x161f +#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_1 0x161a +#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_2 0x161b +#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_3 0x161d +#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_4 0x161e +#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_5 0x15d6 +#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_6 0x15d7 +#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_7 0x161c +#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_8 0x161f #define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 @@ -86,6 +86,35 @@ static const char hcd_name[] = "xhci_hcd"; +static const struct pci_device_id runtime_allow_pci_ids[] = { + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_2C_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_LP_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_2C_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_4C_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TITAN_RIDGE_2C_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_RAPTOR_LAKE_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_METEOR_LAKE_XHCI) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_1) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_2) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_3) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_4) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_4) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_5) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_6) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_7) }, + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_8) }, + { 0 } +}; + static struct hc_driver __read_mostly xhci_pci_hc_driver; static int xhci_pci_setup(struct usb_hcd *hcd); @@ -257,25 +286,6 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == PCI_DEVICE_ID_INTEL_DNV_XHCI)) xhci->quirks |= XHCI_MISSING_CAS; - if (pdev->vendor == PCI_VENDOR_ID_INTEL && - (pdev->device == PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_2C_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_4C_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_LP_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_2C_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_4C_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_2C_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_RAPTOR_LAKE_XHCI || - pdev->device == PCI_DEVICE_ID_INTEL_METEOR_LAKE_XHCI)) - xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; - if (pdev->vendor == PCI_VENDOR_ID_ETRON && pdev->device == PCI_DEVICE_ID_EJ168) { xhci->quirks |= XHCI_RESET_ON_RESUME; @@ -336,15 +346,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4)) xhci->quirks |= XHCI_NO_SOFT_RETRY; - if (pdev->vendor == PCI_VENDOR_ID_AMD && - (pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_1 || - pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_2 || - pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_3 || - pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4 || - pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5 || - pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6 || - pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_7 || - pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_8)) + if (pci_match_id(runtime_allow_pci_ids, pdev)) xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; if (xhci->quirks & XHCI_RESET_ON_RESUME) From patchwork Wed Oct 5 20:23:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 612803 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D834BC433FE for ; Wed, 5 Oct 2022 20:23:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230029AbiJEUXy (ORCPT ); Wed, 5 Oct 2022 16:23:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230037AbiJEUXs (ORCPT ); Wed, 5 Oct 2022 16:23:48 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB8D552E5D; Wed, 5 Oct 2022 13:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k+qrTKLKrz2qYsA/hJgY03g0U6FOJCLZgQuQuk9PHaNe9RWeVQc+lkjUmBXY0FDtKhOd9/kQttyQteOJNFt+PL+XohaA93CU1ejRQEKetUPdFrpDtXO0diJnAxA2VtxsvP/f55fkR9GPHOnZ+P53Ru3CQf7swmIOz7511Evld56bkJcn0kmjuAwV8BrfbNTvOVGvCSaJ+eJ514uBd8FniV1fQ+xFRvoNzIPpP6f/zUdX2xN+nHYh0lvnNZ5cmQaCM6GThWIJ8bpR/kUgpGcBdLPfI6P62h1R7g84gTRSD866mLuTaDZEYpr4UbbhtOQkKVesNKTr9P0CgAg35F5IMQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aIb/pm+/xArYkw9iZhejHSYZDfF+1lxSmkXgqvDyYlU=; b=gp6UahDM7lmTTiNQKG2A4svvsgfDHR9AGILxM5lMYYTFI3wZLlHp5/iLIZHrEGc66vScLSpQBHfNkkJ8XRmUX+2IfC80cSYTPi3PbCQfcdAFcrybceUPjcVUX9yS162174UFlIP7wMLxRI60k0cMMazNexqI0vx2kvlYPWWqBIiUu4Q1occfG8NPtMf7wd108PnRSfbzajCHwDsj/CdtYZrZDkum15EjalVhfTdwVkUyPelqlV5F05oGlOAAH0XNgHrQkXYZkvXqZjo2iaQ1rghTxQR0wgpVbrBcr0GB4C+yHIGg5QRCfwoWnZFpMrKrIIvynpRwo2Si+KgOpLwaIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=aIb/pm+/xArYkw9iZhejHSYZDfF+1lxSmkXgqvDyYlU=; b=MlqYmbv/op9sJQmqJKQlb38bo/wQPllOxWrBm7qsNGII9JuSDZuMkXsCg5x5pzdBtRU/Patl5NSmrcvjUYgD9lQ4fNw9YHnHKMKOWVllO1mSTCQXYOCQhVj24qd5SLI1Kca4X7dY98d9PAqVkzrhaCNYTBoVVYnLAwxHZ1mfE00= Received: from DM6PR03CA0063.namprd03.prod.outlook.com (2603:10b6:5:100::40) by PH7PR12MB5758.namprd12.prod.outlook.com (2603:10b6:510:1d1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.35; Wed, 5 Oct 2022 20:23:44 +0000 Received: from DM6NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:5:100:cafe::d5) by DM6PR03CA0063.outlook.office365.com (2603:10b6:5:100::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24 via Frontend Transport; Wed, 5 Oct 2022 20:23:44 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DM6NAM11FT009.mail.protection.outlook.com (10.13.173.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5709.10 via Frontend Transport; Wed, 5 Oct 2022 20:23:44 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Wed, 5 Oct 2022 15:23:43 -0500 From: Mario Limonciello To: , CC: , Mario Limonciello , "Greg Kroah-Hartman" , , Subject: [PATCH 3/4] xhci-pci: Remove a number of controllers from the runtime PM allowlist Date: Wed, 5 Oct 2022 15:23:51 -0500 Message-ID: <20221005202353.1269-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221005202353.1269-1-mario.limonciello@amd.com> References: <20221005202353.1269-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT009:EE_|PH7PR12MB5758:EE_ X-MS-Office365-Filtering-Correlation-Id: de018c1e-df01-4091-7412-08daa70f806b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 17kctkJFp9xyVbzVvUpyX+PyepSWBsFtHAd8REFbo/V2+fzLu1HObTDsA9MmO2FWK6cIH4GmiZnC4DD3ogRebF/2rDHDRdIgOs/Zl61CRF+3u/S2byBH7Od+Bi5sB5yURC3DL6DT/iuruQM41JarZi0qRbBLwqB7px7Op1GCkXhBeI42mcXwaYzldqX0H37WnlL0iOJj2XPNRLecZgqj0gLEmV6ua9YYV4nn45PWyUpEcgTSlLGtQgxATWMbtUfTgvox7lVp4jPW0jjd570RQPMzmGXSrolfKEJgA+Psiq66lA/KeMpaJ2DHXkPvnGqZSmyo9JRTLecUWANDPsSav1wbOyQWh0ppUZIPc2VgoQxJ3H+1jzv7FSoclibKVQyzLSna9UbThBTvzVlvaGNx5jkkirile5Ecj5TW1tSPfmdReQkGOdLEB0T1f5NN075q2jq4VOMRlZQf35qVpCkkZ083ftTiRUxVHysUgrAIVBsq0lkH/2/ZdZG4U+0Z5P+hsgX4fHtxpBT4bH9rRtkU92MnQ1cpXFmPsD75vEoCqt/z3gj8N3XMlPY3qn2MsEiAT6WjF30l6GdG0GW3Bf5eCF1UXG6O+aclCj9PomXaJMXO9c1d7m2iHvTZgImTc8Zi0VNvtejZvVKu3U3lONDCRPUl/2O10eLzGBnLUyw4sicl00jKf5oHHUbsoX3QB0VKDRVaG/1C3q4xO7TjtQg0Owll6cneTEGrG26Fykp8uZbqIUEX9rMH+Nc6l15kyTdsMkO+m2+BQl8YNpi52xjPU12EaRCaqAUL2IA7wdUARppC3jPIpmboQU6uO10vp3XfjjTP1kTqALStKKuFtALcFg== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(346002)(136003)(376002)(396003)(39860400002)(451199015)(40470700004)(46966006)(36840700001)(36756003)(336012)(86362001)(426003)(36860700001)(44832011)(54906003)(8936002)(82740400003)(47076005)(356005)(110136005)(16526019)(81166007)(2616005)(66574015)(83380400001)(1076003)(7696005)(26005)(4326008)(6666004)(40460700003)(316002)(478600001)(40480700001)(41300700001)(5660300002)(186003)(82310400005)(70586007)(70206006)(8676002)(2906002)(36900700001)(2101003); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2022 20:23:44.6282 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: de018c1e-df01-4091-7412-08daa70f806b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5758 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org When creating a device link from the XHCI PCI device to the USB4 router the thunderbolt driver will opt the XHCI PCI device into runtime PM. As such it's not necessary to include a hardcoded list of these XHCI controllers. This is effectively a full or partial revert of the following commits: * commit 8ffdc53a60049 ("xhci-pci: Allow host runtime PM as default for Intel Meteor Lake xHCI") * commit 7516da47a349e ("xhci-pci: Allow host runtime PM as default for Intel Raptor Lake xHCI") * commit 74f55a62c4c35 ("xhci: Allow host runtime PM as default for Intel Alder Lake N xHCI") * commit b813511135e8b ("xhci-pci: Allow host runtime PM as default for Intel Alder Lake xHCI") * commit f886d4fbb7c97 ("usb: xhci: Extend support for runtime power management for AMD's Yellow carp.") Signed-off-by: Mario Limonciello --- RFC v1->PATCH v1: * Drop ICL and TGL, these need it even for FW CM and don't have device links * Rebase on top of patch to make a table instead --- drivers/usb/host/xhci-pci.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 6e5bcec9b2b16..c17f748b05929 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -58,11 +58,7 @@ #define PCI_DEVICE_ID_INTEL_CML_XHCI 0xa3af #define PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI 0x9a13 #define PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI 0x1138 -#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI 0x461e -#define PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_XHCI 0x464e #define PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI 0x51ed -#define PCI_DEVICE_ID_INTEL_RAPTOR_LAKE_XHCI 0xa71e -#define PCI_DEVICE_ID_INTEL_METEOR_LAKE_XHCI 0x7ec0 #define PCI_DEVICE_ID_AMD_RENOIR_XHCI 0x1639 #define PCI_DEVICE_ID_AMD_PROMONTORYA_4 0x43b9 @@ -73,10 +69,8 @@ #define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_2 0x161b #define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_3 0x161d #define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_4 0x161e -#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_5 0x15d6 -#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_6 0x15d7 -#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_7 0x161c -#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_8 0x161f +#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_5 0x161c +#define PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_6 0x161f #define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 @@ -98,11 +92,7 @@ static const struct pci_device_id runtime_allow_pci_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TIGER_LAKE_XHCI) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_MAPLE_RIDGE_XHCI) }, - { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ALDER_LAKE_XHCI) }, - { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ALDER_LAKE_N_XHCI) }, { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI) }, - { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_RAPTOR_LAKE_XHCI) }, - { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_METEOR_LAKE_XHCI) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_1) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_2) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_3) }, @@ -110,8 +100,6 @@ static const struct pci_device_id runtime_allow_pci_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_4) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_5) }, { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_6) }, - { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_7) }, - { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_REMBRANDT_XHCI_8) }, { 0 } };