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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to