diff options
| author | riastradh <riastradh@NetBSD.org> | 2021-06-14 22:00:10 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2021-06-14 22:00:10 +0000 |
| commit | 5363e628df53cb35a4f3dd43178b8635d0d904bb (patch) | |
| tree | dcd49fe33bd840cba7ab51653dc9369afd1c000b /sys/dev | |
| parent | 69914541dc879bd98322ed0dc93e1db3951625f2 (diff) | |
ipmi(4): Notify config_pending_decr when ready, not when dying.
Should fix hang at boot.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ipmi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c index 4895a0b7e7f..ac40b86d8d1 100644 --- a/sys/dev/ipmi.c +++ b/sys/dev/ipmi.c @@ -1,4 +1,4 @@ -/* $NetBSD: ipmi.c,v 1.7 2021/06/12 12:15:43 riastradh Exp $ */ +/* $NetBSD: ipmi.c,v 1.8 2021/06/14 22:00:10 riastradh Exp $ */ /* * Copyright (c) 2019 Michael van Elst @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.7 2021/06/12 12:15:43 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.8 2021/06/14 22:00:10 riastradh Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -2090,6 +2090,8 @@ ipmi_thread(void *cookie) if (!pmf_device_register(self, ipmi_suspend, NULL)) aprint_error_dev(self, "couldn't establish a power handler\n"); + config_pending_decr(self); + mutex_enter(&sc->sc_poll_mtx); while (sc->sc_thread_running) { while (sc->sc_mode == IPMI_MODE_COMMAND) @@ -2108,7 +2110,6 @@ ipmi_thread(void *cookie) SENSOR_REFRESH_RATE); } mutex_exit(&sc->sc_poll_mtx); - config_pending_decr(self); kthread_exit(0); } |
