Module Name: src Committed By: riastradh Date: Sun Dec 19 01:21:08 UTC 2021
Modified Files: src/sys/external/bsd/drm2/include/linux: pci.h src/sys/external/bsd/drm2/linux: linux_pci.c Log Message: pci_get_bus_and_slot -> pci_get_domain_bus_and_slot To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/external/bsd/drm2/include/linux/pci.h cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/drm2/linux/linux_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/bsd/drm2/include/linux/pci.h diff -u src/sys/external/bsd/drm2/include/linux/pci.h:1.40 src/sys/external/bsd/drm2/include/linux/pci.h:1.41 --- src/sys/external/bsd/drm2/include/linux/pci.h:1.40 Sun Dec 19 01:21:00 2021 +++ src/sys/external/bsd/drm2/include/linux/pci.h Sun Dec 19 01:21:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: pci.h,v 1.40 2021/12/19 01:21:00 riastradh Exp $ */ +/* $NetBSD: pci.h,v 1.41 2021/12/19 01:21:08 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -201,8 +201,8 @@ struct pci_dev { #define pci_enable_msi linux_pci_enable_msi #define pci_enable_rom linux_pci_enable_rom #define pci_find_capability linux_pci_find_capability -#define pci_get_bus_and_slot linux_pci_get_bus_and_slot #define pci_get_class linux_pci_get_class +#define pci_get_domain_bus_and_slot linux_pci_get_domain_bus_and_slot #define pci_get_drvdata linux_pci_get_drvdata #define pci_iomap linux_pci_iomap #define pci_iounmap linux_pci_iounmap @@ -279,7 +279,7 @@ int pci_bus_alloc_resource(struct pci_b bus_size_t), struct pci_dev *); /* XXX Kludges only -- do not use without checking the implementation! */ -struct pci_dev *pci_get_bus_and_slot(int, int); +struct pci_dev *pci_get_domain_bus_and_slot(int, int, int); struct pci_dev *pci_get_class(uint32_t, struct pci_dev *); /* i915 kludge */ void pci_dev_put(struct pci_dev *); Index: src/sys/external/bsd/drm2/linux/linux_pci.c diff -u src/sys/external/bsd/drm2/linux/linux_pci.c:1.10 src/sys/external/bsd/drm2/linux/linux_pci.c:1.11 --- src/sys/external/bsd/drm2/linux/linux_pci.c:1.10 Wed Feb 12 18:35:01 2020 +++ src/sys/external/bsd/drm2/linux/linux_pci.c Sun Dec 19 01:21:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_pci.c,v 1.10 2020/02/12 18:35:01 jdolecek Exp $ */ +/* $NetBSD: linux_pci.c,v 1.11 2021/12/19 01:21:08 riastradh Exp $ */ /*- * Copyright (c) 2013 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #endif #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.10 2020/02/12 18:35:01 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.11 2021/12/19 01:21:08 riastradh Exp $"); #include <linux/pci.h> @@ -364,6 +364,7 @@ static int pci_kludgey_match_bus0_dev0_func0(const struct pci_attach_args *pa) { + /* XXX domain */ if (pa->pa_bus != 0) return 0; if (pa->pa_device != 0) @@ -375,10 +376,11 @@ pci_kludgey_match_bus0_dev0_func0(const } struct pci_dev * -pci_get_bus_and_slot(int bus, int slot) +pci_get_domain_bus_and_slot(int domain, int bus, int slot) { struct pci_attach_args pa; + KASSERT(domain == 0); KASSERT(bus == 0); KASSERT(slot == PCI_DEVFN(0, 0));