From patchwork Tue Oct 4 04:12:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 612811 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 B81B2C433FE for ; Tue, 4 Oct 2022 04:13:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229650AbiJDEM4 (ORCPT ); Tue, 4 Oct 2022 00:12:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbiJDEMw (ORCPT ); Tue, 4 Oct 2022 00:12:52 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2055.outbound.protection.outlook.com [40.107.220.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D02D26554; Mon, 3 Oct 2022 21:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gCfYb4ac9H0j9QaRacc2kZ0F3uVnXEY+bC2MMkX1apUIqVqV+dzO+i/ox9FXXsufsIbWgnFjLUcfXrhrrsuxJ2uzy41hCxd4UQlTaeQBQ7DEjoZjulaTYGbdt5bXGC3JDRzW0spOCrqCLTRwFbAZ4ksFElhCh2oglRHDI2jwLMrituy/EA4bFyu6wL+jF0viTUZvtW9jMmxAzcbg0K4V2OYxiL0+AG+R6IvnOkxkoaCEhQiXXkPKvQlym1X2AUib5nHBwI6xJsI/sp7LMWV5KDgURVblYxVv9rhKjenxzwNk/B/f6lP5r5015Nmf5MIWPBLhmiHm9PpeWSB9We3EYw== 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=4C6bFkfjN4Pub7xVIiyiqWZXCFOMHoZz4vJabvFjAE4=; b=CiUK6NYoB4JiSMT7/8jqddaa1FitmWy13DXOoCmnKC/4+5oDps2/TsHt02NOle5StOzVp5PH51pDJ+NTuc5etkw5BmFzEIVBc1GoC7BgSn5gAJ7TVoWn00Axaq2x++p8dXu0s3Q1h7IE5/5Y+bNEv7b4f/HBo/gfBGrO+PKUHsF+qZy9zGh5vx4xEn/ODC/AYswrYi98gV/LTJAdSoPBRPEibrSDKc3QUWGXGAUG1VcoJj4G89//mW4PgZGlW9luCifOQAA6LCQwHsRRg8Qn5zroaazMAwPITD1en3VnhtMtktHZf7lDHa/iLfSrQX/l6sD8mCUmDRWjVRijAtos0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linux.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=4C6bFkfjN4Pub7xVIiyiqWZXCFOMHoZz4vJabvFjAE4=; b=zCHmlWRnHjY26IFTB/tBgP363ypoG5+73XThGha3NEtAHmqrXrbdW6NYdGY15iIiXK89x9AM2vs5d5TpbW9gz+cMTDPokgK9Auocg8r+rUJv5wOr4MjeoOpGPjRNvzdghgpBdvB7/0EyuJrgKmXwliNdayIScp0bsD4UVy84F10= Received: from BN9PR03CA0149.namprd03.prod.outlook.com (2603:10b6:408:fe::34) by PH7PR12MB5709.namprd12.prod.outlook.com (2603:10b6:510:1e0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Tue, 4 Oct 2022 04:12:46 +0000 Received: from BN8NAM11FT080.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fe:cafe::92) by BN9PR03CA0149.outlook.office365.com (2603:10b6:408:fe::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.26 via Frontend Transport; Tue, 4 Oct 2022 04:12:46 +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 BN8NAM11FT080.mail.protection.outlook.com (10.13.176.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5676.17 via Frontend Transport; Tue, 4 Oct 2022 04:12:46 +0000 Received: from localhost.localdomain (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; Mon, 3 Oct 2022 23:12:45 -0500 From: Mario Limonciello To: Mika Westerberg CC: "open list:THUNDERBOLT DRIVER" , , , Mario Limonciello Subject: [RFC 1/3] thunderbolt: Allow XHCI device links to enter runtime pm Date: Mon, 3 Oct 2022 23:12:23 -0500 Message-ID: <20221004041225.1462336-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221004041225.1462336-1-mario.limonciello@amd.com> References: <20221004041225.1462336-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: BN8NAM11FT080:EE_|PH7PR12MB5709:EE_ X-MS-Office365-Filtering-Correlation-Id: 590ffdbe-ac1f-4731-0b37-08daa5beb188 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WKADt+Bko918GmouAa68HFuDFYiyyrttjba7Lyx5bKlqlompZccerdG9aaxEDcjtjT/ZuT3j71k/GqPgRhNxMK8Ea6HYdp9m5CyHVTJGm7glM3gPhOOqLpK9KL/VFsd6FINz5gGUXmmSNze531x7XFwYybbYHdgpsjxIpRxANOZdk1tcmKgsPKgwCi4NSvrL7OG/pbuJpPXij81Fz77aQ86WyHVWIcQb4ysW49SVkbJYH+hD7BWXJkfw3Cydg4fnjYj8DJwOQxLyJInZRLMamXs5ndiwAje4Rav9UVHpAQ6ymwvN5wyDHmHDVDR7a9e1HuH32a+S77oQ1L7a0w8oVV/rbarEb29SnDjkSDxpDHywscTSuhfyZfrOxIYVPewxtqgBr+h6HO4DrjmqcCJavtT8j7ltDFKaLTKg6+4w4m5oocmDNx+1nWyX5QOxJjetYPPoO+gigdJdKYbav0ELaWNGPGAHu4Kc/Nk19Lo6iY3osLyaVWwnyQOA7hM01vzgtQ3RL/AHBRjzV+fcvlKUTKoncV37K6sf/gjOLfU6jzv0K3JBj/RZ2zM88MgkQXWMmWsG0UORQAaVu3adTkdzVw0TfaujqRIWirdoNrkzHn8s92QLbpcQWB9mNxaVnb3hNHDeSnDNIvTOAAXZIdfX/2w7Vr+efeudSfIHhD7u0XReFdzR04AC5+hJmJ4C25ql+6nIKL2dK6ZJNPK3RezzCs3eboBEsa5v682VZpZmrfImdpwgeo8uv0zBUq/ysnHaufgQz7SQL+u0lT+paAAUMNkd5xjdhEt1aSo6wXGgU3OCfKYlPZLv4Y9kEeJ6fFoY 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)(396003)(346002)(136003)(376002)(39860400002)(451199015)(40470700004)(36840700001)(46966006)(2906002)(356005)(82740400003)(86362001)(81166007)(36860700001)(36756003)(2616005)(47076005)(40480700001)(8936002)(82310400005)(44832011)(1076003)(26005)(186003)(478600001)(16526019)(83380400001)(426003)(336012)(6666004)(54906003)(316002)(6916009)(5660300002)(70206006)(4326008)(70586007)(8676002)(40460700003)(41300700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2022 04:12:46.6417 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 590ffdbe-ac1f-4731-0b37-08daa5beb188 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: BN8NAM11FT080.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5709 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Both on Intel's and AMD's USB4 designs it's important that the device link to the XHCI controller used for tunneling is able to go into D3 for appropriate low power consumption features as well as for system suspend states such as s0i3. Historically this is accomplished by adding to a hardcoded list in the XHCI driver, but this requires a change for every single platform. We have a very good proxy that it's safe to do this since the firmware has indicated the device link needs to be made. So opt all XHCI controllers with these device links into runtime PM. Signed-off-by: Mario Limonciello --- drivers/thunderbolt/acpi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/thunderbolt/acpi.c b/drivers/thunderbolt/acpi.c index b1f0dc8df47cd..5ffca085a47e3 100644 --- a/drivers/thunderbolt/acpi.c +++ b/drivers/thunderbolt/acpi.c @@ -75,6 +75,9 @@ static acpi_status tb_acpi_add_link(acpi_handle handle, u32 level, void *data, pci_pcie_type(pdev) == PCI_EXP_TYPE_DOWNSTREAM))) { const struct device_link *link; + if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI) + pm_runtime_allow(&pdev->dev); + /* * Make them both active first to make sure the NHI does * not runtime suspend before the consumer. The From patchwork Tue Oct 4 04:12:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 612528 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 9934FC433F5 for ; Tue, 4 Oct 2022 04:12:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbiJDEMy (ORCPT ); Tue, 4 Oct 2022 00:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbiJDEMw (ORCPT ); Tue, 4 Oct 2022 00:12:52 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2086.outbound.protection.outlook.com [40.107.220.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42C302654A; Mon, 3 Oct 2022 21:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aeAtLMmL3119DZkRe0sE3ioCBrPjynoucjigbDrO8qAcwqmQ1f5LEsOCP8zq0T4trj5T2YoaBQ6NWqz3DrjLCTZjHHo3agNhq/dedGO2986ZcMSLxAvxqrZsP6IYwg3UuwyfvgxWT+NhVCQsYqvAN8Ayet2C2wdBbPrBYKAo+p+S1BVeMa1AAG8L897SBPKSNnmUG76p+WtbUxiiktJE7BNBfDGBRq7DMhFX4i7U/aab1kzCh88menXaQJfmfOe+fEa+hMhGg45OTZY0cwORIwv5wJnKoHY8fch5axHaHtc0QNWBuFdNDCkJqjWVv95w3XBW4O/2xV91xJmcjvHj/g== 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=1lqcgjhFpooZvepJY9X/OtZ5qWYJZdS5uWepWaHfHHE=; b=munKbcICqORNFHlz43MtdpEWXFN8qIYVVHKSIDjuIZLXxlggUXYlzew8DS3EowjonN5S2drhorbGHE0jl3C0aV86joo1oSinZxsJXui8ZsV497hGrul/TXf6fFw1eQQ9XZuqXlI2pLZE3JET4Jd1b7U6jeZ1KufU7qCfV9aFH0OPZ/eNEBc7y+dQ5XzSNVdTIgU8R3a/UjGteq2PnRrLMtuhnbapwcAfBAWK5+MDCHw1N+R05qRWyBnxXQejmaa20EIqhJ82YVAxUk79tWKQBjWkzR7S3fFuGxgILHVLWgN5S3izJXQ4aJmwp8LKhs1A1e/DN4Y8GGSN/Sf2t3dhAw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linux.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=1lqcgjhFpooZvepJY9X/OtZ5qWYJZdS5uWepWaHfHHE=; b=yjQnW+tc5/TdKVnvH464vZX6P7LE/dlyv87WmttCBjLaAToVRtHliXSsDzoPVSpd8R3aPzOh/97FFk72jlus/Cq73fMCfmW8Rjdh6ZKpZqs3vk6NLv9+r7ynJsj66M8dOOIqXwWCJy+f7HXJUPiDCjB5k965GHmkZVPL9GV2HK8= Received: from BN9PR03CA0139.namprd03.prod.outlook.com (2603:10b6:408:fe::24) by PH8PR12MB7028.namprd12.prod.outlook.com (2603:10b6:510:1bf::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23; Tue, 4 Oct 2022 04:12:47 +0000 Received: from BN8NAM11FT080.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fe:cafe::dc) by BN9PR03CA0139.outlook.office365.com (2603:10b6:408:fe::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.26 via Frontend Transport; Tue, 4 Oct 2022 04:12:47 +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 BN8NAM11FT080.mail.protection.outlook.com (10.13.176.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5676.17 via Frontend Transport; Tue, 4 Oct 2022 04:12:47 +0000 Received: from localhost.localdomain (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; Mon, 3 Oct 2022 23:12:45 -0500 From: Mario Limonciello To: Mika Westerberg CC: "open list:THUNDERBOLT DRIVER" , , , Mario Limonciello Subject: [RFC 2/3] xhci-pci: Remove a number of controllers from the runtime PM allowlist Date: Mon, 3 Oct 2022 23:12:24 -0500 Message-ID: <20221004041225.1462336-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221004041225.1462336-1-mario.limonciello@amd.com> References: <20221004041225.1462336-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: BN8NAM11FT080:EE_|PH8PR12MB7028:EE_ X-MS-Office365-Filtering-Correlation-Id: 931fa7a0-cb1a-47a5-5591-08daa5beb1d4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ATzTEh9ZJi77RTCj2YUvANNCxaFmxRFqC/IElgeYB7YA40UcVvwM3fWnj60NvNuLLUaMYcSNeBeQ3AWdDv6GWXPrYDgqBXd07dPwmBofhG4RFarpjnNOEoZufglwJ9BlsLesF8YRBd2D4pxwFkHca7E9whckAFE5dzTe+1m2ihyO1IAL5mCEL/uMy2smrQ0p6p9K+Y2whxKBKoVsl0RXg+pXxUXbCZ/skLRHnil41VzrDt3cVAz7ZqqpiK0wfLpNraUXm3Xv5tT48M68V6Nd0XVN7JyOIdQDC9SvtQm3dxoUeCM5/CBDRsVeheYVL3it2YRo9EZJD+H2cg1OEPc879V5kAJMw0Sb8Jn6EhPOG7VZrgflGNYwpRl5wWE/bLJsBmTjIpCjWrBCnqOPdTP3k/3IaF+vYnj+U5b/izeJ0kDw7IvmOBQyJVmOpqo0uC9hwbrzZWqA3hfEsw9Z1z84e9lyLIPT5GfDk0auY9OYvz23T/wE92nU4Eck/HDe9TkgWEdCizULy4FZnQ/tYfneJ2LCvU4xox1x4isla6RB9GYtvZmiYHpPJJKMxyBJMdJfLtyijVQP1Y2WdHYEEuF4FXMrq1XE/mxmeeta1vDlmbic4FQJjAQF9xNdLt7U5vrt21gkIqWb+e377y5TL8krf6tMth81iptab9sJbNx8lteQ+tmoVtiDtcQG7/trhi4qu5DJnHjKd7GKXMRrhT9cg7YWH1NKs5+Lb8hYDnKHesX4xKgmwGvgPD3HjkyWjU2Ub09f7htTByr0b4UNt99MGl4YzAtDDY+pj484XgcGtU2vNmjlV2Z9i1ZX0kbzsCDl 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)(136003)(346002)(39860400002)(376002)(396003)(451199015)(36840700001)(40470700004)(46966006)(1076003)(47076005)(2616005)(16526019)(426003)(336012)(186003)(66574015)(41300700001)(81166007)(40480700001)(86362001)(6666004)(8676002)(5660300002)(26005)(4326008)(82740400003)(82310400005)(40460700003)(36756003)(356005)(83380400001)(36860700001)(2906002)(54906003)(6916009)(44832011)(316002)(8936002)(478600001)(70586007)(70206006)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2022 04:12:47.1417 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 931fa7a0-cb1a-47a5-5591-08daa5beb1d4 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: BN8NAM11FT080.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7028 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 6a7c533d4a185 ("xhci-pci: Allow host runtime PM as default for Intel Tiger Lake xHCI") * commit 07a594f353655 ("xhci-pci: Allow host runtime PM as default also for Intel Ice Lake xHCI") * commit f886d4fbb7c97 ("usb: xhci: Extend support for runtime power management for AMD's Yellow carp.") Signed-off-by: Mario Limonciello --- drivers/usb/host/xhci-pci.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index dce6c0ec8d340..44defa8b796f7 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -54,15 +54,9 @@ #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_2C_XHCI 0x15e9 #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_4C_XHCI 0x15ec #define PCI_DEVICE_ID_INTEL_TITAN_RIDGE_DD_XHCI 0x15f0 -#define PCI_DEVICE_ID_INTEL_ICE_LAKE_XHCI 0x8a13 #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 +67,8 @@ #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_YELLOW_CARP_XHCI_5 0x161c +#define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6 0x161f #define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 @@ -266,14 +258,8 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *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)) + pdev->device == PCI_DEVICE_ID_INTEL_ALDER_LAKE_PCH_XHCI)) xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; if (pdev->vendor == PCI_VENDOR_ID_ETRON && @@ -342,9 +328,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) 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)) + pdev->device == PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6)) xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; if (xhci->quirks & XHCI_RESET_ON_RESUME) From patchwork Tue Oct 4 04:12:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 612810 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 A3403C433FE for ; Tue, 4 Oct 2022 04:13:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbiJDENB (ORCPT ); Tue, 4 Oct 2022 00:13:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbiJDEMz (ORCPT ); Tue, 4 Oct 2022 00:12:55 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2059.outbound.protection.outlook.com [40.107.243.59]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3D4A26562; Mon, 3 Oct 2022 21:12:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HRcGsbA0t3ByHHoRJdjARETvdtXVqtUCQ0T/3Amj220HwUKQtEisHQV/tKs8XLGKVPj/IX3kS5I7KEjD1pOraP9khvWdYyNxShn+wLEQGaXezshI3qG+g5w8W75TYhwsqKVVx/sd8GqO9/4XNo6e//WonEcaCpOf+2X61wWVm0K/8qoQJOwFSumxiHkqLuD0QJz8mHWz9Tssp2CRadTAvydvICnVZ+zIlMFSTqpV2pZ5H9Se0RU1WbCnl7piLSLNaLw2NAHQumBYWTDksnovmaFIVEcQyBjIN7iU/3FzYMWvT9FkzfB+eEZvLDbjTlUTKcTjNmN4vvYRXEY2dPk1Cw== 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=K8vNCnYCQ8noFpvUzUi38+/Uk7zudR4MubiMYo1Sfhg=; b=g2j1OVEeBY5EuQccTUk0whNAwqSWCND0Dk0iy2S45qOsJgrjt0MZqhhu7FcdztmYvPy3578w6V29mhLLK3n/FAQ4FBhXOLE6LNJyJGW6U/LNAA3KOwTLTHdbEIuaIRkPnWZwncIc6Gbcx4jA0aMNGyjsDAp2H06sTtXMtawYNfMroFmRBTXBAeSzqpqWaf3yZ3llfZAm2oABNUexopqT+Kq2nnITty4NLU3ULanNdRrRWdGQkr/d2rZxvqOrtFGn1Md3a3CDNt6q4sRPmEauflMiDsrLW1rsFc/e1T2zcWKh0dmyQYScs/6+ix/KNIjCotqoAXlsnqhTD8p2io7S3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linux.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=K8vNCnYCQ8noFpvUzUi38+/Uk7zudR4MubiMYo1Sfhg=; b=3zFvG+1tqW6m18lP8pIK+A/Jr/IQoOzs9cj7yMKXadv0GVYH3qA3V2hoEhW6pradnEh03vlMDwurlh/B7DXXrnfw2bYNFcOUG8fLwqlfv5VrEwMM6eiELt1+fGtRvkQUg8ij2w4f510TsXM//6wliVhubnDY60Ad29iEzSYycj0= Received: from BN9PR03CA0133.namprd03.prod.outlook.com (2603:10b6:408:fe::18) by BN9PR12MB5178.namprd12.prod.outlook.com (2603:10b6:408:11b::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.24; Tue, 4 Oct 2022 04:12:48 +0000 Received: from BN8NAM11FT080.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fe:cafe::8d) by BN9PR03CA0133.outlook.office365.com (2603:10b6:408:fe::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.23 via Frontend Transport; Tue, 4 Oct 2022 04:12:48 +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 BN8NAM11FT080.mail.protection.outlook.com (10.13.176.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5676.17 via Frontend Transport; Tue, 4 Oct 2022 04:12:47 +0000 Received: from localhost.localdomain (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; Mon, 3 Oct 2022 23:12:45 -0500 From: Mario Limonciello To: Mika Westerberg CC: "open list:THUNDERBOLT DRIVER" , , , Mario Limonciello Subject: [RFC 3/3] xhci-pci: Allow host runtime PM as default for AMD Pink Sardine Date: Mon, 3 Oct 2022 23:12:25 -0500 Message-ID: <20221004041225.1462336-4-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221004041225.1462336-1-mario.limonciello@amd.com> References: <20221004041225.1462336-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: BN8NAM11FT080:EE_|BN9PR12MB5178:EE_ X-MS-Office365-Filtering-Correlation-Id: 38d2a5bc-e56b-405b-ebfc-08daa5beb24d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qlr5U1LRASfKdaxI4yZjLzYQAeYr1C8O2XdmHE8YHgz/AJKNr0nt/gSQ7bt/WTbp4GGzT12FFQ9LCvrQ+yiB1m6kG07ckyn7Xa/xtfikn1aKQiMi56IkVsgyc/B0PEhcZbe9/0AXelsXyW80b936vzanDebTKnF2/FEd3O2q50LT1xuT7CUPrVKrXq4NPbV7UH06992mpZaQx9f71y+AVwxU/r4n4pghiO34BB7SzGcMYwq/8TQTd7CidHFmiBVuuSSPF4AfgQmHhqJQNOQrTHawvcVKXW4dvgWdMEUBnKGLqlwz9KG7+hPdEFVNiKpa2o3JZDeGk66vxBPNTHLr43ejGn306m+6kA8457VYvLW/Ml3zI+fNrjni+foX3m0JmjRPm3GxvYX3CZA6Xh5L+3Ac7LsPgf4F2HUmvDP1f5kL9a2PBIj2vgOdlP5nyWr2OyHKv27p0Kji7wDBanmBpiEk6eDLBNEurg+fqV4a2OHhQA3w7zBAuXmah3FOZ+Bv7nWy9muBgxxm2o7/j6/7lNU+G9M/fr58QaaKap0jr76uCHbPCI0QsFsE+6Dw+zsCETLj3OrjjoRhnKFOKP7RKYgGQAPZFgE9YxZH5jUTfnVkVrV68lxJFoo1p1f/6B0Z6ePpQmkYdS7GnjN8mw02PNIjrv8YdUf8mI1xY7KXELOsrrUy3JrB1lVTKmIpy5SnRYwrqu1wZDU6KOtLS5r2M/ubnDjYM3in6nrryWQUCOhxsyh2FwGrPgaCO6m2SNI5JKTr0SVclI3LwQdLzYS7GqekgafU72u5HfrBbgkuwKj1IQ0cS0OK0ep9dx8u2NYF 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)(136003)(346002)(39860400002)(396003)(376002)(451199015)(46966006)(40470700004)(36840700001)(478600001)(82310400005)(186003)(1076003)(2616005)(8936002)(2906002)(5660300002)(356005)(426003)(47076005)(6666004)(16526019)(70586007)(70206006)(8676002)(4326008)(336012)(26005)(6916009)(54906003)(36756003)(316002)(40480700001)(36860700001)(40460700003)(82740400003)(44832011)(81166007)(86362001)(83380400001)(41300700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Oct 2022 04:12:47.9385 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 38d2a5bc-e56b-405b-ebfc-08daa5beb24d 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: BN8NAM11FT080.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5178 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The XHCI controllers not connected to the USB4 controller via a device link can support D3. For optimal runtime power consumption on AMD Pink Sardine, all XHCI controllers must support runtime suspend. Signed-off-by: Mario Limonciello --- drivers/usb/host/xhci-pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 44defa8b796f7..a569b29a46a99 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -69,6 +69,8 @@ #define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_4 0x161e #define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_5 0x161c #define PCI_DEVICE_ID_AMD_YELLOW_CARP_XHCI_6 0x161f +#define PCI_DEVICE_ID_AMD_PINK_SARDINE_XHCI_1 0x15b9 +#define PCI_DEVICE_ID_AMD_PINK_SARDINE_XHCI_2 0x15ba #define PCI_DEVICE_ID_ASMEDIA_1042_XHCI 0x1042 #define PCI_DEVICE_ID_ASMEDIA_1042A_XHCI 0x1142 @@ -328,7 +330,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) 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_6 || + pdev->device == PCI_DEVICE_ID_AMD_PINK_SARDINE_XHCI_1 || + pdev->device == PCI_DEVICE_ID_AMD_PINK_SARDINE_XHCI_2)) xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW; if (xhci->quirks & XHCI_RESET_ON_RESUME)