From nobody Tue Apr 29 18:30:53 2025 X-Original-To: dev-commits-src-all@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 4Zn85V37BDz5vN4h; Tue, 29 Apr 2025 18:30:54 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Zn85T4wDsz4J3v; Tue, 29 Apr 2025 18:30:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745951453; 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=ehuQNPfwCLUf/UP7/DM3MvQAwXdzw6yNlZLtAXY8sek=; b=XBaissjEX3cxTnpNbpp3GzzNg3sFXM0MpYFkJnSxEgI6HSh7s8PsHnttUGmqATC6wXrkbN GSZr8tP8R7T1UkXYT6dCYX/nuSJiKvXZkV2t1bDvpq8HhGy76N9+Aqzx6gCVFH2KznQ2KH t64D2Nt54z9VB2nqi/fSOI0XAWweUKMKvgz4842HR3uxXPHPAjG0dcmYfWwQ4fUoXmiITH hD5vatuCYAVzxowszvagJbcIRM8l0dnxcpA9TqbFL+6K74qG67CH8PPO0g5x8TxcCWuxvx dKGN5avX0OiWBN28i9hqsN7vHiwJIQ28gnbjX6XOxBhjlPkJNp/YAso+B3iSAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745951453; a=rsa-sha256; cv=none; b=yZY+xbhfrv9D8PGc18XRaD0Fvz6VE830fGG73pkOe+B8U0g1FBaFuv7AfOD+9h8P1BuTJs 0WfOTwIDvSV0XlgQee03pFaHptnAdYOt3eqRp6JCeNj4vZwcthGX9KTI9hLmX4GVFU5jLG Ofai3mNNpin7gpyQM5aH/9oLQrH4EAgO3OZ2SguGSh5SG8zyQgTWoqupbt4QkBDlqcHbIf 3WO/iTE1hLmV9B5MHWLz61GcjMCq6bSZ45OEQ90l2pQqd08SAOSwD5mzhGBngDZEtXtU37 L/zYJ07Oaa8GtMmkfhO8tj9thvjwiA0nYyQ4JAzBFB0ROmM4g+oDb32/Fk5w5w== 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=1745951453; 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=ehuQNPfwCLUf/UP7/DM3MvQAwXdzw6yNlZLtAXY8sek=; b=u0CuwATSzVjQQOLL+8vjHti9rGGNRkZTRJ0uZnwL3dp1HRftuo3onYgi/z66w03MMuhXTu w1zBb5RRAlhUi0hMq7hEnDKGAMIviYGPz64ofpnVaTXsyALNqjxffa7p9bUZUH9sp2errK hG+ZAxMt3xoR1Pv/nJ7Zdc1ONZSgGqWHEqw0AeaDQLpGOU4+i/b0vEhFFeNFQ2pzqQVy/H 80m+naTkkotrsCMAEcXaqCMCHiU/Fb/GPQtG18physO0l2hA1fsgH7htKpaiFwOolqkhsl fR4VS4pJZempzD87KSxc/zdMzfXPDxARoKoa+eW4TQG3RenBaezP9A+jypTB+A== 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 4Zn85T24RBzXn4; Tue, 29 Apr 2025 18:30:53 +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 53TIUr3Z023053; Tue, 29 Apr 2025 18:30:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53TIUrGk023050; Tue, 29 Apr 2025 18:30:53 GMT (envelope-from git) Date: Tue, 29 Apr 2025 18:30:53 GMT Message-Id: <202504291830.53TIUrGk023050@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 4373c15f1fa2 - stable/14 - pcib: Ignore power fault detected if a power controller is not present List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 4373c15f1fa2afe9e7a24f3d1be9a3582874f48d Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4373c15f1fa2afe9e7a24f3d1be9a3582874f48d commit 4373c15f1fa2afe9e7a24f3d1be9a3582874f48d Author: John Baldwin AuthorDate: 2025-04-22 02:08:01 +0000 Commit: John Baldwin CommitDate: 2025-04-29 14:46:26 +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 (cherry picked from commit 4c8b9f40cda7dd6b2de547b288d712c85998ce11) --- 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 eedfc671f577..74b830be8a0a 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -1081,7 +1081,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. */