Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Now Jason has made this build, avoid a 50+ year



details:   https://anonhg.NetBSD.org/src/rev/ce4c4c2fe847
branches:  trunk
changeset: 989109:ce4c4c2fe847
user:      kre <kre%NetBSD.org@localhost>
date:      Tue Oct 12 06:25:17 2021 +0000

description:
Now Jason has made this build, avoid a 50+ year
sleep to implement HUPCL.

diffstat:

 sys/dev/ic/com.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 5073553189ac -r ce4c4c2fe847 sys/dev/ic/com.c
--- a/sys/dev/ic/com.c  Tue Oct 12 04:55:19 2021 +0000
+++ b/sys/dev/ic/com.c  Tue Oct 12 06:25:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.366 2021/10/11 18:39:06 jmcneill Exp $ */
+/* $NetBSD: com.c,v 1.367 2021/10/12 06:25:17 kre Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.366 2021/10/11 18:39:06 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.367 2021/10/12 06:25:17 kre Exp $");
 
 #include "opt_com.h"
 #include "opt_ddb.h"
@@ -986,9 +986,12 @@
                if (timerisset(&sc->sc_hup_pending)) {
                        getmicrotime(&now);
                        while (timercmp(&now, &sc->sc_hup_pending, <)) {
+                               int ms;
+
+
                                timersub(&sc->sc_hup_pending, &now, &diff);
-                               int ms = now.tv_sec * 1000 +
-                                   uimin(now.tv_usec / 1000, 1);
+                               ms = diff.tv_sec * 1000 +
+                                   uimax(diff.tv_usec / 1000, 1);
                                kpause("comopen", false, mstohz(ms),
                                    &sc->sc_lock);
                        }



Home | Main Index | Thread Index | Old Index