diff options
author | 2010-07-27 19:38:18 +0000 | |
---|---|---|
committer | 2010-07-27 19:38:18 +0000 | |
commit | a13c719a2a9e6ae799ec74eb5ad6149ce2489302 (patch) | |
tree | e3f22c12db8da802103a457f9b2bc75b1d749810 | |
parent | sync (diff) | |
download | wireguard-openbsd-a13c719a2a9e6ae799ec74eb5ad6149ce2489302.tar.xz wireguard-openbsd-a13c719a2a9e6ae799ec74eb5ad6149ce2489302.zip |
Make sure we stop DMA before we suspend.
ok deraadt@
-rw-r--r-- | sys/dev/pci/if_bge.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c index 79bf3cbe74b..27c0b4be551 100644 --- a/sys/dev/pci/if_bge.c +++ b/sys/dev/pci/if_bge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bge.c,v 1.294 2010/07/09 00:04:42 sthen Exp $ */ +/* $OpenBSD: if_bge.c,v 1.295 2010/07/27 19:38:18 kettenis Exp $ */ /* * Copyright (c) 2001 Wind River Systems @@ -2291,8 +2291,13 @@ fail_1: int bge_activate(struct device *self, int act) { + struct bge_softc *sc = (struct bge_softc *)self; + struct ifnet *ifp = &sc->arpcom.ac_if; + switch(act) { case DVACT_SUSPEND: + if (ifp->if_flags & IFF_RUNNING) + bge_stop(sc); break; case DVACT_RESUME: bge_power(PWR_RESUME, self); |