Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/atari/pci Fix pci-interrupt handling. It was broken...



details:   https://anonhg.NetBSD.org/src/rev/25df6923ac60
branches:  trunk
changeset: 477560:25df6923ac60
user:      leo <leo%NetBSD.org@localhost>
date:      Thu Oct 21 15:38:54 1999 +0000

description:
Fix pci-interrupt handling. It was broken by the latest slot numbering
changes.

diffstat:

 sys/arch/atari/pci/pci_machdep.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 9b30c2895b64 -r 25df6923ac60 sys/arch/atari/pci/pci_machdep.c
--- a/sys/arch/atari/pci/pci_machdep.c  Thu Oct 21 15:33:49 1999 +0000
+++ b/sys/arch/atari/pci/pci_machdep.c  Thu Oct 21 15:38:54 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.18 1999/09/22 07:18:45 leo Exp $     */
+/*     $NetBSD: pci_machdep.c,v 1.19 1999/10/21 15:38:54 leo Exp $     */
 
 /*
  * Copyright (c) 1996 Leo Weppelman.  All rights reserved.
@@ -67,6 +67,10 @@
 #define PCI_MEM_START   0x00100000      /*   1 MByte */
 #define PCI_IO_START    0x00004000      /*  16 kByte (some PCI cards allow only
                                            I/O addresses up to 0xffff) */
+/*
+ * Convert a PCI 'device' number to a slot number.
+ */
+#define        DEV2SLOT(dev)   (3 - dev)
 
 /*
  * Struct to hold the memory and I/O datas of the pci devices
@@ -377,8 +381,8 @@
         * number. This makes sense on the atari because the
         * individual slots are hard-wired to a specific MFP-pin.
         */
-       csr  = (dev << PCI_INTERRUPT_PIN_SHIFT);
-       csr |= (dev << PCI_INTERRUPT_LINE_SHIFT);
+       csr  = (DEV2SLOT(dev) << PCI_INTERRUPT_PIN_SHIFT);
+       csr |= (DEV2SLOT(dev) << PCI_INTERRUPT_LINE_SHIFT);
        pci_conf_write(pc, tag, PCI_INTERRUPT_REG, csr);
     }
 



Home | Main Index | Thread Index | Old Index