Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp434765rdb; Thu, 8 Feb 2024 09:58:03 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV15KyRpQ/Slqijs1vtwizjGzSvnSIp3YxC7E6EpKHWkeNWYeliBchuc4Nz2FTSDYD6ZA1igxHRThxBi+0MRFJA2r400yhaKpStUQLgkQ== X-Google-Smtp-Source: AGHT+IG0sAavCIY/Lfgosc45oeeAAiPbJyuEoWRJ7GFkrxxSVRIK5la3g9jlrUu+tOD5TdNZhkHj X-Received: by 2002:a9d:7c9a:0:b0:6e2:babb:7dcc with SMTP id q26-20020a9d7c9a000000b006e2babb7dccmr213974otn.34.1707415083432; Thu, 08 Feb 2024 09:58:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707415083; cv=pass; d=google.com; s=arc-20160816; b=jx9iCA9VKs2c9X8D9Q07DwaquiDTUIc8Ez3zwULvmQjA472c4AtGkoDofDrL6xAnYY if4DDKidZmCNm5DaUW1G31z4ubjXc5eBaWS9WxOiVEs0BmUlAo/aivjKjESSzuI3C8zn gCJFkNrvcmu0wvTDznkkeFrxfEHoi50c0SvAKJsqqJ7/q2y76SCT3gHAmcaiTKejv2bW XmHw5hH8eLfg9kF/gitWkeQJ230TX9rvzvE1iQIL0cHyTB1N6gJdsGdocsHpeH2XiBeX xlSWHXbVV/AXh/513utgqxo94xVZmhLnGG0UZKsUJgfaQeV/VzUl3lWv/7Iz6kdgS0OX e6Vg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:organization:references :in-reply-to:date:cc:to:reply-to:from:subject:message-id :dkim-signature; bh=oupV3kTT50Gb/TGEGdVzk1Z4pRuREEf427kVS39VzdQ=; fh=U91wXvqfsS7Q23X9Q5k6oYNKe/YgNQLVSlL7Z+5BVFo=; b=HWwzDEZeSBraSf/ZZQU/DEgtoeef4cpE94xETz84fjYls5PjFm3gJiQOTnc/KJJiLW doTUuDshUEQtjHZyYmaQiA0rb1tRv5+bwz9j09AUYUEGiQR4cSrqy80gNf1ryqkyEFMm 96BlEw4R7VopVeJEMQi6MqvLzQzE1jQZExvD7G+7wW96hucVHCgOu+9o8Y1K3tSERREX YRH5osxTEMavUA8LAiCxiep1wdo53kbYBV8E5+ix2bAsEo/sI2cQ24B1dI3ilFPYRVxm O+zsRsodocWRFBNmqaEBPH+/k7w/uenC0Ko3mBZ1MFoNCyRr4scmnAZjl0Ximcc9gWz6 pg7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QMZ5PSoR; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-58387-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58387-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCVx4S9Pg7lc/gi6HdaHInTHgzflo16a/616HNAPEfMVHdJPB+SZwBHnJsVyQSgQPcfltMWWrde5ZgZ2Nv3MqqQ0+ppJVbkMVf9bTo6MxA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y188-20020a6364c5000000b005dc4912432csi129816pgb.577.2024.02.08.09.58.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 09:58:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58387-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QMZ5PSoR; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-58387-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58387-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id AEB9EB294FE for ; Thu, 8 Feb 2024 16:57:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C014581ABB; Thu, 8 Feb 2024 16:57:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QMZ5PSoR" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (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 72A957EEE9; Thu, 8 Feb 2024 16:57:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707411435; cv=none; b=RyxM55HpxRalyz96SC2NbVls3DTBWBPCYO7RZ8IyFsPjTWWnPeSQ1LzDzYRGwu/7SAi8dhoyRxFk6mtOpbVzFJtrdVHOi8DzHJROta8vmQmxZ+ZA9qoKu+uf6jpZAKtT7Y7c6Rl+aRjjw4kRC60FYR81hwtAQyXHd/jcpIiHT+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707411435; c=relaxed/simple; bh=oupV3kTT50Gb/TGEGdVzk1Z4pRuREEf427kVS39VzdQ=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=SJf3F650l/OBYIg/udlfYPIEKyyR36di7CERG6DyjRVEhbyV3REQHKWSxTO+e06abAbtuJGUZnXM+8rrSwSWP9pubPYJTBInJmKE4uqTCLd6dR659uBnMYTzZJyUamqLiVoYhhETcoImTN6cS8uiBxLKhgoPJdhqyYGlpxfEboQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QMZ5PSoR; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707411435; x=1738947435; h=message-id:subject:from:reply-to:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=oupV3kTT50Gb/TGEGdVzk1Z4pRuREEf427kVS39VzdQ=; b=QMZ5PSoRCbKfK8Gme951C45eUBpfyQCmg9JfTPM/s0WNmnDHZMZpqTDl 1TvCEVlBByIWDR2EAnIHUNic/OwHm+sm7ARxGCUG7/5EaSCaFtGB0Vv/M MT6cu4UIPJHaRfVLG/KdMi8IyaaEF90Yhbneci44nex8cTHACKqKLlM5C 65XAJ1DuPV30FNCtpviiewRzgKz0pjR7Dd2TwWlKzdH+SSgGQoxOsAWzb N8invHlQ1ymtmJb+l3+aUk8NwnTOu7TO3Y57OrKBQpt6TKD0Hk+VggqJq 1n1M7sxUzKTdRgKd/kuZj/7gAQy9gnpq794OARJtZ6ftX5SD3er7I5k+1 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10978"; a="1557693" X-IronPort-AV: E=Sophos;i="6.05,254,1701158400"; d="scan'208";a="1557693" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 08:57:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,254,1701158400"; d="scan'208";a="2072780" Received: from linux.intel.com ([10.54.29.200]) by orviesa008.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2024 08:57:14 -0800 Received: from ricardo2-mobl.amr.corp.intel.com (ricardo2-mobl.amr.corp.intel.com [10.209.74.190]) by linux.intel.com (Postfix) with ESMTP id DA4F1580C9A; Thu, 8 Feb 2024 08:57:12 -0800 (PST) Message-ID: <9654146ac849bb00faf2fe963d3da94ad65003b8.camel@linux.intel.com> Subject: Re: [PATCH v2 1/2] PCI: Disable D3cold on Asus B1400 PCI-NVMe bridge From: "David E. Box" Reply-To: david.e.box@linux.intel.com To: Daniel Drake , Bjorn Helgaas Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, bhelgaas@google.com, mario.limonciello@amd.com, rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux@endlessos.org Date: Thu, 08 Feb 2024 08:57:12 -0800 In-Reply-To: References: <20240207084452.9597-1-drake@endlessos.org> <20240207200538.GA912749@bhelgaas> Organization: David E. Box Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2024-02-08 at 10:52 +0100, Daniel Drake wrote: > On Thu, Feb 8, 2024 at 9:37=E2=80=AFAM Daniel Drake = wrote: > > > What would be the downside of skipping the DMI table and calling > > > pci_d3cold_disable() always?=C2=A0 If this truly is a Root Port defec= t, it > > > should affect all platforms with this device, and what's the benefit > > > of relying on BIOS to use StorageD3Enable to avoid the defect? > >=20 > > I had more assumed that it was a platform-specific DSDT bug, in that > > PEG0.PXP._OFF is doing something that PEG0.PXP._ON is unable to > > recover from, and that other platforms might handle the suspend/resume > > of this root port more correctly. Not sure if it is reasonable to > > assume that all other platforms on the same chipset have the same bug > > (if that's what this is). This does look like a firmware bug. We've had reports of D3cold support mis= sing when running in non-VMD mode on systems that were designed with VMD for Win= dows. These issues have been caught and addressed by OEMs during enabling of Linu= x systems. Does D3cold work in VMD mode? David >=20 > Just realised my main workstation (Dell XPS) has the same chipset. >=20 > The Dell ACPI table has the exact same suspect-buggy function, which > the affected Asus system calls from PEG0.PXP._OFF: >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Method (DL23, 0, Serialized) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 L23E = =3D One > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Sleep = (0x10) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Local0= =3D Zero > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 While = (L23E) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 If ((Local0 > 0x04)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Break > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 } >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 Sleep (0x10) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 Local0++ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SCB0 = =3D One > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } >=20 > (the "L23E =3D One" line is the one that writes a value to config offset > 0xe2, if you comment out this line then everything works) >=20 > However, on the Dell XPS system, nothing calls DL23() i.e. it is dead cod= e. >=20 > Comparing side by side: > Asus root port (PC00.PEG0) has the PXP power resource which gets > powered down during D3cold transition as it becomes unused. Dell root > port has no power resources (no _PR0). > Asus NVM device sitting under that root port (PC00.PEG0.PEGP) has > no-op _PS3 method, but Dell does not have _PS3. This means that Dell > doesn't attempt D3cold on NVMe nor the parent root port during suspend > (both go to D3hot only). >=20 > Let me know if you have any ideas for other useful comparative experiment= s. > Daniel