Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp155420rdb; Thu, 8 Feb 2024 01:53:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzZ88lbAF2GYUAUf5cxvC/efnPFD8ZofNbOBxMp/O+AZ9D5/SCzCJROn4KoqCsb0/rK0Cs X-Received: by 2002:a05:620a:1a90:b0:785:35e0:5e75 with SMTP id bl16-20020a05620a1a9000b0078535e05e75mr10467294qkb.41.1707385982118; Thu, 08 Feb 2024 01:53:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707385982; cv=pass; d=google.com; s=arc-20160816; b=BHat9KmIp/ZX5+UsURHH+IcT+F7aE6sCpFeDlGy410EzPqUNi/O31BhkyYQn/b6Tel GDypgXY4A1+OSp4kU955wgXb7bAvUysHKE85ZcymjZLbgv189ce11ptM+mdQZ1C3UDsJ XJB3mDHp6ZSUD9YOwaitIpOSZPRNfBeGGfqjDdUGwYAQkJpmbjH92mZeIARK2U/QQ3Gf w8Gqzl+jt8HozmaCSQLALQyuyzhtOZdgC8fE92Ysi6A2KbAePLBipHNuF0v9qCp8S4Uu 8BZ4qq8c1OxvMuZ9HgPOErXBu+PxiyGLD3t0DVaptfg5AenYHZhs2J0TGtLVhq1kI3Q+ rkMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=FVZrDw08jx/+WS3cBHZbP06Mv/MXnXO3+N5Y9WPwJKc=; fh=yV+rlbmcDgznGRNleKxpmRJn7eqSi01Vvwdp0kIhTOY=; b=I9pNht1cycjsUgudngm722PdfwyvQyB0mxXZhWUdcaNcXsizDopFCOSHWFqrrleuc1 JyV1aKPTPqn38b0/vMU23juBcACURjl+5yP69kb6d27/InMoy+UygYa6sAsSMNItUH9c uYSKfOkuSTVjmWEMFDslMgip2u6DkBz+V5hf1kjNDXP+U7iqi60oNOYCkugn0adAQKzC drgjfOtMek85S6UbH1Evac5KLTYT7lpsJRJEUWI48pLUw//TJyOCYc0IwwGqnObo3kH1 YAhxRB6wtd7vSyQCiQz59OddujoD1OrWAIsuywbwnkmJF49RYT+bQAwDi4wy9qm/EP8h qknA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@endlessos.org header.s=google header.b=tudDLVEs; arc=pass (i=1 spf=pass spfdomain=endlessos.org dkim=pass dkdomain=endlessos.org dmarc=pass fromdomain=endlessos.org); spf=pass (google.com: domain of linux-kernel+bounces-57774-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=endlessos.org X-Forwarded-Encrypted: i=2; AJvYcCUiznz0fkNFisR80gAmpUoyXF+UByyhD8fwPmCiaMX5aTgE5nlzfs41eikCnxNnKSLrJMMP+tfK6YCNjT6pB9UPyRozLSkAZUloT74QJQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c30-20020a05620a201e00b007858b7adb7bsi2952194qka.70.2024.02.08.01.53.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 01:53:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57774-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@endlessos.org header.s=google header.b=tudDLVEs; arc=pass (i=1 spf=pass spfdomain=endlessos.org dkim=pass dkdomain=endlessos.org dmarc=pass fromdomain=endlessos.org); spf=pass (google.com: domain of linux-kernel+bounces-57774-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57774-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=endlessos.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D9A8A1C247B6 for ; Thu, 8 Feb 2024 09:53:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 507526BB2F; Thu, 8 Feb 2024 09:52:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=endlessos.org header.i=@endlessos.org header.b="tudDLVEs" Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B454F6BFC5 for ; Thu, 8 Feb 2024 09:52:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707385974; cv=none; b=RD6KKOydq0VU+cqjm0moHwwKP6NCT4bOqYE+fOrBFlA6DqBWBLYzzW7KUJWLaTr0bMJZpbR9a9cXXC/8Y6LIk4x0U8LeiHVTN9aQsNLtMH2xS86Vjj/pWovhybgUCEB0zt6G2QzcxrjsxlRknNqu2ZQ6mZkhrB1LJ382VZjhTa8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707385974; c=relaxed/simple; bh=HHlgklhEHH9O7ta3u1cLYxPyu4OGTsMH97Y+4IfEOao=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ZnTl94ndbmDtvMunhQpUeQdcadADLkJlUxQXfdggln7JBud4G3okSh3m4A9ehfIE9bkB0dnXMUb+3LwlRtUxMMM8n8CYVwgZf3IyF9/ElGK/zPhNz2Yzze59LT+2A7z2ZpMYYWMGpQYWCfjVge9wt+s2hU0Qtnsn4Q5nl/fsGM0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=endlessos.org; spf=pass smtp.mailfrom=endlessos.org; dkim=pass (2048-bit key) header.d=endlessos.org header.i=@endlessos.org header.b=tudDLVEs; arc=none smtp.client-ip=209.85.219.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=endlessos.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=endlessos.org Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-dc34d761e2aso352991276.1 for ; Thu, 08 Feb 2024 01:52:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessos.org; s=google; t=1707385971; x=1707990771; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=FVZrDw08jx/+WS3cBHZbP06Mv/MXnXO3+N5Y9WPwJKc=; b=tudDLVEsisWPpzROJ05zczqStpTC8X0SOAFddSbSaxuZFzK1SN/PbP/b0CuNcjcure z/SOjMtL7nbtokwWJvW3aEWZm5fynOYSJ59tSRxrLZo569vUaljHRd7XCi+Kn/OK6KEQ nUmxS6bdU1/lYN/Bl4uHc50YKB35J5aOERL+Y4zfVXdI0npdohoCRQXXcI2AY9tk5EUG feuH5oNF/rVaPZ3w3TAkbEpC7CjkcuNvfvWES33iVXe+cKKmu04wVQ6HPulxAoYi+LEg uHDEandfUYdKuu87QdwCPM/rEBYNNMNWncjl9r5SZg83warV24aZ7mYoEknN43qnvSHh Kcrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707385971; x=1707990771; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FVZrDw08jx/+WS3cBHZbP06Mv/MXnXO3+N5Y9WPwJKc=; b=VSSTGMyg24Mp0FQ8cHZ1qjumargJtUry5WxEI/TLFv05cEYzAlTYUA2cCjU58NIK51 Jl0XWftGoUHwDuoLii0xX7CWyE+5DZJZnttERrs58W0EjwJTr7TFgPAYNN/MkZJOGXpt h4I9tI0IvVTE2oMy8l+KWqvVz7To7lL1EUpPk8sDgSpM3uGp1z1l4qsJNK8w7hs9INlh O70e5dPf/HFV/+pmiBE6Lhvv2kITIdqwOn00bXh9cOjcWTSwtD5buMuJMWnShlDXmHww etEHHcw3abTiKTvu+tgLdm8Mr3Lltx+6AdkRKApfSIN7oe2dDLCP7iygrd+tLEfMEO6d ryXQ== X-Forwarded-Encrypted: i=1; AJvYcCXXPdIqE9FTPY0tPqvjpjBgXgWq71uQJYogXgseFRgJuTTFw9HxC6hAaHqbeOgvxL+/k6n1my6zXDz+S08R+Bh6QVap99c7EIamV3L7 X-Gm-Message-State: AOJu0YxmKu/PoOMBdL8uuLxXtWZMc+HU77OEP6sF8PoilwXlSg5iLjvj PiabVDBQx1Oh66+vVjDRYoji5/m/wSMxfBCvKtN0Eld/fGAr28J2HsDOm/d8Axyw5wDbsmbBdr3 frD/DDn8rBgqKJsw1DwSnB0Rr9jHo1m0zOkJMjg== X-Received: by 2002:a25:8002:0:b0:dbc:b927:c5f9 with SMTP id m2-20020a258002000000b00dbcb927c5f9mr7187786ybk.6.1707385971607; Thu, 08 Feb 2024 01:52:51 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240207084452.9597-1-drake@endlessos.org> <20240207200538.GA912749@bhelgaas> In-Reply-To: From: Daniel Drake Date: Thu, 8 Feb 2024 10:52:15 +0100 Message-ID: Subject: Re: [PATCH v2 1/2] PCI: Disable D3cold on Asus B1400 PCI-NVMe bridge To: 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, david.e.box@linux.intel.com, mario.limonciello@amd.com, rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux@endlessos.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Feb 8, 2024 at 9:37=E2=80=AFAM Daniel Drake w= rote: > > What would be the downside of skipping the DMI table and calling > > pci_d3cold_disable() always? If this truly is a Root Port defect, it > > should affect all platforms with this device, and what's the benefit > > of relying on BIOS to use StorageD3Enable to avoid the defect? > > 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). Just realised my main workstation (Dell XPS) has the same chipset. The Dell ACPI table has the exact same suspect-buggy function, which the affected Asus system calls from PEG0.PXP._OFF: Method (DL23, 0, Serialized) { L23E =3D One Sleep (0x10) Local0 =3D Zero While (L23E) { If ((Local0 > 0x04)) { Break } Sleep (0x10) Local0++ } SCB0 =3D One } (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) However, on the Dell XPS system, nothing calls DL23() i.e. it is dead code. 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). Let me know if you have any ideas for other useful comparative experiments. Daniel