From nobody Tue Apr 29 20:33:09 2025 X-Original-To: dev-commits-src-branches@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 4ZnBpZ1qPfz5vWLC; Tue, 29 Apr 2025 20:33:10 +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 4ZnBpY4lKHz45bP; Tue, 29 Apr 2025 20:33:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1745958789; 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=zeTEJznTd8jx6XrQ5F2I7jChlxWEaWVd+AA2WLwZtmo=; b=NtrqKiWFV1crVivRXSCy1YlGKrPnUsSlLOfjaGNtSkzad/fC98QDEsSocK6vhR+fPhdAa8 /4TSDI7tfGT7SxEeF3C4e+Gu3s9OP2AgfGvJsOVNJcKNfoIMXKpxxhZpGMbAchXLCsM40g 8OLU2E6WEZK+l1nlROjskwLVeRx3QnwOxZuADBN6wkdjIgaXgbtSPfIuVkqiEltjaXH/uO ItybV/WIKsHI6UpLcdK8PB8UgSMRxY8i/VxTDsJOsrjDlzCxgfy/0OknZRKs6Di/BA3V5E 11NHTUz8cFwp7mGayRS6tf6vA4uhU1RPet2pVWkazfwJKO12C5W0+TFHI/jlpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1745958789; a=rsa-sha256; cv=none; b=d7BUDvlPqj0SmkZc8eXrTYZyascWcXUsAcH7HcV44YAJgUWyoWsLPKwZYusBSVA8Xv+rL5 ziuo4qm3O7Yc3vXhP9h3xYUauKGqaJIjJwV1HQLio7BW/zN1H+RuOk/vQtM4AvkUklG5v+ QFGaDLXZGD78tNqCc/NCikNqV98t5Cd/TN/bsM2z4L6W3rUeE7DCYojsen+WqQkGZdOWzr aOFvhvGCR+c+asaj+GG8saSCMKiAsrOJ0p0z4VOiBVJMEn9ehVl2Jw9l+BjfCbNlnX0PSy 4xvS+Tq/pX+EYCGzMKA3Kc6ReNSF7lWlWdXu9Ns7009WxO9MFrkubAHjiZ07qg== 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=1745958789; 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=zeTEJznTd8jx6XrQ5F2I7jChlxWEaWVd+AA2WLwZtmo=; b=Yd7LChNyp/pdOS8xd2Vgp6EwEzEOulBXIb5MdnhsG8cAShiQ9pbUOFPQ7j2Tj1hHD4FZJM iF59BTc4l1ARTUlmo8PIl3GClxzlctb6aXlIklzoNcjKKarUJMT5id1Uye8Rn1/+kSYaJW szrMdffNWNb8EtKzpdDHswfunwVdxhnEUJUKX6pUWUti2dSibeApGw2N6GMlC0fCVQ6YqV BlHoXWy+axfuNgeHUtTHnmyjlV1f6sU0cXb331rZp/j1yfjVriZj4OM2mgwd0FW8enuVLR G+KyR5Rf5+XHrXrQdLXwpNwJAWHnGYOLyn/CryC2oJ37Y1Ta9hJ7hQsap1Sk0A== 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 4ZnBpY49x5zc5r; Tue, 29 Apr 2025 20:33:09 +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 53TKX9KK056197; Tue, 29 Apr 2025 20:33:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 53TKX9Ks056194; Tue, 29 Apr 2025 20:33:09 GMT (envelope-from git) Date: Tue, 29 Apr 2025 20:33:09 GMT Message-Id: <202504292033.53TKX9Ks056194@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: 37032a39c5e9 - stable/13 - pcib: Ignore power fault detected if a power controller is not present List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 37032a39c5e9fcac3100bb7cfce3f2f3d701b5bd Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=37032a39c5e9fcac3100bb7cfce3f2f3d701b5bd commit 37032a39c5e9fcac3100bb7cfce3f2f3d701b5bd Author: John Baldwin AuthorDate: 2025-04-22 02:08:01 +0000 Commit: John Baldwin CommitDate: 2025-04-29 14:46:30 +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 9e90cccdf083..86b57f28fd81 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -1072,7 +1072,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. */