diff options
author | 2009-07-12 18:24:23 +0000 | |
---|---|---|
committer | 2009-07-12 18:24:23 +0000 | |
commit | bac27df34cdd78268cac2a14d320ca5dad588a72 (patch) | |
tree | f9be110470700b75982277d5bfd2e4c648ba3b37 | |
parent | don't cast lvalue, no binary change. (diff) | |
download | wireguard-openbsd-bac27df34cdd78268cac2a14d320ca5dad588a72.tar.xz wireguard-openbsd-bac27df34cdd78268cac2a14d320ca5dad588a72.zip |
In a error case in malo_init (e.g. can't load the firmware),
always call malo_stop which removes the previously registered
interrupt handler from the cardbus interrupt handler chain.
Otherwise, since malo_init gets called twice in a error case,
our interrupt handler got registered twice and on the next
device detach, just the last registered interrupt handler got
removed, which leaves one left. That caused a kernel page fault
trap as soon our "zombie" interrupt handler got called.
Fix a typo while here.
-rw-r--r-- | sys/dev/ic/malo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c index de34d51d40a..d9a2243e3de 100644 --- a/sys/dev/ic/malo.c +++ b/sys/dev/ic/malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malo.c,v 1.88 2009/07/10 07:34:02 blambert Exp $ */ +/* $OpenBSD: malo.c,v 1.89 2009/07/12 18:24:23 mglocker Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -931,9 +931,9 @@ malo_init(struct ifnet *ifp) fail: /* reset adapter */ - DPRINTF(1, "%s: malo_init failed, reseting card\n", + DPRINTF(1, "%s: malo_init failed, resetting card\n", sc->sc_dev.dv_xname); - malo_ctl_write4(sc, 0x0c18, (1 << 15)); + malo_stop(sc); return (error); } |