Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/arch/sparc64/dev pull up 1.15 (approved by thorpej):



details:   https://anonhg.NetBSD.org/src/rev/5049a8c0adfe
branches:  netbsd-1-5
changeset: 488827:5049a8c0adfe
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Jul 31 02:19:20 2000 +0000

description:
pull up 1.15 (approved by thorpej):
>On-board devices on psycho machines seem to have the `interrupt' property
>in the parent bus format (i.e. an INO) rather than being represented as
>an PCI interrupt line. Provide a hack to work around this in pci_attach_hook().

diffstat:

 sys/arch/sparc64/dev/pci_machdep.c |  22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diffs (43 lines):

diff -r 9c143c0b1d23 -r 5049a8c0adfe sys/arch/sparc64/dev/pci_machdep.c
--- a/sys/arch/sparc64/dev/pci_machdep.c        Mon Jul 31 02:11:01 2000 +0000
+++ b/sys/arch/sparc64/dev/pci_machdep.c        Mon Jul 31 02:19:20 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.10.2.1 2000/07/18 16:23:20 mrg Exp $ */
+/*     $NetBSD: pci_machdep.c,v 1.10.2.2 2000/07/31 02:19:20 mrg Exp $ */
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -192,6 +192,7 @@
                                continue;
                        DPRINTF(SPDB_INTFIX, ("... BINGO! ..."));
                        
+               bingo:
                        /*
                         * OK!  we found match.  pull out the old interrupt
                         * register, patch in the new value, and put it back.
@@ -206,6 +207,25 @@
                        DPRINTF((SPDB_INTFIX|SPDB_INTMAP), ("\n\t    ; reread %x from intreg", intr));
                        break;
                }
+               if (i == pp->pp_nintmap) {
+                       /*
+                        * Not matched by parent interrupt map. If the
+                        * interrupt property has the INTMAP_OBIO bit
+                        * set, assume the PROM has (wrongly) supplied it
+                        * in the parent's bus format, rather than as a
+                        * PCI interrupt line number.
+                        *
+                        * This seems to be an issue only with the
+                        * psycho host-to-pci bridge.
+                        */
+                       if (pp->pp_sc->sc_mode == PSYCHO_MODE_PSYCHO &&
+                           (*ip & INTMAP_OBIO) != 0) {
+                               DPRINTF((SPDB_INTFIX|SPDB_INTMAP),
+               ("\n\t; PSYCHO: no match but obio interrupt in parent format"));
+
+                               i = -1; goto bingo; /* XXX - hackish.. */
+                       }
+               }
 
                /* enable mem & dma if not already */
                pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG,



Home | Main Index | Thread Index | Old Index