Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/linux pci_get_bus_and_slot -> pci_get_...



details:   https://anonhg.NetBSD.org/src/rev/9143b50d2ebd
branches:  trunk
changeset: 1027954:9143b50d2ebd
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 01:21:08 2021 +0000

description:
pci_get_bus_and_slot -> pci_get_domain_bus_and_slot

diffstat:

 sys/external/bsd/drm2/include/linux/pci.h |  6 +++---
 sys/external/bsd/drm2/linux/linux_pci.c   |  8 +++++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diffs (67 lines):

diff -r 2817d2d6bb4a -r 9143b50d2ebd sys/external/bsd/drm2/include/linux/pci.h
--- a/sys/external/bsd/drm2/include/linux/pci.h Sun Dec 19 01:21:00 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/pci.h Sun Dec 19 01:21:08 2021 +0000
@@ -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 @@
 #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 @@
                        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 *);
 
diff -r 2817d2d6bb4a -r 9143b50d2ebd sys/external/bsd/drm2/linux/linux_pci.c
--- a/sys/external/bsd/drm2/linux/linux_pci.c   Sun Dec 19 01:21:00 2021 +0000
+++ b/sys/external/bsd/drm2/linux/linux_pci.c   Sun Dec 19 01:21:08 2021 +0000
@@ -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 @@
 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 @@
 }
 
 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));
 



Home | Main Index | Thread Index | Old Index