On Mon, Dec 30, 2019 at 05:06:53PM +0100, Martin Pieuchot wrote:
> Convert the remaining infinite sleeps that my grep-foo found to
> {t,m}sleep_nsec(9), ok?
more in dev spanning multiple lines
diff --git sys/dev/ic/qla.c sys/dev/ic/qla.c
index 9ab8a2f4603..d9e14705c2a 100644
--- sys/dev/ic/qla.c
+++ sys/dev/ic/qla.c
@@ -1148,8 +1148,8 @@ qla_mbox(struct qla_softc *sc, int maskin)
mtx_enter(&sc->sc_mbox_mtx);
sc->sc_mbox_pending = 1;
while (sc->sc_mbox_pending == 1) {
- msleep(sc->sc_mbox, &sc->sc_mbox_mtx, PRIBIO,
- "qlambox", 0);
+ msleep_nsec(sc->sc_mbox, &sc->sc_mbox_mtx, PRIBIO,
+ "qlambox", INFSLP);
}
result = sc->sc_mbox[0];
sc->sc_mbox_pending = 0;
diff --git sys/dev/pci/qle.c sys/dev/pci/qle.c
index fe9475fc334..4570ca5baed 100644
--- sys/dev/pci/qle.c
+++ sys/dev/pci/qle.c
@@ -1496,8 +1496,8 @@ qle_mbox(struct qle_softc *sc, int maskin)
mtx_enter(&sc->sc_mbox_mtx);
sc->sc_mbox_pending = 1;
while (sc->sc_mbox_pending == 1) {
- msleep(sc->sc_mbox, &sc->sc_mbox_mtx, PRIBIO,
- "qlembox", 0);
+ msleep_nsec(sc->sc_mbox, &sc->sc_mbox_mtx, PRIBIO,
+ "qlembox", INFSLP);
}
result = sc->sc_mbox[0];
sc->sc_mbox_pending = 0;
diff --git sys/dev/vscsi.c sys/dev/vscsi.c
index df5ddbe827c..c5794474c29 100644
--- sys/dev/vscsi.c
+++ sys/dev/vscsi.c
@@ -646,8 +646,8 @@ vscsiclose(dev_t dev, int flags, int mode, struct proc *p)
mtx_enter(&sc->sc_state_mtx);
while (sc->sc_ref_count > 0) {
- msleep(&sc->sc_ref_count, &sc->sc_state_mtx,
- PRIBIO, "vscsiref", 0);
+ msleep_nsec(&sc->sc_ref_count, &sc->sc_state_mtx,
+ PRIBIO, "vscsiref", INFSLP);
}
mtx_leave(&sc->sc_state_mtx);