From nobody Tue Apr 22 02:58:23 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZhRkl4DGwz5tRJN; Tue, 22 Apr 2025 02:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZhRkl2G3Qz3PWN; Tue, 22 Apr 2025 02:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745290703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5185KyF/3BkP3TJ3pZURSv6gQ0ymFyFP4m3UgYkBcAY=; b=cBNjzfPgREbVeRdRpjCfOpLzYP08QiPsWcUv9pvCdvZmOSsvP8vxRzjrDEFR993U12dHFj vDv9sjjuOcEuw2yAek2U+axfZX8QeyLAviOBKfKNdseb9JFs4Yd/xAmHc2SeqSQl0SEvM+ zXyEEzZwQDvcyutdWJtG6Cne9jJDb12aPPbkXASZu0PBLWGmiM/B5cEwCsKGGYB8+hU2DW G5NZ8EoLRC3nspU2JBxCFcdQaX8qT2icX7cQydHaEAVNPKNqED7E4bv2a5gUwcxgjtuISM fLnuHT8ZLgo97xGh3cfRcr/TZiMUD7aHUsmFhUcSYI2QtB70Bg1EgViKHvF6Qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745290703; a=rsa-sha256; cv=none; b=Yy077kdMmpaTGJuQ1rR7d616rEL4aOuX+uwiNEq/32leVed8RKAPUFQ42w7bOhp5GTkyat HgD0lRsy7mA7tlHjZgUulqWXWNIG31YcmbJ4GLOxAm0S8JfFQgxRZUEKkEYNI2P57BZg62 G3WFNeuxq64cMHwj6HpOLcE6pysi8/T1tE7Hpq3BJtUsCubnl9KPQaLzkPaw05x0RmjnA6 jGsC0rJ1xOJd7KCUa/ae4sIWIWC66ID/0KYlTRG/AkIq9/jbVSu1JszYdNXvZ7LzwxZcf3 8TwrwoCIkwmXLV4JotBoKxirR/abCE4jqI974AjfwoUgwbuMfCSu4gMN0UPmMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745290703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5185KyF/3BkP3TJ3pZURSv6gQ0ymFyFP4m3UgYkBcAY=; b=MTWnEMK9aPJ23sqZH146DX6Epzy+D9ddL+6yEtT89AR8yEPG6Gd/V5qfQ1cFOFfkEbR28I Uc6tZYyF4XtBPsUG8yPgZehiz/j36s637Gy5Cz2rVjTQV9UtN6fwR8HQ2qZC+LqR/Jxf6y GMf5wO5cuYzlO5YREH4ntS8aQMJU7vZqvQlm4cWxQ4OSEoDlr4c4smxEZ3Hf8rO7UKaeoT 0t3FkM59V6PBa+7jW0qPIi+KiW9RnfRLOtRzjp8K7wKH4lmWdLqMB48gWjo2dsgLHBOJ6g MexN7PH2iW1Hig3VGnXmfAQT4OOMJt2JBxaRKYbr1GMKUa7fQLrKfOvffaAgdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZhRkl1cGNz1GJF; Tue, 22 Apr 2025 02:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 53M2wNkk071145; Tue, 22 Apr 2025 02:58:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53M2wNOM071142; Tue, 22 Apr 2025 02:58:23 GMT (envelope-from git) Date: Tue, 22 Apr 2025 02:58:23 GMT Message-Id: <202504220258.53M2wNOM071142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4c8b9f40cda7 - main - pcib: Ignore power fault detected if a power controller is not present List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c8b9f40cda7dd6b2de547b288d712c85998ce11 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4c8b9f40cda7dd6b2de547b288d712c85998ce11 commit 4c8b9f40cda7dd6b2de547b288d712c85998ce11 Author: John Baldwin AuthorDate: 2025-04-22 02:08:01 +0000 Commit: John Baldwin CommitDate: 2025-04-22 02:08:01 +0000 pcib: Ignore power fault detected if a power controller is not present At least some PCI-express bridges exposed by Intel Volume Management Devices report bogus power faults in their slot status register. As a workaround, ignore the power fault detected flag if the slot capability register does not indicate support for a power controller. While the PCI-e spec does not explicitly state that the PFD flag should always be zero if a power controller is not present, parts of the spec do seem to assume this. For example, the flag is included in the "Power Controller Registers" register group in 6.7.2.4, and the definition of the value for this flag seems to presume the presence of a power controller: If a Power Controller that supports power fault detection is implemented, this bit is Set when the Power Controller detects a power fault at this slot. Note that, depending on hardware capability, it is possible that a power fault can be detected at any time, independent of the Power Controller Control setting or the occupancy of the slot. If power fault detection is not supported, this bit must not be Set. PR: 285993 Reported by: Jim Long Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D49949 --- sys/dev/pci/pci_pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 5e71a376604b..cdd717266026 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -930,7 +930,8 @@ pcib_hotplug_inserted(struct pcib_softc *sc) return (false); /* A power fault implicitly turns off power to the slot. */ - if (sc->pcie_slot_sta & PCIEM_SLOT_STA_PFD) + if (sc->pcie_slot_cap & PCIEM_SLOT_CAP_PCP && + sc->pcie_slot_sta & PCIEM_SLOT_STA_PFD) return (false); /* If the MRL is disengaged, the slot is powered off. */