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/155a9ee98170
branches: trunk
changeset: 950418:155a9ee98170
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 6a41ba9a586d -r 155a9ee98170 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