Date: Fri, 24 Apr 2026 17:56:21 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 5daad074124c - stable/15 - pciconf: Use the exported values of bus numbers for PCI bridges Message-ID: <69ebaec5.1de1d.70bf2772@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5daad074124cc07bfd1c437d95ec5ad021d2eabf commit 5daad074124cc07bfd1c437d95ec5ad021d2eabf Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2026-03-10 16:50:08 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-04-24 17:33:53 +0000 pciconf: Use the exported values of bus numbers for PCI bridges Reviewed by: imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D55772 (cherry picked from commit 9a1394957c3054c24995d684e8bc26878702dc6b) --- usr.sbin/pciconf/pciconf.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c index 6c26621ae186..48520687197b 100644 --- a/usr.sbin/pciconf/pciconf.c +++ b/usr.sbin/pciconf/pciconf.c @@ -339,13 +339,9 @@ list_devs(const char *name, int verbose, int bars, int bridge, int caps, } static void -print_bus_range(int fd, struct pci_conf *p, int secreg, int subreg) +print_bus_range(struct pci_conf *p) { - uint8_t secbus, subbus; - - secbus = read_config(fd, &p->pc_sel, secreg, 1); - subbus = read_config(fd, &p->pc_sel, subreg, 1); - printf(" bus range = %u-%u\n", secbus, subbus); + printf(" bus range = %u-%u\n", p->pc_secbus, p->pc_subbus); } static void @@ -511,11 +507,11 @@ list_bridge(int fd, struct pci_conf *p) switch (p->pc_hdr & PCIM_HDRTYPE) { case PCIM_HDRTYPE_BRIDGE: - print_bus_range(fd, p, PCIR_SECBUS_1, PCIR_SUBBUS_1); + print_bus_range(p); print_bridge_windows(fd, p); break; case PCIM_HDRTYPE_CARDBUS: - print_bus_range(fd, p, PCIR_SECBUS_2, PCIR_SUBBUS_2); + print_bus_range(p); print_cardbus_windows(fd, p); break; }home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69ebaec5.1de1d.70bf2772>
