summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-01-16 21:45:59 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-01-16 21:45:59 +0000
commitcd94fe43f3934111cf41f77ed70f36aadc3134db (patch)
tree4f4b38db6d263aad40de1766c8347f69f178c8c6
parente50223e155d05a9c47901f6fcf569f862ea8e876 (diff)
Let the intrhand structs be softc fields, rather than static global variables.
-rw-r--r--sys/arch/mac68k/dev/mac68k5380.c22
-rw-r--r--sys/arch/mac68k/dev/ncr5380reg.h4
2 files changed, 13 insertions, 13 deletions
diff --git a/sys/arch/mac68k/dev/mac68k5380.c b/sys/arch/mac68k/dev/mac68k5380.c
index 6d3e6946d62..f518b06866a 100644
--- a/sys/arch/mac68k/dev/mac68k5380.c
+++ b/sys/arch/mac68k/dev/mac68k5380.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mac68k5380.c,v 1.21 2005/07/23 23:36:26 martin Exp $ */
+/* $OpenBSD: mac68k5380.c,v 1.22 2006/01/16 21:45:57 miod Exp $ */
/* $NetBSD: mac68k5380.c,v 1.29 1997/02/28 15:50:50 scottr Exp $ */
/*
@@ -47,11 +47,10 @@
/*
* Include the driver definitions
*/
-#include "ncr5380reg.h"
-#include <machine/stdarg.h>
#include <machine/viareg.h>
+#include "ncr5380reg.h"
#include "ncr5380var.h"
/*
@@ -154,7 +153,6 @@ scsi_mach_init(sc)
struct ncr_softc *sc;
{
static int initted = 0;
- static struct via2hand ih_irq, ih_drq;
if (initted++)
panic("scsi_mach_init called again.");
@@ -174,14 +172,14 @@ scsi_mach_init(sc)
scsi_flag = Via1Base + VIA2 * 0x2000 + rIFR;
}
- ih_irq.vh_fn = ncr5380_irq_intr;
- ih_irq.vh_arg = sc;
- ih_irq.vh_ipl = VIA2_SCSIIRQ;
- via2_register_irq(&ih_irq, sc->sc_dev.dv_xname);
- ih_drq.vh_fn = ncr5380_drq_intr;
- ih_drq.vh_arg = sc;
- ih_drq.vh_ipl = VIA2_SCSIDRQ;
- via2_register_irq(&ih_drq, sc->sc_dev.dv_xname);
+ sc->sc_ih_irq.vh_fn = ncr5380_irq_intr;
+ sc->sc_ih_irq.vh_arg = sc;
+ sc->sc_ih_irq.vh_ipl = VIA2_SCSIIRQ;
+ via2_register_irq(&sc->sc_ih_irq, sc->sc_dev.dv_xname);
+ sc->sc_ih_drq.vh_fn = ncr5380_drq_intr;
+ sc->sc_ih_drq.vh_arg = sc;
+ sc->sc_ih_drq.vh_ipl = VIA2_SCSIDRQ;
+ via2_register_irq(&sc->sc_ih_drq, sc->sc_dev.dv_xname);
}
static int
diff --git a/sys/arch/mac68k/dev/ncr5380reg.h b/sys/arch/mac68k/dev/ncr5380reg.h
index 42c7676c951..b0117f3e293 100644
--- a/sys/arch/mac68k/dev/ncr5380reg.h
+++ b/sys/arch/mac68k/dev/ncr5380reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr5380reg.h,v 1.5 2002/03/14 01:26:35 millert Exp $ */
+/* $OpenBSD: ncr5380reg.h,v 1.6 2006/01/16 21:45:58 miod Exp $ */
/* $NetBSD: ncr5380reg.h,v 1.9 1996/05/05 06:16:58 briggs Exp $ */
/*
@@ -161,6 +161,8 @@ struct ncr_softc {
struct device sc_dev;
struct scsi_link sc_link;
+ struct via2hand sc_ih_irq, sc_ih_drq;
+
/*
* Some (pre-SCSI2) devices don't support select with ATN.
* If the device responds to select with ATN by going into