diff --git a/sys/dev/ow/owc_gpiobus.c b/sys/dev/ow/owc_gpiobus.c index 16fc88acd594..6c23faf63104 100644 --- a/sys/dev/ow/owc_gpiobus.c +++ b/sys/dev/ow/owc_gpiobus.c @@ -279,6 +279,8 @@ owc_gpiobus_read_data(device_t dev, struct ow_timing *t, int *bit) 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 *t, int *bit) * master's pushing the line low. */ INPIN(sc); - critical_enter(); do { now = sbinuptime(); GETPIN(sc, &sample);