From nobody Thu Feb 27 14:16:30 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 4Z3YL62y1dz5qGFf; Thu, 27 Feb 2025 14:16:30 +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 4Z3YL624VVz3wtg; Thu, 27 Feb 2025 14:16:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740665790; 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=BvCWGfpyi4mCtqcL8wASZhmRZFdq1wEdmS0GHwiibMA=; b=ygnD8bGNiNxOGevR2bEU7iT00lTgQdc8Mg0D0qUySxZSGx1xHgPKOt6ggjPmVC/YH4fmIy fC+CX6tKnFPBp/AafG0iKdk7TwR11+f3m3B+W3sEDzL87Xn3ksXMR7rW4W8u3DA51pVOWw SYA28AS5vAec5lD6VnN00+IHstzxtjpmlkLgUpdSi9SfwJPV5gfOwyXMNTZ2/1tulwpLzD x+wWK+krzu7Coenk/JM8pk49uBF/drZi6Y6UM25PyD8EWsjgCi9J7p5rbM0Kf/9PVgruuk c2FbYvEstCNNMAVTZAkEaSaY0Z/BB+mvWoOG4HdiG00fIgR/wnnzTS1/HC9DUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740665790; a=rsa-sha256; cv=none; b=RZ5GFfUXfCToDmznrcvoebCoaCj8cU6ugGqrKD9n3DW7XymSozhIzS6uiQUArjDQ5LXL3n NwZQaT6wv13Vq6QOduhSO4U8JfTBSKW5gF7GYcVvbxBQNb46PVihwrr/uJpNfQ6LfV//x+ CQ/3YsakU6oAnRInZx2rPEmLfQlzwF8sJP9Yo1lBMaA4FTo2AEsEr0/ywo8upQ7onBxIKu HvGRgyzPqT1CuVVd4NGrcSqwl5SqQLy06GFJaA9DOrbTjRMhyGapHNQLG9ShjnaAKYF9zR jDc8itbeMC2UsEo3wzYooTXA92o6KJr1wWZYq7xGJ09tRypFMEwL+0HnUNb2Rg== 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=1740665790; 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=BvCWGfpyi4mCtqcL8wASZhmRZFdq1wEdmS0GHwiibMA=; b=JhjQsQnE038wZRajsTWb3R1jSzdlZeBUdc0NBE0QhTsvU4KGVn8Hq1d+Oai0TaTBD2KIwJ I7373Te9x8UTfOuEm9gNyYYd2TOeJf/6tXjlrUDWfrKRPQO50e6NV9gJrNeDY9aKmObp43 CU3/V+Ous3iwjs3QTdwI1aKGtLJ/aeZySu9cGLuEpi46ae2nCSBjrFp5qbqbhRH5m6uZv0 ZBVupSK2WaK1S/9WIVBK70KnEFVkfg0bQQhw4s0QmoB5Y73Ry5BxpjHZO95mE/y+iJRhBn 9AmEVn48cfDb4lHz9jJqzb3+7o0V3I8xJjE+7agg7nkNmxdYutNAmnIdltKhmg== 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 4Z3YL61YgrzmZK; Thu, 27 Feb 2025 14:16:30 +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 51REGUdj015584; Thu, 27 Feb 2025 14:16:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51REGUtD015581; Thu, 27 Feb 2025 14:16:30 GMT (envelope-from git) Date: Thu, 27 Feb 2025 14:16:30 GMT Message-Id: <202502271416.51REGUtD015581@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: c96d316a888e - stable/14 - pci_host_generic: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources 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: c96d316a888e41d1b266fd880383c7802aaf2bd8 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c96d316a888e41d1b266fd880383c7802aaf2bd8 commit c96d316a888e41d1b266fd880383c7802aaf2bd8 Author: John Baldwin AuthorDate: 2024-01-23 17:35:36 +0000 Commit: John Baldwin CommitDate: 2025-02-27 13:09:20 +0000 pci_host_generic: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43429 (cherry picked from commit e9eb353b324a3d051f81dde91d9f9f0fc044d822) --- sys/dev/pci/pci_host_generic.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c index 082d083fc681..02ca010a14d7 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -517,9 +517,19 @@ static int generic_pcie_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + struct generic_pcie_core_softc *sc; +#endif rman_res_t start, end; int res; +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + sc = device_get_softc(dev); + if (type == PCI_RES_BUS) { + return (pci_domain_activate_bus(sc->ecam, child, rid, r)); + } +#endif + if ((res = rman_activate_resource(r)) != 0) return (res); @@ -542,8 +552,17 @@ static int generic_pcie_deactivate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + struct generic_pcie_core_softc *sc; +#endif int res; +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + sc = device_get_softc(dev); + if (type == PCI_RES_BUS) { + return (pci_domain_deactivate_bus(sc->ecam, child, rid, r)); + } +#endif if ((res = rman_deactivate_resource(r)) != 0) return (res);