summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>1996-01-23 21:48:28 +0000
committerse <se@FreeBSD.org>1996-01-23 21:48:28 +0000
commit9516aa2cafa23657dcba24410ae70f85a607f592 (patch)
tree0c05d619dce00b4358e22aba692e8f11615d00c7 /sys/pci
parent1d9e7dac5c0c9137300b85bf72dbd842b1e65eaa (diff)
downloadFreeBSD-src-9516aa2cafa23657dcba24410ae70f85a607f592.zip
FreeBSD-src-9516aa2cafa23657dcba24410ae70f85a607f592.tar.gz
Make PCI interrupt handlers return void like everybody else does.
Reviewed by: davidg
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/aic7870.c4
-rw-r--r--sys/pci/bt9xx.c23
-rw-r--r--sys/pci/if_de.c5
-rw-r--r--sys/pci/if_fxp.c10
-rw-r--r--sys/pci/if_pdq.c14
-rw-r--r--sys/pci/meteor.c5
-rw-r--r--sys/pci/ncr.c11
-rw-r--r--sys/pci/pci.c35
-rw-r--r--sys/pci/pcivar.h11
9 files changed, 38 insertions, 80 deletions
diff --git a/sys/pci/aic7870.c b/sys/pci/aic7870.c
index 6ea34c1..0240715 100644
--- a/sys/pci/aic7870.c
+++ b/sys/pci/aic7870.c
@@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: aic7870.c,v 1.22 1996/01/07 19:26:11 gibbs Exp $
+ * $Id: aic7870.c,v 1.23 1996/01/09 16:14:53 gibbs Exp $
*/
#include <pci.h>
@@ -311,7 +311,7 @@ aic7870_attach(config_id, unit)
if(!(ahc = ahc_alloc(unit, io_port, ahc_t, ahc_f)))
return; /* XXX PCI code should take return status */
- if(!(pci_map_int(config_id, ahcintr, (void *)ahc, &bio_imask))) {
+ if(!(pci_map_int(config_id, ahc_intr, (void *)ahc, &bio_imask))) {
ahc_free(ahc);
return;
}
diff --git a/sys/pci/bt9xx.c b/sys/pci/bt9xx.c
index fe0d1e6..6955357 100644
--- a/sys/pci/bt9xx.c
+++ b/sys/pci/bt9xx.c
@@ -19,7 +19,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id: bt9xx.c,v 1.2 1995/12/14 09:53:56 phk Exp $
+ * $Id: bt9xx.c,v 1.3 1995/12/14 14:19:19 peter Exp $
*/
#include <pci.h>
@@ -40,7 +40,6 @@
static char* bt_pci_probe __P((pcici_t tag, pcidi_t type));
static void bt_pci_attach __P((pcici_t config_id, int unit));
-static int bt_pci_intr __P((void *arg));
static struct pci_device bt_pci_driver = {
"bt",
@@ -86,7 +85,7 @@ bt_pci_attach(config_id, unit)
if(!(bt = bt_alloc(unit, io_port)))
return; /* XXX PCI code should take return status */
- if(!(pci_map_int(config_id, bt_pci_intr, (void *)bt, &bio_imask))) {
+ if(!(pci_map_int(config_id, bt_intr, (void *)bt, &bio_imask))) {
bt_free(bt);
return;
}
@@ -112,22 +111,4 @@ bt_pci_attach(config_id, unit)
return;
}
-
-/*
- * Handle an PCI interrupt.
- * XXX should go away as soon as PCI interrupt handlers
- * return void.
- */
-static int
-bt_pci_intr(arg)
- void *arg;
-{
- bt_intr(arg);
- return (1); /*
- * XXX: Always say we handle the interrupt.
- * won't work with edge-triggered ints.
- */
-}
-
-
#endif /* NPCI > 0 */
diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c
index 7a8a5d3..074893a 100644
--- a/sys/pci/if_de.c
+++ b/sys/pci/if_de.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_de.c,v 1.39 1995/12/07 12:47:34 davidg Exp $
+ * $Id: if_de.c,v 1.40 1995/12/14 09:53:58 phk Exp $
*
*/
@@ -1423,7 +1423,7 @@ tulip_start(
}
}
-static int
+static void
tulip_intr(
void *arg)
{
@@ -1467,7 +1467,6 @@ tulip_intr(
}
}
} while ((sc = sc->tulip_slaves) != NULL);
- return progress;
}
/*
diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c
index 1c41cdf..ddafbef 100644
--- a/sys/pci/if_fxp.c
+++ b/sys/pci/if_fxp.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_fxp.c,v 1.7 1996/01/03 05:22:32 davidg Exp $
+ * $Id: if_fxp.c,v 1.8 1996/01/15 10:12:41 davidg Exp $
*/
/*
@@ -138,7 +138,7 @@ static inline int fxp_scb_wait __P((struct fxp_csr *));
static char *fxp_probe __P((pcici_t, pcidi_t));
static void fxp_attach __P((pcici_t, int));
static int fxp_shutdown __P((struct kern_devconf *, int));
-static int fxp_intr __P((void *));
+static void fxp_intr __P((void *));
static void fxp_start __P((struct ifnet *));
static int fxp_ioctl __P((struct ifnet *, int, caddr_t));
static void fxp_init __P((struct ifnet *));
@@ -545,18 +545,16 @@ tbdinit:
* Process interface interrupts. Returns 1 if the interrupt
* was handled, 0 if it wasn't.
*/
-static int
+static void
fxp_intr(arg)
void *arg;
{
struct fxp_softc *sc = arg;
struct fxp_csr *csr = sc->csr;
struct ifnet *ifp = &sc->arpcom.ac_if;
- int found = 0;
u_char statack;
while ((statack = csr->scb_statack) != 0) {
- found = 1;
/*
* First ACK all the interrupts in this pass.
*/
@@ -653,8 +651,6 @@ rcvloop:
}
}
}
-
- return found;
}
/*
diff --git a/sys/pci/if_pdq.c b/sys/pci/if_pdq.c
index ea9f6a0..004f098 100644
--- a/sys/pci/if_pdq.c
+++ b/sys/pci/if_pdq.c
@@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: if_pdq.c,v 1.11 1995/12/07 12:47:37 davidg Exp $
+ * $Id: if_pdq.c,v 1.12 1995/12/16 00:27:42 bde Exp $
*
*/
@@ -473,13 +473,21 @@ pdq_pci_ifwatchdog(struct ifnet *ifp)
pdq_ifwatchdog(PDQ_PCI_UNIT_TO_SOFTC(ifp->if_unit));
}
-static int
+static
+#ifdef __FreeBSD__
+void
+#else
+int
+#endif
pdq_pci_ifintr(
void *vsc)
{
pdq_softc_t *sc = vsc;
- return pdq_interrupt(sc->sc_pdq);
+#ifndef __FreeBSD__
+ return
+#endif
+ pdq_interrupt(sc->sc_pdq);
}
static char *
diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c
index 14b4314..69fb115 100644
--- a/sys/pci/meteor.c
+++ b/sys/pci/meteor.c
@@ -127,7 +127,7 @@
#include <machine/ioctl_meteor.h>
-static int meteor_intr __P((void *arg));
+static void meteor_intr __P((void *arg));
/*
* Allocate enough memory for:
@@ -548,7 +548,7 @@ met_probe (pcici_t tag, pcidi_t type)
/* interrupt handling routine
complete meteor_read() if using interrupts
*/
-static int
+static void
meteor_intr(void *arg)
{
meteor_reg_t *mtr = (meteor_reg_t *) arg;
@@ -737,7 +737,6 @@ meteor_intr(void *arg)
}
*stat |= 0x7; /* clear interrupt status */
- return(1);
}
static void
diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c
index b1bf835..4fb904d 100644
--- a/sys/pci/ncr.c
+++ b/sys/pci/ncr.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: ncr.c,v 1.59 1996/01/15 23:51:10 se Exp $
+** $Id: ncr.c,v 1.60 1996/01/18 19:59:23 se Exp $
**
** Device driver for the NCR 53C810 PCI-SCSI-Controller.
**
@@ -1202,7 +1202,7 @@ static void ncr_getclock (ncb_p np);
static ccb_p ncr_get_ccb (ncb_p np, u_long flags, u_long t,u_long l);
static U_INT32 ncr_info (int unit);
static void ncr_init (ncb_p np, char * msg, u_long code);
-static int ncr_intr (void *vnp);
+static void ncr_intr (void *vnp);
static void ncr_int_ma (ncb_p np);
static void ncr_int_sir (ncb_p np);
static void ncr_int_sto (ncb_p np);
@@ -1249,7 +1249,7 @@ static void ncr_attach (pcici_t tag, int unit);
static char ident[] =
- "\n$Id: ncr.c,v 1.59 1996/01/15 23:51:10 se Exp $\n";
+ "\n$Id: ncr.c,v 1.60 1996/01/18 19:59:23 se Exp $\n";
static u_long ncr_version = NCR_VERSION * 11
+ (u_long) sizeof (struct ncb) * 7
@@ -3496,12 +3496,11 @@ static void ncr_attach (pcici_t config_id, int unit)
**==========================================================
*/
-static int
+static void
ncr_intr(vnp)
void *vnp;
{
ncb_p np = vnp;
- int n = 0;
int oldspl = splbio();
if (DEBUG_FLAGS & DEBUG_TINY) printf ("[");
@@ -3514,14 +3513,12 @@ ncr_intr(vnp)
ncr_exception (np);
} while (INB(nc_istat) & (INTF|SIP|DIP));
- n=1;
np->ticks = 100;
};
if (DEBUG_FLAGS & DEBUG_TINY) printf ("]\n");
splx (oldspl);
- return (n);
}
/*==========================================================
diff --git a/sys/pci/pci.c b/sys/pci/pci.c
index c1b6873..a73d9c5 100644
--- a/sys/pci/pci.c
+++ b/sys/pci/pci.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pci.c,v 1.39 1995/12/16 00:27:46 bde Exp $
+** $Id: pci.c,v 1.40 1996/01/19 19:01:19 se Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@@ -1149,38 +1149,23 @@ static void
pci_int (int irq)
{
struct pci_int_desc * p;
- int c, s;
-#ifdef PCI_EDGE_INT
- int i, n;
-#endif
+ int s;
+
if (irq<0 || irq >= PCI_MAX_IRQ) {
printf ("pci_int: irq %d out of range, ignored\n", irq);
return;
};
-
-#ifdef PCI_EDGE_INT
- for (i=0; i<1000; i++) {
- n = 0;
-#endif
- for (p = pci_int_desc[irq]; p!=NULL; p=p->pcid_next) {
- s = splq (*p->pcid_maskptr);
- c= (*p->pcid_handler) (p->pcid_argument);
- p-> pcid_tally += c;
- splx (s);
-#ifdef PCI_EDGE_INT
- n += c;
-#endif
+ for (p = pci_int_desc[irq]; p!=NULL; p=p->pcid_next) {
+ s = splq (*p->pcid_maskptr);
+ (*p->pcid_handler) (p->pcid_argument);
+ p-> pcid_tally++;
+ splx (s);
#if 0
- if (c && p->pcid_tally<20)
+ if (p->pcid_tally<20)
printf ("PCI_INT: irq=%d h=%p cpl o=%x n=%x val=%d\n",
- irq, p->pcid_handler, s, cpl, c);
+ irq, p->pcid_handler, s, cpl, c);
#endif
- };
-#ifdef PCI_EDGE_INT
- if (!n) return;
};
- printf ("pci_int(%d): permanent interrupt request.\n", irq);
-#endif
}
#endif
diff --git a/sys/pci/pcivar.h b/sys/pci/pcivar.h
index c405771..50a037f 100644
--- a/sys/pci/pcivar.h
+++ b/sys/pci/pcivar.h
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcivar.h,v 1.6 1995/05/30 08:13:12 rgrimes Exp $
+** $Id: pcivar.h,v 1.7 1995/11/21 12:54:55 bde Exp $
**
** Declarations for pci device drivers.
**
@@ -228,17 +228,10 @@ int pci_map_port (pcici_t tag, u_long entry, u_short * pa);
**
** Supports multiple handlers per irq (shared interrupts).
**
-** -----------------
-**
-** There is code to support shared edge triggered ints.
-** This relies on the cooperation of the interrupt handlers:
-** they have to return a value <>0 if and only if something
-** was done. Beware of the performance penalty.
-**
**-----------------------------------------------------------------
*/
-typedef int pci_inthand_t(void *arg);
+typedef void pci_inthand_t(void *arg);
struct pci_int_desc {
struct pci_int_desc * pcid_next;
OpenPOWER on IntegriCloud