Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp180671lqq; Wed, 12 Jun 2024 22:42:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXCZOoFrmbQdu6mARysCzHoJXc905bsjSvGdQiMhf7xjojfJjTVZSR8D0hfilpPkTZBnwQ7LiZ+bhhVT7kx8HrzLRtZkgjvPqTpqPu49Q== X-Google-Smtp-Source: AGHT+IEmprpedDvcWjzeAQXW3HBpD9uoKVqjpiT5H5pmK2V34n15QGjCJuet/79LPPMRx9HFVO+d X-Received: by 2002:a05:6808:1791:b0:3d2:16ca:ba9e with SMTP id 5614622812f47-3d23e0a5229mr4323392b6e.1.1718257379496; Wed, 12 Jun 2024 22:42:59 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-705cc8f6cb5si709383b3a.76.2024.06.12.22.42.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 22:42:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=rU2U5Peu; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-212576-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212576-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 14C71284245 for ; Thu, 13 Jun 2024 05:42:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EAA231369A1; Thu, 13 Jun 2024 05:42:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="rU2U5Peu" Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2068.outbound.protection.outlook.com [40.107.223.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F8BA44C86; Thu, 13 Jun 2024 05:42:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.68 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718257366; cv=fail; b=gsT4SwtGX0pIzL0wbnZoUaDRndHNZOJjKjrhkoREJn6MVQ/Q943SlWgFGEcjdFonEfsl74VcNQnkhIw78GcS0zw8lSW7fZhTaLoPA7yZG3GIGm9MMXpKBcXF8G/tWKDzWHsHN195SXBthQupBdtNeFKgQxRAk5JdI69belV5DDE= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718257366; c=relaxed/simple; bh=KR/rsYXcHWGeiFaXFNUZrhKN5ia0KhnrU9NhZb1Vnt4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=m1t7I6/RrxIMCjy0hC07s7g+4ysk8MSRDfYAzNcat8UVrucddi0sCIUpbzpehrn87DNPCEHhzEcel+ymBe+1UxBLUsUOkU6CfaXJTyZcp+LqTzzZJVk9othZ48KzxtrYJ6M6quXQBoWTiQGSidW3UKgaUtlIAnqVtch1l/9bU6I= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=rU2U5Peu; arc=fail smtp.client-ip=40.107.223.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OB7OmYI1teMk4+UpsjmtOLJLot867OuIKWzvQsUDCIb9NIO4jSzi3u7zBUgHOrcUGzs9FTnFFS9p5xTYIpqqgNdR2RP7LuJuJKtEDhN6l5lvXyP+DdkRkoK+cqV+g4DkuE5BHRLRmSdAXZmM4ZdmM6pTj7sW4Mb1KkLJwrLYpXAtmI7iTSBnintJYvuUBEM8QvDA7CNkDZo2AVNU227wlwRqK++ZWJTg7MkGDLVuG3rsfk0+3COgh45jtpY3re1Cgl102oHRmY6LvoSO3XbICxIz385bwaC6AUtYAxU43ItYfO1STlJeOqsmqKu0bLjmPZOx38JpPLz0XOPzP22d5A== 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=PAq2PJtkFW5xGDWEr6Rg7FxgRenDlGfbXWPfGIp5+8E=; b=PGSmLYIsxfmEi3i96NIrSe4s3QEvEK6QL/bSmPxku8uUMzvGLLBmnvKOXx/1gRBbbAbNkdhBQ26O+edhTkuzZzz5omDfT3ioaNns/i9IriGmFTUMJ/fEQLwtrOW8lSxXjhcmb2G3DdQjfirgG0HnEu70ZHiFel2WmgHQxKfD2abfSJdzgoIMGUUTlIiTQ0ACeQJu7TISTL75rA3zrBtraVQOyWiZNxGAiJZId1qy33EHk6HHLUh18gz8ggabcZbj8BzZimwATCI9bx+8ohUJw4ZmDf27g1O/0Ju/9feuXhM6UvbviviMJiIE6pBAQImMMRjpj6rLtk/BnWAlUfzBUg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=google.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 (0) 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=PAq2PJtkFW5xGDWEr6Rg7FxgRenDlGfbXWPfGIp5+8E=; b=rU2U5Peu/RjzGkqUas3eUdhPvbMppTr2Ww8HPR48aez6qVaxtCqVrXOpJi/IQzBYAmZ8mdq6fbptDE6KVqyVXqxgQ3scYijsEyVXtKhPEP3eRvHK4Wo08von6fAI5uYm4rIFxtlnuKL4ky8k7GDZdyVadn5qsKOCQxmBM2YGUFY= Received: from PH7PR03CA0018.namprd03.prod.outlook.com (2603:10b6:510:339::15) by DM4PR12MB5865.namprd12.prod.outlook.com (2603:10b6:8:64::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.37; Thu, 13 Jun 2024 05:42:43 +0000 Received: from CY4PEPF0000E9D5.namprd05.prod.outlook.com (2603:10b6:510:339:cafe::f0) by PH7PR03CA0018.outlook.office365.com (2603:10b6:510:339::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.21 via Frontend Transport; Thu, 13 Jun 2024 05:42:42 +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 CY4PEPF0000E9D5.mail.protection.outlook.com (10.167.241.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Thu, 13 Jun 2024 05:42:42 +0000 Received: from AUS-P9-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.2507.39; Thu, 13 Jun 2024 00:42:40 -0500 From: Mario Limonciello To: Bjorn Helgaas , Mathias Nyman , Greg Kroah-Hartman CC: "open list:PCI SUBSYSTEM" , open list , "open list:USB XHCI DRIVER" , Daniel Drake , Gary Li , Mika Westerberg , "Mario Limonciello" Subject: [PATCH 0/4] Verify devices transition from D3cold to D0 Date: Thu, 13 Jun 2024 00:42:00 -0500 Message-ID: <20240613054204.5850-1-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: CY4PEPF0000E9D5:EE_|DM4PR12MB5865:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a94e754-7b84-4878-dd98-08dc8b6ba519 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230034|376008|1800799018|82310400020|36860700007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?jWeFbJtlOCj7691paLmIA9oV8tQcwI+ou+Xhsbp5W5ORHoCNkIA0FsmecaZY?= =?us-ascii?Q?aAS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OR?= =?us-ascii?Q?OaHqOpmULfbJrjbpZlXoX+58k6amh20IyU2mX7uyMA2OqaruD5NIGUVT+wI6?= =?us-ascii?Q?Ydj4jmrNr8zOJM2ZvWMaxJWM0HI5YVheTHT6UsU1LJqp312Bu7VcCQ/NRgtE?= =?us-ascii?Q?EScMfgSiMwc/AJ8e1WTF9MqmYrxYjoN4l8ozrLl0LvpHZltdIjsFudgnuw/F?= =?us-ascii?Q?v/tkDWN2tsa0wa0TcMMpiYtbVTkEkEZQq64WXfKUxYGeVZ3uP+ji7kkcxcqZ?= =?us-ascii?Q?1JIQOx5RQMAVEbWacfQApjUrUoXXi2rfhhWEHXkEzaUInty1KLW1rso5m6k3?= =?us-ascii?Q?FQ7mJ6cTmzeTEhZUJ2BBAZbb1sT0RYwzUEtEuYdlu9k0q/0I+fb9P/laL4id?= =?us-ascii?Q?Whf17zFeIl1HChlpktiEJKu31JTTGBhQjcX5pY7AsGr9oBLUYXqXTfKz7KYM?= =?us-ascii?Q?opa6Gth+iYxs1lWNAaP8k48djdEo0o/iS53YSs2g4E+lG8EaNA=3D=3D?= 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:(13230034)(376008)(1800799018)(82310400020)(36860700007);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2024 05:42:42.4340 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3a94e754-7b84-4878-dd98-08dc8b6ba519 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: CY4PEPF0000E9D5.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5865 Gary has reported that when a dock is plugged into a system at the same time the autosuspend delay has tripped that the USB4 stack malfunctions. Messages show up like this: ``` thunderbolt 0000:e5:00.6: ring_interrupt_active: interrupt for TX ring 0 is already enabled ``` Furthermore the USB4 router is non-functional at this point. Those messages happen because the device is still in D3cold at the time that the PCI core handed control back to the USB4 connection manager (thunderbolt). The issue is that it takes time for a device to enter D3cold and do a conventional reset, and then more time for it to exit D3cold. This appears not to be a new problem; previously there were very similar reports from Ryzen XHCI controllers. Quirks were added for those. Furthermore; adding extra logging it's apparent that other PCI devices in the system can take more than 10ms to recover from D3cold as well. This series add a wait into pci_power_up() specifically for D3cold exit and then drops the quirks that were previously used for the Ryzen XHCI controllers. Mario Limonciello (4): PCI: Check PCI_PM_CTRL instead of PCI_COMMAND in pci_dev_wait() PCI: Verify functions currently in D3cold have entered D0 PCI: Allow Ryzen XHCI controllers into D3cold and drop delays PCI: Drop Radeon quirk for Macbook Pro 8.2 drivers/pci/pci.c | 21 ++++++++++++++++----- drivers/pci/quirks.c | 25 ------------------------- drivers/usb/host/xhci-pci.c | 11 ----------- 3 files changed, 16 insertions(+), 41 deletions(-) -- 2.43.0