From owner-dev-commits-src-all@freebsd.org Tue Aug 31 04:26:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67AD7664986; Tue, 31 Aug 2021 04:26:09 +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 4GzDds2Sv6z4T1v; Tue, 31 Aug 2021 04:26:09 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 3E11C2A70; Tue, 31 Aug 2021 04:26:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17V4Q9Ml089842; Tue, 31 Aug 2021 04:26:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17V4Q9bn089841; Tue, 31 Aug 2021 04:26:09 GMT (envelope-from git) Date: Tue, 31 Aug 2021 04:26:09 GMT Message-Id: <202108310426.17V4Q9bn089841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 18027aa233f6 - main - pci_host_generic_fdt: set domain number MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18027aa233f66ee2fd33e335f1d0e757e245aed0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2021 04:26:09 -0000 The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=18027aa233f66ee2fd33e335f1d0e757e245aed0 commit 18027aa233f66ee2fd33e335f1d0e757e245aed0 Author: Bartlomiej Grzesik AuthorDate: 2021-08-31 04:25:05 +0000 Commit: Wojciech Macek CommitDate: 2021-08-31 04:25:05 +0000 pci_host_generic_fdt: set domain number Set domain number to device unit. Some boards have multiple RCs handled by different drivers, this ensures that there are no collisions with ofw_pcib. Obtained from: Semihalf Reviewed by: wma Differential revision: https://reviews.freebsd.org/D31508 --- sys/dev/pci/pci_host_generic_fdt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/pci/pci_host_generic_fdt.c b/sys/dev/pci/pci_host_generic_fdt.c index cb77c0c674a9..91ffaf7357b9 100644 --- a/sys/dev/pci/pci_host_generic_fdt.c +++ b/sys/dev/pci/pci_host_generic_fdt.c @@ -138,6 +138,14 @@ pci_host_generic_setup_fdt(device_t dev) /* TODO parse FDT bus ranges */ sc->base.bus_start = 0; sc->base.bus_end = 0xFF; + + /* + * ofw_pcib uses device unit as PCI domain number. + * Do the same. Some boards have multiple RCs handled + * by different drivers, this ensures that there are + * no collisions. + */ + sc->base.ecam = device_get_unit(dev); error = pci_host_generic_core_attach(dev); if (error != 0)