Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 Use new accessor to get the PCI att...



details:   https://anonhg.NetBSD.org/src/rev/97bfe35ca32d
branches:  trunk
changeset: 822582:97bfe35ca32d
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Mar 26 10:36:46 2017 +0000

description:
Use new accessor to get the PCI attach args from a virtio device.

diffstat:

 sys/arch/sparc64/sparc64/autoconf.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r a12b90c18c31 -r 97bfe35ca32d sys/arch/sparc64/sparc64/autoconf.c
--- a/sys/arch/sparc64/sparc64/autoconf.c       Sun Mar 26 10:36:10 2017 +0000
+++ b/sys/arch/sparc64/sparc64/autoconf.c       Sun Mar 26 10:36:46 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.209 2017/03/25 13:08:38 martin Exp $ */
+/*     $NetBSD: autoconf.c,v 1.210 2017/03/26 10:36:46 martin Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.209 2017/03/25 13:08:38 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.210 2017/03/26 10:36:46 martin Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -934,8 +934,10 @@
                ofnode = PCITAG_NODE(pa->pa_tag);
        } else if (device_is_a(busdev, "virtio")) {
                struct virtio_softc *va = aux;
+               struct pci_attach_args *pa = virtio_pci_attach_args(va);
 
-               ofnode = PCITAG_NODE(va->sc_pa.pa_tag);
+               if (pa)
+                       ofnode = PCITAG_NODE(pa->pa_tag);
        } else if (device_is_a(busdev, "sbus") || device_is_a(busdev, "dma")
            || device_is_a(busdev, "ledma")) {
                struct sbus_attach_args *sa = aux;



Home | Main Index | Thread Index | Old Index