From nobody Tue Jan 23 17:45:50 2024 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 4TKDyl0zjdz57mYC; Tue, 23 Jan 2024 17:45:51 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKDyk62r7z46tG; Tue, 23 Jan 2024 17:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031950; 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=V+JSmsl4ayVtECJ9KiE6QwutNWEDWjSFIQvmWoPkmng=; b=c8qrWiIhf/9Tg3QVAZP86i/i4s5RpQ5E+wc2Mw8VN535Y2cXjk0WnNi9kvNTye697CVKgO +js3PLD40NR/8Ylj3dfCp02vNbAef/sHeww+jTW8+iqYmBIfeN+ua7lmZz2bOm1JUvfxdU 5MYHoVhtfajwhZiZpkCREM1+lmMmfrlXhVCDsoCWAaX32+Cz/H5RTSLat2+9mKq94yy6kC UXonopKi/vW8xMQFitF6mZdmAi/cma2IFfPVpiRw1sBoY0pNrq9a0F4/VkMrIGRTKXEw78 0wzhkRnm7k3DnHzed061m0w1Iou4Cfy6NrIUXnHbpUmSCPKvewHRfhrHjYVolQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031950; 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=V+JSmsl4ayVtECJ9KiE6QwutNWEDWjSFIQvmWoPkmng=; b=aA5mHDhUxV9wvDL9KXZCmInB5JuRTQ0SS3y52Cdeo/7ls7HyD0Xdv9vuPI/WQ7pD6AZpPQ QNfUySV4P8eDwy15aZV7OrouZFMk2M2dbHXUkyrucDQKhrrVoau6dCvkt0RXBXVMftxjYi xVEhp4igMxoKpm10Nlw1QZrIcmaZfoVG/cf8bmIGoVDRKNxz1u0CifqG6imfFyjSHdPgie NMeDp+li3f3/lNs17etNq3HlW/cEnN4VlzXsOih1SdD5p6h+d5VLFaDwlTcp/YfNkzmiWV qBMDwDcWaG4YT56eEabB/4+b3ashR+C+1/lafTY+afbMGv6WsMeOnMDn4Mrw7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031950; a=rsa-sha256; cv=none; b=khjTzT05+5LzEZz914QnZ27ecTs7j71PZ5rX0scacE6RoKizvOvP9hRh6O02t9GF1cfIPE H0XJpkFfunrzeY1iT4UhNPS8mClSNrtPBs15qB/DAAu81rVSghWxf6e4c/cUgK+kcmRCRF igBMMz4davbDmUpFaFr0Vcc77/dtfEH4MLNkOGW/QQWexWbW2UlZJXBDfON3L1uCL3mLAI lokWOZw3KzRsiSaIi61/csRCLDU1tm0oq48w6A3bQzb9z2c4m3q5VYJX95MJXNpYrX9bcj dcOugI3JrgsJoq2G0Nxzd8OgAAhxpQ1SQcKeV6SsIhK8mwa+7u0/bM/V28MV6g== 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 4TKDyk53hPzg8x; Tue, 23 Jan 2024 17:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40NHjoFZ075613; Tue, 23 Jan 2024 17:45:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjoS0075610; Tue, 23 Jan 2024 17:45:50 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:50 GMT Message-Id: <202401231745.40NHjoS0075610@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: e9eb353b324a - main - pci_host_generic: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: 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: e9eb353b324a3d051f81dde91d9f9f0fc044d822 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e9eb353b324a3d051f81dde91d9f9f0fc044d822 commit e9eb353b324a3d051f81dde91d9f9f0fc044d822 Author: John Baldwin AuthorDate: 2024-01-23 17:35:36 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:35:36 +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 --- 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 90361a7258ed..43b6d26e9217 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -504,9 +504,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); @@ -529,8 +539,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);