svn commit: r354067 - head/sys/dev/ow

Andriy Gapon avg at FreeBSD.org
Fri Oct 25 13:42:37 UTC 2019


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) {


More information about the svn-src-all mailing list