Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/hyperv hvkbd(4): Don't wait forever.



details:   https://anonhg.NetBSD.org/src/rev/35684ee65b13
branches:  trunk
changeset: 980236:35684ee65b13
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Fri Jan 29 04:38:18 2021 +0000

description:
hvkbd(4): Don't wait forever.

diffstat:

 sys/dev/hyperv/hvkbd.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r c4aef3ad81ea -r 35684ee65b13 sys/dev/hyperv/hvkbd.c
--- a/sys/dev/hyperv/hvkbd.c    Fri Jan 29 02:26:58 2021 +0000
+++ b/sys/dev/hyperv/hvkbd.c    Fri Jan 29 04:38:18 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hvkbd.c,v 1.6 2019/11/22 12:40:07 nonaka Exp $ */
+/*     $NetBSD: hvkbd.c,v 1.7 2021/01/29 04:38:18 nonaka Exp $ */
 
 /*-
  * Copyright (c) 2017 Microsoft Corp.
@@ -36,7 +36,7 @@
 #endif /* _KERNEL_OPT */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.6 2019/11/22 12:40:07 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.7 2021/01/29 04:38:18 nonaka Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -350,7 +350,8 @@
                        hvkbd_intr(sc);
                        splx(s);
                } else
-                       tsleep(sc, PRIBIO | PCATCH, "hvkbdcon", mstohz(1));
+                       tsleep(sc, PRIBIO | PCATCH, "hvkbdcon",
+                           uimax(1, mstohz(1)));
        } while (--timo > 0 && sc->sc_connected == 0);
 
        if (timo == 0 && sc->sc_connected == 0) {



Home | Main Index | Thread Index | Old Index