Date: Fri, 25 Oct 2019 13:42:37 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354067 - head/sys/dev/ow Message-ID: <201910251342.x9PDgbS8063164@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Fri Oct 25 13:42:36 2019 New Revision: 354067 URL: https://svnweb.freebsd.org/changeset/base/354067 Log: ow_temp: drop the lock around a call that can sleep This is similar to what is done around other calls that lead to own_command_wait() that can sleep. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D22107 Modified: head/sys/dev/ow/ow_temp.c Modified: head/sys/dev/ow/ow_temp.c ============================================================================== --- head/sys/dev/ow/ow_temp.c Fri Oct 25 12:46:06 2019 (r354066) +++ head/sys/dev/ow/ow_temp.c Fri Oct 25 13:42:36 2019 (r354067) @@ -143,7 +143,9 @@ ow_temp_event_thread(void *arg) pause("owtstart", device_get_unit(sc->dev) * hz / 100); // 10ms stagger mtx_lock(&sc->temp_lock); sc->flags |= OW_TEMP_RUNNING; + mtx_unlock(&sc->temp_lock); ow_temp_read_power_supply(sc->dev, &sc->parasite); + mtx_lock(&sc->temp_lock); if (sc->parasite) device_printf(sc->dev, "Running in parasitic mode unsupported\n"); while ((sc->flags & OW_TEMP_DONE) == 0) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910251342.x9PDgbS8063164>