summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphilip <philip@FreeBSD.org>2011-11-19 09:16:52 +0000
committerphilip <philip@FreeBSD.org>2011-11-19 09:16:52 +0000
commit57eff55b88ea3dc6a4a8cc80becb3dc21dcbf80c (patch)
treecb773e93a45d7e1a0188925c8eebdf4823ef5905
parent36c823591d5d5d18919e46977f060dafaf2aa245 (diff)
downloadFreeBSD-src-57eff55b88ea3dc6a4a8cc80becb3dc21dcbf80c.zip
FreeBSD-src-57eff55b88ea3dc6a4a8cc80becb3dc21dcbf80c.tar.gz
sfxge: Remove interrupt self-test code
It's not currently used; it didn't build on 32-bit and the previous build fix is incorrect. If we really implement self-tests we can do this again properly. Submitted by: Ben Hutchings <bwh -at- solarflare.com> MFC after: 3 weeks
-rw-r--r--sys/dev/sfxge/sfxge.h1
-rw-r--r--sys/dev/sfxge/sfxge_intr.c27
2 files changed, 3 insertions, 25 deletions
diff --git a/sys/dev/sfxge/sfxge.h b/sys/dev/sfxge/sfxge.h
index 4b6d19a..2d3e042 100644
--- a/sys/dev/sfxge/sfxge.h
+++ b/sys/dev/sfxge/sfxge.h
@@ -144,7 +144,6 @@ struct sfxge_intr {
int n_alloc;
int type;
efsys_mem_t status;
- uint64_t mask;
uint32_t zero_count;
};
diff --git a/sys/dev/sfxge/sfxge_intr.c b/sys/dev/sfxge/sfxge_intr.c
index ddc1b4c..c8f4c3d 100644
--- a/sys/dev/sfxge/sfxge_intr.c
+++ b/sys/dev/sfxge/sfxge_intr.c
@@ -65,15 +65,9 @@ sfxge_intr_line_filter(void *arg)
KASSERT(intr->type == EFX_INTR_LINE,
("intr->type != EFX_INTR_LINE"));
- if (intr->state != SFXGE_INTR_STARTED &&
- intr->state != SFXGE_INTR_TESTING)
+ if (intr->state != SFXGE_INTR_STARTED)
return FILTER_STRAY;
- if (intr->state == SFXGE_INTR_TESTING) {
- intr->mask |= 1; /* only one interrupt */
- return FILTER_HANDLED;
- }
-
(void)efx_intr_status_line(enp, &fatal, &qmask);
if (fatal) {
@@ -137,21 +131,9 @@ sfxge_intr_message(void *arg)
KASSERT(intr->type == EFX_INTR_MESSAGE,
("intr->type != EFX_INTR_MESSAGE"));
- if (intr->state != SFXGE_INTR_STARTED &&
- intr->state != SFXGE_INTR_TESTING)
+ if (intr->state != SFXGE_INTR_STARTED)
return;
- if (intr->state == SFXGE_INTR_TESTING) {
- uint64_t mask;
-
- do {
- mask = intr->mask;
- } while (atomic_cmpset_ptr(&intr->mask, mask,
- mask | (1 << index)) == 0);
-
- return;
- }
-
(void)efx_intr_status_message(enp, index, &fatal);
if (fatal) {
@@ -447,7 +429,6 @@ sfxge_intr_stop(struct sfxge_softc *sc)
intr->state = SFXGE_INTR_INITIALIZED;
/* Disable interrupts at the NIC */
- intr->mask = 0;
efx_intr_disable(sc->enp);
/* Disable interrupts at the bus */
@@ -480,13 +461,11 @@ sfxge_intr_start(struct sfxge_softc *sc)
if ((rc = sfxge_intr_bus_enable(sc)) != 0)
goto fail;
- intr->state = SFXGE_INTR_TESTING;
+ intr->state = SFXGE_INTR_STARTED;
/* Enable interrupts at the NIC */
efx_intr_enable(sc->enp);
- intr->state = SFXGE_INTR_STARTED;
-
return (0);
fail:
OpenPOWER on IntegriCloud