Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/dev/hyperv Pull up following revision(s) (requested b...
details: https://anonhg.NetBSD.org/src/rev/4cf5c03b384c
branches: netbsd-9
changeset: 1001177:4cf5c03b384c
user: martin <martin%NetBSD.org@localhost>
date: Sun Nov 24 08:13:07 2019 +0000
description:
Pull up following revision(s) (requested by nonaka in ticket #464):
sys/dev/hyperv/if_hvn.c: revision 1.8
sys/dev/hyperv/if_hvn.c: revision 1.9
sys/dev/hyperv/hvkbd.c: revision 1.5
sys/dev/hyperv/hvkbd.c: revision 1.6
sys/dev/hyperv/vmbus.c: revision 1.5
vmbus(4), hvn(4), hvkbd(4): Fixed wait time for tsleep(9).
hvn(4), hvkbd(4): Only need to poll when cold.
diffstat:
sys/dev/hyperv/hvkbd.c | 16 ++++++++--------
sys/dev/hyperv/if_hvn.c | 32 ++++++++++++++++----------------
sys/dev/hyperv/vmbus.c | 9 +++++----
3 files changed, 29 insertions(+), 28 deletions(-)
diffs (151 lines):
diff -r 1e43f95cd67b -r 4cf5c03b384c sys/dev/hyperv/hvkbd.c
--- a/sys/dev/hyperv/hvkbd.c Fri Nov 22 15:30:39 2019 +0000
+++ b/sys/dev/hyperv/hvkbd.c Sun Nov 24 08:13:07 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hvkbd.c,v 1.2.2.1 2019/11/16 16:51:45 martin Exp $ */
+/* $NetBSD: hvkbd.c,v 1.2.2.2 2019/11/24 08:13:07 martin 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.2.2.1 2019/11/16 16:51:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.2.2.2 2019/11/24 08:13:07 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -359,13 +359,13 @@
}
do {
- if (cold)
+ if (cold) {
delay(1000);
- else
- tsleep(sc, PRIBIO | PCATCH, "hvkbdcon", 1);
- s = spltty();
- hvkbd_intr(sc);
- splx(s);
+ s = spltty();
+ hvkbd_intr(sc);
+ splx(s);
+ } else
+ tsleep(sc, PRIBIO | PCATCH, "hvkbdcon", mstohz(1));
} while (--timo > 0 && sc->sc_connected == 0);
if (timo == 0 && sc->sc_connected == 0) {
diff -r 1e43f95cd67b -r 4cf5c03b384c sys/dev/hyperv/if_hvn.c
--- a/sys/dev/hyperv/if_hvn.c Fri Nov 22 15:30:39 2019 +0000
+++ b/sys/dev/hyperv/if_hvn.c Sun Nov 24 08:13:07 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_hvn.c,v 1.4.2.2 2019/11/18 19:46:33 martin Exp $ */
+/* $NetBSD: if_hvn.c,v 1.4.2.3 2019/11/24 08:13:07 martin Exp $ */
/* $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $ */
/*-
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.2 2019/11/18 19:46:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.4.2.3 2019/11/24 08:13:07 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1069,7 +1069,7 @@
if (cold)
delay(1000);
else
- tsleep(cmd, PRIBIO, "nvsout", 1);
+ tsleep(cmd, PRIBIO, "nvsout", mstohz(1));
} else if (rv) {
DPRINTF("%s: NVSP operation %u send error %d\n",
device_xname(sc->sc_dev), hdr->nvs_type, rv);
@@ -1087,13 +1087,13 @@
return 0;
do {
- if (cold)
+ if (cold) {
delay(1000);
- else
- tsleep(sc, PRIBIO | PCATCH, "nvscmd", 1);
- s = splnet();
- hvn_nvs_intr(sc);
- splx(s);
+ s = splnet();
+ hvn_nvs_intr(sc);
+ splx(s);
+ } else
+ tsleep(sc, PRIBIO | PCATCH, "nvscmd", mstohz(1));
} while (--timo > 0 && sc->sc_nvsdone != 1);
if (timo == 0 && sc->sc_nvsdone != 1) {
@@ -1391,7 +1391,7 @@
if (cold)
delay(1000);
else
- tsleep(rc, PRIBIO, "rndisout", 1);
+ tsleep(rc, PRIBIO, "rndisout", mstohz(1));
} else if (rv) {
DPRINTF("%s: RNDIS operation %u send error %d\n",
device_xname(sc->sc_dev), hdr->rm_type, rv);
@@ -1410,13 +1410,13 @@
BUS_DMASYNC_POSTWRITE);
do {
- if (cold)
+ if (cold) {
delay(1000);
- else
- tsleep(rc, PRIBIO | PCATCH, "rndiscmd", 1);
- s = splnet();
- hvn_nvs_intr(sc);
- splx(s);
+ s = splnet();
+ hvn_nvs_intr(sc);
+ splx(s);
+ } else
+ tsleep(rc, PRIBIO | PCATCH, "rndiscmd", mstohz(1));
} while (--timo > 0 && rc->rc_done != 1);
bus_dmamap_sync(sc->sc_dmat, rc->rc_dmap, 0, PAGE_SIZE,
diff -r 1e43f95cd67b -r 4cf5c03b384c sys/dev/hyperv/vmbus.c
--- a/sys/dev/hyperv/vmbus.c Fri Nov 22 15:30:39 2019 +0000
+++ b/sys/dev/hyperv/vmbus.c Sun Nov 24 08:13:07 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmbus.c,v 1.4 2019/07/09 10:07:11 nakayama Exp $ */
+/* $NetBSD: vmbus.c,v 1.4.2.1 2019/11/24 08:13:07 martin Exp $ */
/* $OpenBSD: hyperv.c,v 1.43 2017/06/27 13:56:15 mikeb Exp $ */
/*-
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.4 2019/07/09 10:07:11 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.4.2.1 2019/11/24 08:13:07 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -604,7 +604,7 @@
hyperv_intr();
splx(s);
} else
- tsleep(wchan, PRIBIO, wchan, 1);
+ tsleep(wchan, PRIBIO, wchan, mstohz(delays[i]));
}
if (status != HYPERCALL_STATUS_SUCCESS) {
device_printf(sc->sc_dev,
@@ -666,7 +666,8 @@
hyperv_intr();
splx(s);
} else
- tsleep(wchan, PRIBIO, wmsg ? wmsg : "hvwait", 1);
+ tsleep(wchan, PRIBIO, wmsg ? wmsg : "hvwait",
+ mstohz(1));
}
}
Home |
Main Index |
Thread Index |
Old Index