Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 2019 07:35:32 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r354529 - stable/12/sys/dev/ow
Message-ID:  <201911080735.xA87ZW8G057289@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Fri Nov  8 07:35:32 2019
New Revision: 354529
URL: https://svnweb.freebsd.org/changeset/base/354529

Log:
  MFC r354069: owc_gpiobus_read_data: disable preemption earlier

Modified:
  stable/12/sys/dev/ow/owc_gpiobus.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/ow/owc_gpiobus.c
==============================================================================
--- stable/12/sys/dev/ow/owc_gpiobus.c	Fri Nov  8 06:40:17 2019	(r354528)
+++ stable/12/sys/dev/ow/owc_gpiobus.c	Fri Nov  8 07:35:32 2019	(r354529)
@@ -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?201911080735.xA87ZW8G057289>