summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-12-04 10:22:06 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-12-04 10:22:06 +0000
commit6848daddaf9f55d9ca8eb0aec0360a5351c2b7c2 (patch)
tree0e4564f26cfb685e0b0ea973a6f4fae3f468baa4 /sys/scsi
parentc42e2ddc5f86ed98cb3db51afbdb8e65a14954cb (diff)
Convert infinite sleeps to {m,t}sleep_nsec(9).
ok krw@, jca@
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/scsi_base.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 40e2d14c855..0cc7df792eb 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_base.c,v 1.254 2019/12/03 15:58:28 krw Exp $ */
+/* $OpenBSD: scsi_base.c,v 1.255 2019/12/04 10:22:05 mpi Exp $ */
/* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */
/*
@@ -432,7 +432,7 @@ scsi_move(struct scsi_io_mover *m)
{
mtx_enter(&m->mtx);
while (!m->done)
- msleep(m, &m->mtx, PRIBIO, "scsiiomv", 0);
+ msleep_nsec(m, &m->mtx, PRIBIO, "scsiiomv", INFSLP);
mtx_leave(&m->mtx);
}
@@ -706,7 +706,8 @@ scsi_link_shutdown(struct scsi_link *link)
}
while (link->pending > 0)
- msleep(&link->pending, &iopl->mtx, PRIBIO, "pendxs", 0);
+ msleep_nsec(&link->pending, &iopl->mtx, PRIBIO, "pendxs",
+ INFSLP);
mtx_leave(&iopl->mtx);
while ((ioh = TAILQ_FIRST(&sleepers)) != NULL) {
@@ -1482,7 +1483,7 @@ scsi_xs_sync(struct scsi_xfer *xs)
mtx_enter(&cookie);
while (xs->cookie != NULL)
- msleep(xs, &cookie, PRIBIO, "syncxs", 0);
+ msleep_nsec(xs, &cookie, PRIBIO, "syncxs", INFSLP);
mtx_leave(&cookie);
error = scsi_xs_error(xs);
@@ -1572,7 +1573,7 @@ scsi_delay(struct scsi_xfer *xs, int seconds)
}
while (seconds-- > 0) {
- if (tsleep(&lbolt, PRIBIO|PCATCH, "scbusy", 0)) {
+ if (tsleep_nsec(&lbolt, PRIBIO|PCATCH, "scbusy", INFSLP)) {
/* Signal == abort xs. */
return (EIO);
}