Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Oct 2019 14:20:59 +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: r354069 - head/sys/dev/ow
Message-ID:  <201910251420.x9PEKxxS083902@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Oct 25 14:20:59 2019
New Revision: 354069
URL: https://svnweb.freebsd.org/changeset/base/354069

Log:
  owc_gpiobus_read_data: disable preemption earlier
  
  Now this is done before starting the low pulse that has rather tight
  timing.
  
  Reviewed by:	imp (D22108)
  MFC after:	2 weeks

Modified:
  head/sys/dev/ow/owc_gpiobus.c

Modified: head/sys/dev/ow/owc_gpiobus.c
==============================================================================
--- head/sys/dev/ow/owc_gpiobus.c	Fri Oct 25 13:47:17 2019	(r354068)
+++ head/sys/dev/ow/owc_gpiobus.c	Fri Oct 25 14:20:59 2019	(r354069)
@@ -279,6 +279,8 @@ owc_gpiobus_read_data(device_t dev, struct ow_timing *
 	if (error != 0)
 		return (error);
 
+	critical_enter();
+
 	/* Force low for t_lowr microseconds */
 	then = sbinuptime();
 	OUTPIN(sc);
@@ -291,7 +293,6 @@ owc_gpiobus_read_data(device_t dev, struct ow_timing *
 	 * master's pushing the line low.
 	 */
 	INPIN(sc);
-	critical_enter();
 	do {
 		now = sbinuptime();
 		GETPIN(sc, &sample);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910251420.x9PEKxxS083902>