From 1a774a9979ec0d458e8cc72d18d3abd10246beea Mon Sep 17 00:00:00 2001 From: fvdl Date: Thu, 16 Mar 2000 10:34:33 +0000 Subject: [PATCH] Set bus_intr to ahc_pci_intr. --- sys/dev/pci/ahc_pci.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/ahc_pci.c b/sys/dev/pci/ahc_pci.c index 69c6d530b71c..dc64fcbfebdf 100644 --- a/sys/dev/pci/ahc_pci.c +++ b/sys/dev/pci/ahc_pci.c @@ -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 @@ int ahc_pci_probe __P((struct device *, struct cfdata *, void *)); 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 @@ ahc_pci_attach(parent, self, aux) 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 @@ done: #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 @@ ahc_pci_intr(struct ahc_softc *ahc) if (status1 & (DPR|RMA|RTA)) { ahc_outb(ahc, CLRINT, CLRPARERR); } + + return 1; } static int