summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_em.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2009-10-09 21:04:03 +0000
committerderaadt <deraadt@openbsd.org>2009-10-09 21:04:03 +0000
commitc16d1646682a753ba457770b1eb6417bbb2a20ed (patch)
treecebbbbc838945d2e92b6c28e6f4179e72db511ad /sys/dev/pci/if_em.c
parentA working detach function. Has no impact on anything else in the driver. (diff)
downloadwireguard-openbsd-c16d1646682a753ba457770b1eb6417bbb2a20ed.tar.xz
wireguard-openbsd-c16d1646682a753ba457770b1eb6417bbb2a20ed.zip
Must also timeout_del twice in detach()...
Diffstat (limited to 'sys/dev/pci/if_em.c')
-rw-r--r--sys/dev/pci/if_em.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 457b0014fca..fc1c324a76d 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.223 2009/10/09 20:50:32 deraadt Exp $ */
+/* $OpenBSD: if_em.c,v 1.224 2009/10/09 21:04:03 deraadt Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -1760,6 +1760,9 @@ em_detach(struct device *self, int flags)
struct em_softc *sc = (struct em_softc *)self;
struct ifnet *ifp = &sc->interface_data.ac_if;
+ timeout_del(&sc->timer_handle);
+ timeout_del(&sc->tx_fifo_timer_handle);
+
em_dma_free(sc, &sc->rxdma);
em_dma_free(sc, &sc->txdma);
em_free_pci_resources(sc);