diff options
author | 2016-09-21 10:28:47 +0000 | |
---|---|---|
committer | 2016-09-21 10:28:47 +0000 | |
commit | d9af2a9de0380acb2e3cc89eb19cace06fe5f84f (patch) | |
tree | b24cecbf669fc57d216708cfc44f3a2fe6318853 | |
parent | straighten the chairs (diff) | |
download | wireguard-openbsd-d9af2a9de0380acb2e3cc89eb19cace06fe5f84f.tar.xz wireguard-openbsd-d9af2a9de0380acb2e3cc89eb19cace06fe5f84f.zip |
Remove some dead code and only enable tx and rx interrupts.
ok patrick@, tom@, mikeb@
-rw-r--r-- | sys/arch/armv7/imx/if_fec.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/sys/arch/armv7/imx/if_fec.c b/sys/arch/armv7/imx/if_fec.c index a20ab89f4c4..22034c869e4 100644 --- a/sys/arch/armv7/imx/if_fec.c +++ b/sys/arch/armv7/imx/if_fec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fec.c,v 1.16 2016/08/19 18:25:53 kettenis Exp $ */ +/* $OpenBSD: if_fec.c,v 1.17 2016/09/21 10:28:47 kettenis Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se> * @@ -221,7 +221,6 @@ struct fec_softc { bus_space_handle_t sc_ioh; void *sc_ih; /* Interrupt handler */ bus_dma_tag_t sc_dma_tag; - uint32_t intr_status; /* soft interrupt status */ struct fec_dma_alloc txdma; /* bus_dma glue for tx desc */ struct fec_buf_desc *tx_desc_base; struct fec_dma_alloc rxdma; /* bus_dma glue for rx desc */ @@ -250,7 +249,6 @@ void fec_iff(struct fec_softc *); struct mbuf * fec_newbuf(void); int fec_intr(void *); void fec_recv(struct fec_softc *); -int fec_wait_intr(struct fec_softc *, int, int); int fec_miibus_readreg(struct device *, int, int); void fec_miibus_writereg(struct device *, int, int, int); void fec_miibus_statchg(struct device *); @@ -680,7 +678,6 @@ fec_init(struct fec_softc *sc) /* enable interrupts for tx/rx */ HWRITE4(sc, ENET_EIMR, ENET_EIR_TXF | ENET_EIR_RXF); - HWRITE4(sc, ENET_EIMR, 0xffffffff); fec_start(ifp); } @@ -900,15 +897,6 @@ fec_intr(void *arg) HWRITE4(sc, ENET_EIR, status); /* - * Wake up the blocking process to service command - * related interrupt(s). - */ - if (ISSET(status, ENET_EIR_MII)) { - sc->intr_status |= status; - wakeup(&sc->intr_status); - } - - /* * Handle incoming packets. */ if (ISSET(status, ENET_EIR_RXF)) { @@ -980,28 +968,6 @@ done: if_input(ifp, &ml); } -int -fec_wait_intr(struct fec_softc *sc, int mask, int timo) -{ - int status; - int s; - - s = splnet(); - - status = sc->intr_status; - while (status == 0) { - if (tsleep(&sc->intr_status, PWAIT, "hcintr", timo) - == EWOULDBLOCK) { - break; - } - status = sc->intr_status; - } - sc->intr_status &= ~status; - - splx(s); - return status; -} - /* * MII * Interrupts need ENET_ECR_ETHEREN to be set, |