> From: "Ted Unangst" <t...@tedunangst.com> > Date: Wed, 09 Jan 2019 19:01:09 -0500 > > Mark Kettenis wrote: > > Index: dev/acpi/dsdt.c > > =================================================================== > > RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v > > retrieving revision 1.243 > > diff -u -p -r1.243 dsdt.c > > --- dev/acpi/dsdt.c 19 Aug 2018 08:23:47 -0000 1.243 > > +++ dev/acpi/dsdt.c 8 Jan 2019 18:55:14 -0000 > > @@ -2905,29 +2905,33 @@ int > > acpi_event_wait(struct aml_scope *scope, struct aml_value *evt, int > > timeout) > > { > > /* Wait for event to occur; do work in meantime */ > > - evt->v_evt.state = 0; > > - while (!evt->v_evt.state) { > > - if (!acpi_dotask(acpi_softc) && !cold) > > - tsleep(evt, PWAIT, "acpievt", 1); > > - else > > - delay(100); > > + while (evt->v_evt.state == 0 && timeout >= 0) { > > + if (acpi_dotask(acpi_softc)) > > + continue; > > + if (!cold) { > > + if (rwsleep(evt, &acpi_softc->sc_lck, PWAIT, > > + "acpievt", 1) == EWOULDBLOCK) { > > + if (timeout < 0xffff) > > + timeout -= (1000 / hz); > > + } > > + } else { > > + delay(1000); > > + if (timeout < 0xffff) > > + timeout--; > > + } > > Does 0xffff come from ACPI? Can we give that a name?
Sure. Committed with an additional AML_NO_TIMEOUT define.