vdsp(4) uses a workaround to not block forever in case the hypervisor
doesn't generate an interrupt.  The current behavior is to wait the
smallest possible interval: one tick.

Since this is a documented workaround the value doesn't matter much, so
convert the driver to tsleep_nsec(9) with a conservative value.  This
value could be reduced later on.

Ok?

Index: arch/sparc64/dev/vdsp.c
===================================================================
RCS file: /cvs/src/sys/arch/sparc64/dev/vdsp.c,v
retrieving revision 1.46
diff -u -p -r1.46 vdsp.c
--- arch/sparc64/dev/vdsp.c     6 Oct 2019 16:24:14 -0000       1.46
+++ arch/sparc64/dev/vdsp.c     13 Jan 2020 12:18:48 -0000
@@ -894,7 +894,8 @@ vdsp_sendmsg(struct vdsp_softc *sc, void
                         * we specify a timeout such that we don't
                         * block forever.
                         */
-                       err = tsleep(lc->lc_txq, PWAIT, "vdsp", 1);
+                       err = tsleep_nsec(lc->lc_txq, PWAIT, "vdsp",
+                           MSEC_TO_NSEC(100));
                }
        } while (dowait && err == EWOULDBLOCK);
 }

Reply via email to