diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2009-07-12 18:24:24 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2009-07-12 18:24:24 +0000 |
commit | 8781d26cf21fdd1ff882384d7aa4ca9666444a13 (patch) | |
tree | eefe5ad43cdb414c98b7b1c8ba2acfd125c39b66 /sys | |
parent | d49bab7fd24ec5f2b45027cb2563cf299230a2f0 (diff) |
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.
Diffstat (limited to 'sys')
-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); } |