summaryrefslogtreecommitdiff
path: root/sys/dev/ic/ami.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2019-12-31 10:05:34 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2019-12-31 10:05:34 +0000
commit9342e91df4a806cfd8bdf1bdabd73eab5c7a56db (patch)
tree5e831ba5086ad8aadd757e8497ff9fd18e72b601 /sys/dev/ic/ami.c
parent6716328d3f8e7e5092b5ad41628a56775d32e1be (diff)
Convert infinite sleeps to {m,t}sleep_nsec(9).
ok kn@
Diffstat (limited to 'sys/dev/ic/ami.c')
-rw-r--r--sys/dev/ic/ami.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index 82ad8484ad9..65bfeed5081 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.235 2019/12/31 01:26:56 jsg Exp $ */
+/* $OpenBSD: ami.c,v 1.236 2019/12/31 10:05:32 mpi Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -1653,7 +1653,7 @@ ami_drv_pt(struct ami_softc *sc, u_int8_t ch, u_int8_t tg, u_int8_t *cmd,
ami_start(sc, ccb);
while (ccb->ccb_state != AMI_CCB_READY)
- tsleep(ccb, PRIBIO, "ami_drv_pt", 0);
+ tsleep_nsec(ccb, PRIBIO, "ami_drv_pt", INFSLP);
bus_dmamap_sync(sc->sc_dmat, ccb->ccb_dmamap, 0,
ccb->ccb_dmamap->dm_mapsize, BUS_DMASYNC_POSTREAD);
@@ -1805,7 +1805,8 @@ ami_mgmt(struct ami_softc *sc, u_int8_t opcode, u_int8_t par1, u_int8_t par2,
ami_start(sc, ccb);
mtx_enter(&sc->sc_cmd_mtx);
while (ccb->ccb_state != AMI_CCB_READY)
- msleep(ccb, &sc->sc_cmd_mtx, PRIBIO,"ami_mgmt", 0);
+ msleep_nsec(ccb, &sc->sc_cmd_mtx, PRIBIO, "ami_mgmt",
+ INFSLP);
mtx_leave(&sc->sc_cmd_mtx);
} else {
/* change state must be run with id 0xfe and MUST be polled */