From a13c719a2a9e6ae799ec74eb5ad6149ce2489302 Mon Sep 17 00:00:00 2001 From: kettenis Date: Tue, 27 Jul 2010 19:38:18 +0000 Subject: [PATCH] Make sure we stop DMA before we suspend. ok deraadt@ --- sys/dev/pci/if_bge.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); -- 2.20.1