Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Set bus_intr to ahc_pci_intr.
details: https://anonhg.NetBSD.org/src/rev/14f91ec4fc21
branches: trunk
changeset: 483703:14f91ec4fc21
user: fvdl <fvdl%NetBSD.org@localhost>
date: Thu Mar 16 10:34:33 2000 +0000
description:
Set bus_intr to ahc_pci_intr.
diffstat:
sys/dev/pci/ahc_pci.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (53 lines):
diff -r e1f4b58ce374 -r 14f91ec4fc21 sys/dev/pci/ahc_pci.c
--- a/sys/dev/pci/ahc_pci.c Thu Mar 16 10:33:45 2000 +0000
+++ b/sys/dev/pci/ahc_pci.c Thu Mar 16 10:34:33 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ahc_pci.c,v 1.22 2000/03/15 02:33:52 fvdl Exp $ */
+/* $NetBSD: ahc_pci.c,v 1.23 2000/03/16 10:34:33 fvdl Exp $ */
/*
* Product specific probe and attach routines for:
@@ -557,7 +557,7 @@
void ahc_pci_attach __P((struct device *, struct device *, void *));
/* Exported for use in the ahc_intr routine */
-void ahc_pci_intr(struct ahc_softc *ahc);
+int ahc_pci_intr(struct ahc_softc *ahc);
struct cfattach ahc_pci_ca = {
sizeof(struct ahc_softc), ahc_pci_probe, ahc_pci_attach
@@ -683,7 +683,7 @@
bd->dev = pa->pa_device;
ahc->bus_data = bd;
-
+ ahc->bus_intr = ahc_pci_intr;
ahc->channel = channel;
/* Remeber how the card was setup in case there is no SEEPROM */
@@ -990,12 +990,15 @@
#define STA PCI_STATUS_TARGET_TARGET_ABORT
#define DPR PCI_STATUS_PARITY_ERROR
-void
+int
ahc_pci_intr(struct ahc_softc *ahc)
{
pcireg_t status1;
struct ahc_pci_busdata *bd = ahc->bus_data;
+ if ((ahc_inb(ahc, ERROR) & PCIERRSTAT) == 0)
+ return 0;
+
status1 = pci_conf_read(bd->pc, bd->tag, PCI_COMMAND_STATUS_REG);
if (status1 & DPE) {
@@ -1027,6 +1030,8 @@
if (status1 & (DPR|RMA|RTA)) {
ahc_outb(ahc, CLRINT, CLRPARERR);
}
+
+ return 1;
}
static int
Home |
Main Index |
Thread Index |
Old Index