For the sleep, ticks to milliseconds.

The timeout is hz / 10, so 100 milliseconds.

While here, also add relevant includes.

ok?
Index: pci/pccbb.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/pccbb.c,v
retrieving revision 1.99
diff -u -p -r1.99 pccbb.c
--- pci/pccbb.c 5 Jan 2020 01:07:58 -0000       1.99
+++ pci/pccbb.c 6 Mar 2020 02:41:42 -0000
@@ -47,6 +47,8 @@
 #include <sys/device.h>
 #include <sys/malloc.h>
 #include <sys/task.h>
+#include <sys/time.h>
+#include <sys/timeout.h>
 
 #include <machine/intr.h>
 #include <machine/bus.h>
@@ -217,7 +219,7 @@ delay_ms(int millis, void *param)
        if (cold)
                delay(millis * 1000);
        else
-               tsleep(param, PWAIT, "pccbb", MAX(2, hz * millis / 1000));
+               tsleep_nsec(param, PWAIT, "pccbb", MSEC_TO_NSEC(millis));
 }
 
 int
@@ -1234,7 +1236,7 @@ cb_pcmcia_poll(void *arg)
        u_int32_t spsr;                /* socket present-state reg */
 
        timeout_set(&cb_poll_timeout, cb_pcmcia_poll, arg);
-       timeout_add(&cb_poll_timeout, hz / 10);
+       timeout_add_msec(&cb_poll_timeout, 100);
        switch (poll->level) {
        case IPL_NET:
                s = splnet();

Reply via email to