Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/dev/hyperv Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/adc96cbb4574
branches:  netbsd-8
changeset: 950726:adc96cbb4574
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Jan 29 18:18:25 2021 +0000

description:
Pull up following revision(s) (requested by nonaka in ticket #1647):

        sys/dev/hyperv/if_hvn.c: revision 1.20 (via patch)
        sys/dev/hyperv/hvkbd.c: revision 1.7 (via patch)
        sys/dev/hyperv/vmbus.c: revision 1.12 (via patch)

hvkbd(4): Don't wait forever.
vmbus(4): Don't wait forever.
hvn(4): Don't wait forever.

diffstat:

 sys/dev/hyperv/hvkbd.c  |   7 ++++---
 sys/dev/hyperv/if_hvn.c |  15 +++++++++------
 sys/dev/hyperv/vmbus.c  |   9 +++++----
 3 files changed, 18 insertions(+), 13 deletions(-)

diffs (122 lines):

diff -r 654e7fad8cff -r adc96cbb4574 sys/dev/hyperv/hvkbd.c
--- a/sys/dev/hyperv/hvkbd.c    Fri Jan 08 13:03:54 2021 +0000
+++ b/sys/dev/hyperv/hvkbd.c    Fri Jan 29 18:18:25 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hvkbd.c,v 1.1.4.6 2019/11/24 08:11:06 martin Exp $     */
+/*     $NetBSD: hvkbd.c,v 1.1.4.7 2021/01/29 18:18:25 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.1.4.6 2019/11/24 08:11:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hvkbd.c,v 1.1.4.7 2021/01/29 18:18:25 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -363,7 +363,8 @@
                        hvkbd_intr(sc);
                        splx(s);
                } else
-                       tsleep(sc, PRIBIO | PCATCH, "hvkbdcon", mstohz(1));
+                       tsleep(sc, PRIBIO | PCATCH, "hvkbdcon",
+                           max(1, mstohz(1)));
        } while (--timo > 0 && sc->sc_connected == 0);
 
        if (timo == 0 && sc->sc_connected == 0) {
diff -r 654e7fad8cff -r adc96cbb4574 sys/dev/hyperv/if_hvn.c
--- a/sys/dev/hyperv/if_hvn.c   Fri Jan 08 13:03:54 2021 +0000
+++ b/sys/dev/hyperv/if_hvn.c   Fri Jan 29 18:18:25 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_hvn.c,v 1.2.2.8 2020/12/11 15:48:02 martin Exp $    */
+/*     $NetBSD: if_hvn.c,v 1.2.2.9 2021/01/29 18:18:25 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.2.2.8 2020/12/11 15:48:02 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.2.2.9 2021/01/29 18:18:25 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1065,7 +1065,8 @@
                        if (cold)
                                delay(1000);
                        else
-                               tsleep(cmd, PRIBIO, "nvsout", mstohz(1));
+                               tsleep(cmd, PRIBIO, "nvsout",
+                                   max(1, mstohz(1)));
                } else if (rv) {
                        DPRINTF("%s: NVSP operation %u send error %d\n",
                            device_xname(sc->sc_dev), hdr->nvs_type, rv);
@@ -1090,7 +1091,7 @@
                        splx(s);
                } else
                        tsleep(sc->sc_nvsrsp, PRIBIO | PCATCH, "nvscmd",
-                           mstohz(1));
+                           max(1, mstohz(1)));
        } while (--timo > 0 && sc->sc_nvsdone != 1);
 
        if (timo == 0 && sc->sc_nvsdone != 1) {
@@ -1388,7 +1389,8 @@
                        if (cold)
                                delay(1000);
                        else
-                               tsleep(rc, PRIBIO, "rndisout", mstohz(1));
+                               tsleep(rc, PRIBIO, "rndisout",
+                                   max(1, mstohz(1)));
                } else if (rv) {
                        DPRINTF("%s: RNDIS operation %u send error %d\n",
                            device_xname(sc->sc_dev), hdr->rm_type, rv);
@@ -1413,7 +1415,8 @@
                        hvn_nvs_intr(sc);
                        splx(s);
                } else
-                       tsleep(rc, PRIBIO | PCATCH, "rndiscmd", mstohz(1));
+                       tsleep(rc, PRIBIO | PCATCH, "rndiscmd",
+                           max(1, mstohz(1)));
        } while (--timo > 0 && rc->rc_done != 1);
 
        bus_dmamap_sync(sc->sc_dmat, rc->rc_dmap, 0, PAGE_SIZE,
diff -r 654e7fad8cff -r adc96cbb4574 sys/dev/hyperv/vmbus.c
--- a/sys/dev/hyperv/vmbus.c    Fri Jan 08 13:03:54 2021 +0000
+++ b/sys/dev/hyperv/vmbus.c    Fri Jan 29 18:18:25 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmbus.c,v 1.2.2.5 2019/11/24 08:11:06 martin Exp $     */
+/*     $NetBSD: vmbus.c,v 1.2.2.6 2021/01/29 18:18:25 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.2.2.5 2019/11/24 08:11:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vmbus.c,v 1.2.2.6 2021/01/29 18:18:25 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -604,7 +604,8 @@
                        hyperv_intr();
                        splx(s);
                } else
-                       tsleep(wchan, PRIBIO, wchan, mstohz(delays[i]));
+                       tsleep(wchan, PRIBIO, wchan,
+                           max(1, mstohz(delays[i] / 1000)));
        }
        if (status != HYPERCALL_STATUS_SUCCESS) {
                device_printf(sc->sc_dev,
@@ -667,7 +668,7 @@
                        splx(s);
                } else
                        tsleep(wchan, PRIBIO, wmsg ? wmsg : "hvwait",
-                           mstohz(1));
+                           max(1, mstohz(1)));
        }
 }
 



Home | Main Index | Thread Index | Old Index