Convert infinite tsleep(9) to tsleep_nsec(9) in sys/dev/usb, ok?

Index: if_wi_usb.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_wi_usb.c,v
retrieving revision 1.70
diff -u -p -r1.70 if_wi_usb.c
--- if_wi_usb.c 12 Nov 2019 07:47:30 -0000      1.70
+++ if_wi_usb.c 20 Nov 2019 11:27:06 -0000
@@ -1813,7 +1813,7 @@ wi_usb_thread(void *arg)
                if (wi_thread_info->status == 0) {
                        s = splnet();
                        wi_thread_info->idle = 1;
-                       tsleep(wi_thread_info, PRIBIO, "wiIDL", 0);
+                       tsleep_nsec(wi_thread_info, PRIBIO, "wiIDL", INFSLP);
                        wi_thread_info->idle = 0;
                        splx(s);
                }
@@ -1854,7 +1854,7 @@ wi_usb_tx_lock(struct wi_usb_softc *sc)
                sc->wi_lockwait++;
                DPRINTFN(10,("%s: %s: busy %d\n", sc->wi_usb_dev.dv_xname,
                __func__, sc->wi_lockwait ));
-               tsleep(&sc->wi_lock, PRIBIO, "witxl", 0);
+               tsleep_nsec(&sc->wi_lock, PRIBIO, "witxl", INFSLP);
        }
 
        if (sc->wi_lock != 0)
@@ -1908,7 +1908,7 @@ wi_usb_ctl_lock(struct wi_usb_softc *sc)
                sc->wi_ctllockwait++;
                DPRINTFN(10,("%s: %s: busy %d\n", sc->wi_usb_dev.dv_xname,
                __func__, sc->wi_ctllockwait ));
-               tsleep(&sc->wi_ctllock, PRIBIO, "wiusbthr", 0);
+               tsleep_nsec(&sc->wi_ctllock, PRIBIO, "wiusbthr", INFSLP);
        }
 
        if (sc->wi_ctllock != 0)
Index: ohci.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/ohci.c,v
retrieving revision 1.156
diff -u -p -r1.156 ohci.c
--- ohci.c      11 Mar 2019 17:50:08 -0000      1.156
+++ ohci.c      20 Nov 2019 11:27:14 -0000
@@ -2105,7 +2105,7 @@ ohci_abort_xfer(struct usbd_xfer *xfer, 
        s = splusb();
        sc->sc_softwake = 1;
        usb_schedsoftintr(&sc->sc_bus);
-       tsleep(&sc->sc_softwake, PZERO, "ohciab", 0);
+       tsleep_nsec(&sc->sc_softwake, PZERO, "ohciab", INFSLP);
        splx(s);
 
        /*
Index: uhci.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uhci.c,v
retrieving revision 1.147
diff -u -p -r1.147 uhci.c
--- uhci.c      12 Mar 2019 08:13:50 -0000      1.147
+++ uhci.c      20 Nov 2019 11:27:22 -0000
@@ -1744,7 +1744,7 @@ uhci_abort_xfer(struct usbd_xfer *xfer, 
        sc->sc_softwake = 1;
        usb_schedsoftintr(&sc->sc_bus);
        DPRINTFN(1,("uhci_abort_xfer: tsleep\n"));
-       tsleep(&sc->sc_softwake, PZERO, "uhciab", 0);
+       tsleep_nsec(&sc->sc_softwake, PZERO, "uhciab", INFSLP);
        splx(s);
 
        /*
Index: uhid.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uhid.c,v
retrieving revision 1.71
diff -u -p -r1.71 uhid.c
--- uhid.c      1 May 2018 18:14:46 -0000       1.71
+++ uhid.c      20 Nov 2019 11:27:42 -0000
@@ -260,7 +260,7 @@ uhid_do_read(struct uhid_softc *sc, stru
                }
                sc->sc_state |= UHID_ASLP;
                DPRINTFN(5, ("uhidread: sleep on %p\n", &sc->sc_q));
-               error = tsleep(&sc->sc_q, PZERO | PCATCH, "uhidrea", 0);
+               error = tsleep_nsec(&sc->sc_q, PZERO|PCATCH, "uhidrea", INFSLP);
                DPRINTFN(5, ("uhidread: woke, error=%d\n", error));
                if (usbd_is_dying(sc->sc_hdev.sc_udev))
                        error = EIO;
Index: dwc2/dwc2.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/dwc2/dwc2.c,v
retrieving revision 1.48
diff -u -p -r1.48 dwc2.c
--- dwc2/dwc2.c 14 Mar 2019 04:28:10 -0000      1.48
+++ dwc2/dwc2.c 20 Nov 2019 11:27:53 -0000
@@ -551,7 +551,7 @@ dwc2_abort_xfer(struct usbd_xfer *xfer, 
                xfer->status = status;
                dxfer->flags |= DWC2_XFER_ABORTWAIT;
                while (dxfer->flags & DWC2_XFER_ABORTING)
-                       tsleep(&dxfer->flags, PZERO, "dwc2xfer", 0);
+                       tsleep_nsec(&dxfer->flags, PZERO, "dwc2xfer", INFSLP);
                return;
        }
 

Reply via email to