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 drm: Use real pci segment number, not ...



details:   https://anonhg.NetBSD.org/src/rev/38941c8e48fb
branches:  trunk
changeset: 368577:38941c8e48fb
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 20 01:20:20 2022 +0000

description:
drm: Use real pci segment number, not pciN device unit.

diffstat:

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

diffs (54 lines):

diff -r 85e17cbd45cd -r 38941c8e48fb sys/external/bsd/drm2/linux/linux_pci.c
--- a/sys/external/bsd/drm2/linux/linux_pci.c   Wed Jul 20 01:12:14 2022 +0000
+++ b/sys/external/bsd/drm2/linux/linux_pci.c   Wed Jul 20 01:20:20 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_pci.c,v 1.22 2022/07/19 22:24:34 riastradh Exp $ */
+/*     $NetBSD: linux_pci.c,v 1.23 2022/07/20 01:20:20 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.22 2022/07/19 22:24:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_pci.c,v 1.23 2022/07/20 01:20:20 riastradh Exp $");
 
 #if NACPICA > 0
 #include <dev/acpi/acpivar.h>
@@ -724,7 +724,7 @@
 pci_domain_nr(struct pci_bus *bus)
 {
 
-       return device_unit(bus->pb_dev);
+       return pci_get_segment(bus->pb_pc);
 }
 
 /*
diff -r 85e17cbd45cd -r 38941c8e48fb sys/external/bsd/drm2/pci/drm_pci_busid.c
--- a/sys/external/bsd/drm2/pci/drm_pci_busid.c Wed Jul 20 01:12:14 2022 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci_busid.c Wed Jul 20 01:20:20 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_pci_busid.c,v 1.1 2021/12/19 11:09:48 riastradh Exp $      */
+/*     $NetBSD: drm_pci_busid.c,v 1.2 2022/07/20 01:20:20 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci_busid.c,v 1.1 2021/12/19 11:09:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci_busid.c,v 1.2 2022/07/20 01:20:20 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/device.h>
@@ -52,7 +52,7 @@
        KASSERT(dev_is_pci(dev->dev));
 
        master->unique = kasprintf(GFP_KERNEL, "pci:%04x:%02x:%02x.%d",
-           device_unit(device_parent(dev->dev)),
+           pci_domain_nr(dev->pdev->bus),
            pa->pa_bus, pa->pa_device, pa->pa_function);
        if (master->unique == NULL)
                return -ENOMEM;



Home | Main Index | Thread Index | Old Index