On Sat, Jan 11, 2020 at 02:33:07AM -0600, Scott Cheloha wrote:
> Both of these cards have a 100ms sleep when closed.
>
> ok?
>
sure, ok ratchov
> Index: pci/eap.c
> ===
> RCS file: /cvs/src/sys/dev/pci/eap.c,v
> retrieving revision 1.57
> diff -u -p -r1.57 eap.c
> --- pci/eap.c 14 Dec 2019 12:48:32 - 1.57
> +++ pci/eap.c 11 Jan 2020 08:29:27 -
> @@ -1536,7 +1536,9 @@ eap_midi_close(void *addr)
> {
> struct eap_softc *sc = addr;
>
> - tsleep(sc, PWAIT, "eapclm", hz/10); /* give uart a chance to drain */
> + /* give uart a chance to drain */
> + tsleep_nsec(sc, PWAIT, "eapclm", MSEC_TO_NSEC(100));
> +
> EWRITE1(sc, EAP_UART_CONTROL, 0);
> EWRITE4(sc, EAP_ICSC, EREAD4(sc, EAP_ICSC) & ~EAP_UART_EN);
>
> Index: pci/autri.c
> ===
> RCS file: /cvs/src/sys/dev/pci/autri.c,v
> retrieving revision 1.43
> diff -u -p -r1.43 autri.c
> --- pci/autri.c 4 Dec 2019 20:21:35 - 1.43
> +++ pci/autri.c 11 Jan 2020 08:29:27 -
> @@ -1352,7 +1352,8 @@ autri_midi_close(void *addr)
>
> DPRINTF(("autri_midi_close()\n"));
>
> - tsleep(sc, PWAIT, "autri", hz/10); /* give uart a chance to drain */
> + /* give uart a chance to drain */
> + tsleep_nsec(sc, PWAIT, "autri", MSEC_TO_NSEC(100));
>
> sc->sc_iintr = NULL;
> sc->sc_ointr = NULL;
>