diff options
author | 2010-08-12 14:21:55 +0000 | |
---|---|---|
committer | 2010-08-12 14:21:55 +0000 | |
commit | c22e77f10ab7b61fd01e5157c0dbfe618e7ea21f (patch) | |
tree | caa1eb33c90f44e2740bb38ce9b970617b63600f /sys/dev/pci | |
parent | make fgetln fixups look like the man page. correct a pair of brances and (diff) | |
download | wireguard-openbsd-c22e77f10ab7b61fd01e5157c0dbfe618e7ea21f.tar.xz wireguard-openbsd-c22e77f10ab7b61fd01e5157c0dbfe618e7ea21f.zip |
Reset the chip upon suspend, to make sure it stops DMA. Reset it again upon
resume to make sure the chip is initialized the same way as upon attach.
Fixes memory corruption after resume on the Dell Inspirion 4150.
ok deraadt@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/if_xl_pci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/pci/if_xl_pci.c b/sys/dev/pci/if_xl_pci.c index c01e9ea77c4..15bc79c4700 100644 --- a/sys/dev/pci/if_xl_pci.c +++ b/sys/dev/pci/if_xl_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xl_pci.c,v 1.30 2010/08/06 02:45:54 deraadt Exp $ */ +/* $OpenBSD: if_xl_pci.c,v 1.31 2010/08/12 14:21:55 kettenis Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -346,11 +346,14 @@ xl_pci_activate(struct device *self, int act) switch (act) { case DVACT_SUSPEND: - if (ifp->if_flags & IFF_RUNNING) + if (ifp->if_flags & IFF_RUNNING) { + xl_reset(sc); xl_stop(sc); + } config_activate_children(self, act); break; case DVACT_RESUME: + xl_reset(sc); config_activate_children(self, act); if (ifp->if_flags & IFF_UP) xl_init(sc); |