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
This commit is contained in:
Andriy Gapon 2019-10-25 14:20:59 +00:00
parent 46ecf8e0bc
commit c1750b821b

View File

@ -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);