summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2008-08-09 16:42:29 +0000
committermiod <miod@openbsd.org>2008-08-09 16:42:29 +0000
commit2ab7ce7992f711f47ed800c183d70e56847b8906 (patch)
tree1da55abad7625a9b27da4145d3af6354b6e50a25 /sys/dev
parentDo not forget to set the ``specific EOI'' bit when sending a... specific EOI; (diff)
downloadwireguard-openbsd-2ab7ce7992f711f47ed800c183d70e56847b8906.tar.xz
wireguard-openbsd-2ab7ce7992f711f47ed800c183d70e56847b8906.zip
Pass a device name to {tc,tcds,ioasic}_intr_establish in order to get
meaningful names associated to the interrupt counters.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/tc/asc_tc.c5
-rw-r--r--sys/dev/tc/asc_tcds.c5
-rw-r--r--sys/dev/tc/if_fta.c4
-rw-r--r--sys/dev/tc/if_le_ioasic.c4
-rw-r--r--sys/dev/tc/if_le_tc.c5
-rw-r--r--sys/dev/tc/ioasicvar.h4
-rw-r--r--sys/dev/tc/tc.c7
-rw-r--r--sys/dev/tc/tcds.c14
-rw-r--r--sys/dev/tc/tcdsvar.h4
-rw-r--r--sys/dev/tc/tcvar.h8
10 files changed, 33 insertions, 27 deletions
diff --git a/sys/dev/tc/asc_tc.c b/sys/dev/tc/asc_tc.c
index bc9540d4f16..af9f0930dd6 100644
--- a/sys/dev/tc/asc_tc.c
+++ b/sys/dev/tc/asc_tc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc_tc.c,v 1.8 2008/06/26 05:42:18 ray Exp $ */
+/* $OpenBSD: asc_tc.c,v 1.9 2008/08/09 16:42:30 miod Exp $ */
/* $NetBSD: asc_tc.c,v 1.19 2001/11/15 09:48:19 lukem Exp $ */
/*-
@@ -137,7 +137,8 @@ asc_tc_attach(parent, self, aux)
}
asc->sc_base = (caddr_t)ta->ta_addr; /* XXX XXX XXX */
- tc_intr_establish(parent, ta->ta_cookie, IPL_BIO, ncr53c9x_intr, sc);
+ tc_intr_establish(parent, ta->ta_cookie, IPL_BIO, ncr53c9x_intr, sc,
+ self->dv_xname);
sc->sc_id = 7;
sc->sc_freq = (ta->ta_busspeed) ? 25000000 : 12500000;
diff --git a/sys/dev/tc/asc_tcds.c b/sys/dev/tc/asc_tcds.c
index 0a6eca529ea..8ccd54528de 100644
--- a/sys/dev/tc/asc_tcds.c
+++ b/sys/dev/tc/asc_tcds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc_tcds.c,v 1.5 2008/06/26 05:42:18 ray Exp $ */
+/* $OpenBSD: asc_tcds.c,v 1.6 2008/08/09 16:42:30 miod Exp $ */
/* $NetBSD: asc_tcds.c,v 1.5 2001/11/15 09:48:19 lukem Exp $ */
/*-
@@ -168,7 +168,8 @@ asc_tcds_attach(parent, self, aux)
/* gimme MHz */
sc->sc_freq /= 1000000;
- tcds_intr_establish(parent, tcdsdev->tcdsda_chip, ncr53c9x_intr, sc);
+ tcds_intr_establish(parent, tcdsdev->tcdsda_chip, ncr53c9x_intr, sc,
+ self->dv_xname);
/*
* XXX More of this should be in ncr53c9x_attach(), but
diff --git a/sys/dev/tc/if_fta.c b/sys/dev/tc/if_fta.c
index 343f8893240..d93fd60a1eb 100644
--- a/sys/dev/tc/if_fta.c
+++ b/sys/dev/tc/if_fta.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_fta.c,v 1.14 2007/11/06 18:20:07 miod Exp $ */
+/* $OpenBSD: if_fta.c,v 1.15 2008/08/09 16:42:30 miod Exp $ */
/* $NetBSD: if_fta.c,v 1.7 1996/10/22 21:37:26 cgd Exp $ */
/*-
@@ -114,7 +114,7 @@ pdq_tc_attach(parent, self, aux)
pdq_ifattach(sc, NULL);
tc_intr_establish(parent, ta->ta_cookie, IPL_NET,
- (int (*)(void *)) pdq_interrupt, sc->sc_pdq);
+ (int (*)(void *)) pdq_interrupt, sc->sc_pdq, self->dv_xname);
sc->sc_ats = shutdownhook_establish((void (*)(void *)) pdq_hwreset,
sc->sc_pdq);
diff --git a/sys/dev/tc/if_le_ioasic.c b/sys/dev/tc/if_le_ioasic.c
index b239b4b9af9..fd1d021b5b4 100644
--- a/sys/dev/tc/if_le_ioasic.c
+++ b/sys/dev/tc/if_le_ioasic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_ioasic.c,v 1.14 2007/11/06 18:20:07 miod Exp $ */
+/* $OpenBSD: if_le_ioasic.c,v 1.15 2008/08/09 16:42:30 miod Exp $ */
/* $NetBSD: if_le_ioasic.c,v 1.18 2001/11/13 06:26:10 lukem Exp $ */
/*
@@ -164,7 +164,7 @@ le_ioasic_attach(struct device *parent, struct device *self, void *aux)
+ IOASIC_SLOT_2_START);
ioasic_intr_establish(parent, d->iada_cookie, IPL_NET,
- am7990_intr, sc);
+ am7990_intr, sc, self->dv_xname);
return;
bad:
diff --git a/sys/dev/tc/if_le_tc.c b/sys/dev/tc/if_le_tc.c
index e8beb43b655..f3df7ea9aa9 100644
--- a/sys/dev/tc/if_le_tc.c
+++ b/sys/dev/tc/if_le_tc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_le_tc.c,v 1.9 2007/11/06 18:20:07 miod Exp $ */
+/* $OpenBSD: if_le_tc.c,v 1.10 2008/08/09 16:42:30 miod Exp $ */
/* $NetBSD: if_le_tc.c,v 1.12 2001/11/13 06:26:10 lukem Exp $ */
/*
@@ -105,5 +105,6 @@ le_tc_attach(struct device *parent, struct device *self, void *aux)
dec_le_common_attach(&lesc->sc_am7990,
(u_char *)(d->ta_addr + LE_OFFSET_ROM + 2));
- tc_intr_establish(parent, d->ta_cookie, IPL_NET, am7990_intr, sc);
+ tc_intr_establish(parent, d->ta_cookie, IPL_NET, am7990_intr, sc,
+ self->dv_xname);
}
diff --git a/sys/dev/tc/ioasicvar.h b/sys/dev/tc/ioasicvar.h
index 01212d1a459..f7be0c79a21 100644
--- a/sys/dev/tc/ioasicvar.h
+++ b/sys/dev/tc/ioasicvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioasicvar.h,v 1.8 2008/07/30 22:02:09 miod Exp $ */
+/* $OpenBSD: ioasicvar.h,v 1.9 2008/08/09 16:42:30 miod Exp $ */
/* $NetBSD: ioasicvar.h,v 1.14 2000/10/17 09:45:49 nisimura Exp $ */
/*
@@ -67,7 +67,7 @@ extern struct cfdriver ioasic_cd;
extern tc_addr_t ioasic_base;
void ioasic_intr_establish(struct device *, void *,
- int, int (*)(void *), void *);
+ int, int (*)(void *), void *, const char *);
void ioasic_intr_disestablish(struct device *, void *);
int ioasic_submatch(void *, struct ioasicdev_attach_args *);
void ioasic_attach_devs(struct ioasic_softc *,
diff --git a/sys/dev/tc/tc.c b/sys/dev/tc/tc.c
index 335d0890ee9..c2aa1ab5aef 100644
--- a/sys/dev/tc/tc.c
+++ b/sys/dev/tc/tc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tc.c,v 1.17 2007/06/25 14:13:40 tom Exp $ */
+/* $OpenBSD: tc.c,v 1.18 2008/08/09 16:42:30 miod Exp $ */
/* $NetBSD: tc.c,v 1.29 2001/11/13 06:26:10 lukem Exp $ */
/*
@@ -261,15 +261,16 @@ tc_checkslot(slotbase, namep)
}
void
-tc_intr_establish(dev, cookie, level, handler, arg)
+tc_intr_establish(dev, cookie, level, handler, arg, name)
struct device *dev;
void *cookie, *arg;
int level;
int (*handler)(void *);
+ const char *name;
{
struct tc_softc *sc = tc_cd.cd_devs[0];
- (*sc->sc_intr_establish)(dev, cookie, level, handler, arg);
+ (*sc->sc_intr_establish)(dev, cookie, level, handler, arg, name);
}
void
diff --git a/sys/dev/tc/tcds.c b/sys/dev/tc/tcds.c
index 82ec0e5b95b..c217943bb4a 100644
--- a/sys/dev/tc/tcds.c
+++ b/sys/dev/tc/tcds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcds.c,v 1.6 2008/06/26 05:42:18 ray Exp $ */
+/* $OpenBSD: tcds.c,v 1.7 2008/08/09 16:42:30 miod Exp $ */
/* $NetBSD: tcds.c,v 1.3 2001/11/13 06:26:10 lukem Exp $ */
/*-
@@ -199,7 +199,8 @@ tcdsattach(parent, self, aux)
sc->sc_cookie = ta->ta_cookie;
- tc_intr_establish(parent, sc->sc_cookie, IPL_BIO, tcds_intr, sc);
+ tc_intr_establish(parent, sc->sc_cookie, IPL_BIO, tcds_intr, sc,
+ self->dv_xname);
/*
* XXX
@@ -225,9 +226,6 @@ tcdsattach(parent, self, aux)
slotc = &sc->sc_slots[i];
bzero(slotc, sizeof *slotc); /* clear everything */
- evcount_attach(&slotc->sc_count, sc->sc_dv.dv_xname, NULL,
- &evcount_intr);
-
slotc->sc_slot = i;
slotc->sc_bst = sc->sc_bst;
slotc->sc_bsh = sc->sc_bsh;
@@ -336,11 +334,12 @@ tcdsprint(aux, pnp)
}
void
-tcds_intr_establish(tcds, slot, func, arg)
+tcds_intr_establish(tcds, slot, func, arg, name)
struct device *tcds;
int slot;
int (*func)(void *);
void *arg;
+ const char *name;
{
struct tcds_softc *sc = (struct tcds_softc *)tcds;
@@ -349,6 +348,8 @@ tcds_intr_establish(tcds, slot, func, arg)
sc->sc_slots[slot].sc_intrhand = func;
sc->sc_slots[slot].sc_intrarg = arg;
+ evcount_attach(&sc->sc_slots[slot].sc_count, name, NULL, &evcount_intr);
+
tcds_scsi_reset(&sc->sc_slots[slot]);
}
@@ -365,6 +366,7 @@ tcds_intr_disestablish(tcds, slot)
sc->sc_slots[slot].sc_intrhand = tcds_intrnull;
sc->sc_slots[slot].sc_intrarg = (void *)(u_long)slot;
+ evcount_detach(&sc->sc_slots[slot].sc_count);
tcds_dma_enable(&sc->sc_slots[slot], 0);
tcds_scsi_enable(&sc->sc_slots[slot], 0);
diff --git a/sys/dev/tc/tcdsvar.h b/sys/dev/tc/tcdsvar.h
index 261bcae1546..9aedc146fb3 100644
--- a/sys/dev/tc/tcdsvar.h
+++ b/sys/dev/tc/tcdsvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcdsvar.h,v 1.3 2006/03/13 22:36:06 miod Exp $ */
+/* $OpenBSD: tcdsvar.h,v 1.4 2008/08/09 16:42:30 miod Exp $ */
/* $NetBSD: tcdsvar.h,v 1.2 2001/08/22 05:00:27 nisimura Exp $ */
/*
@@ -77,7 +77,7 @@ struct tcdsdev_attach_args {
* TCDS functions.
*/
void tcds_intr_establish(struct device *, int,
- int (*)(void *), void *);
+ int (*)(void *), void *, const char *);
void tcds_intr_disestablish(struct device *, int);
void tcds_dma_enable(struct tcds_slotconfig *, int);
void tcds_scsi_enable(struct tcds_slotconfig *, int);
diff --git a/sys/dev/tc/tcvar.h b/sys/dev/tc/tcvar.h
index 5c1d72fbf1d..d5bd23188ac 100644
--- a/sys/dev/tc/tcvar.h
+++ b/sys/dev/tc/tcvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcvar.h,v 1.13 2007/11/06 18:20:07 miod Exp $ */
+/* $OpenBSD: tcvar.h,v 1.14 2008/08/09 16:42:30 miod Exp $ */
/* $NetBSD: tcvar.h,v 1.17 2000/06/04 19:15:15 cgd Exp $ */
/*
@@ -51,7 +51,7 @@ struct tc_softc {
struct tc_slotdesc *sc_slots;
void (*sc_intr_establish)(struct device *, void *,
- int, int (*)(void *), void *);
+ int, int (*)(void *), void *, const char *);
void (*sc_intr_disestablish)(struct device *, void *);
bus_dma_tag_t (*sc_get_dma_tag)(int);
};
@@ -73,7 +73,7 @@ struct tcbus_attach_args {
/* TC bus resource management; XXX will move elsewhere eventually. */
void (*tba_intr_establish)(struct device *, void *,
- int, int (*)(void *), void *);
+ int, int (*)(void *), void *, const char *);
void (*tba_intr_disestablish)(struct device *, void *);
bus_dma_tag_t (*tba_get_dma_tag)(int);
};
@@ -121,7 +121,7 @@ int tc_checkslot(tc_addr_t, char *);
void tc_devinfo(const char *, char *, size_t);
void tcattach(struct device *, struct device *, void *);
void tc_intr_establish(struct device *, void *, int, int (*)(void *),
- void *);
+ void *, const char *);
void tc_intr_disestablish(struct device *, void *);
/*