diff options
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/if_athn_usb.c | 11 | ||||
-rw-r--r-- | sys/dev/usb/if_otus.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/if_uath.c | 7 | ||||
-rw-r--r-- | sys/dev/usb/if_wi_usb.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/ucom.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/utrh.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/uvscom.c | 4 |
7 files changed, 21 insertions, 17 deletions
diff --git a/sys/dev/usb/if_athn_usb.c b/sys/dev/usb/if_athn_usb.c index 83f39f3a748..0c0d06b6d86 100644 --- a/sys/dev/usb/if_athn_usb.c +++ b/sys/dev/usb/if_athn_usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_athn_usb.c,v 1.53 2019/09/12 12:55:07 stsp Exp $ */ +/* $OpenBSD: if_athn_usb.c,v 1.54 2019/11/12 07:47:30 mpi Exp $ */ /*- * Copyright (c) 2011 Damien Bergamini <damien.bergamini@free.fr> @@ -694,7 +694,8 @@ athn_usb_load_firmware(struct athn_usb_softc *usc) error = usbd_do_request(usc->sc_udev, &req, NULL); /* Wait at most 1 second for firmware to boot. */ if (error == 0 && usc->wait_msg_id != 0) - error = tsleep(&usc->wait_msg_id, 0, "athnfw", hz); + error = tsleep_nsec(&usc->wait_msg_id, 0, "athnfw", + SEC_TO_NSEC(1)); usc->wait_msg_id = 0; splx(s); return (error); @@ -779,7 +780,8 @@ athn_usb_htc_setup(struct athn_usb_softc *usc) usc->wait_msg_id = AR_HTC_MSG_CONF_PIPE_RSP; error = athn_usb_htc_msg(usc, AR_HTC_MSG_CONF_PIPE, &cfg, sizeof(cfg)); if (error == 0 && usc->wait_msg_id != 0) - error = tsleep(&usc->wait_msg_id, 0, "athnhtc", hz); + error = tsleep_nsec(&usc->wait_msg_id, 0, "athnhtc", + SEC_TO_NSEC(1)); usc->wait_msg_id = 0; splx(s); if (error != 0) { @@ -815,7 +817,8 @@ athn_usb_htc_connect_svc(struct athn_usb_softc *usc, uint16_t svc_id, error = athn_usb_htc_msg(usc, AR_HTC_MSG_CONN_SVC, &msg, sizeof(msg)); /* Wait at most 1 second for response. */ if (error == 0 && usc->wait_msg_id != 0) - error = tsleep(&usc->wait_msg_id, 0, "athnhtc", hz); + error = tsleep_nsec(&usc->wait_msg_id, 0, "athnhtc", + SEC_TO_NSEC(1)); usc->wait_msg_id = 0; splx(s); if (error != 0) { diff --git a/sys/dev/usb/if_otus.c b/sys/dev/usb/if_otus.c index 86fec55e3ec..644e88fca28 100644 --- a/sys/dev/usb/if_otus.c +++ b/sys/dev/usb/if_otus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_otus.c,v 1.64 2019/09/12 12:55:07 stsp Exp $ */ +/* $OpenBSD: if_otus.c,v 1.65 2019/11/12 07:47:30 mpi Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -849,7 +849,7 @@ otus_cmd(struct otus_softc *sc, uint8_t code, const void *idata, int ilen, return EIO; } if (!cmd->done) - error = tsleep(cmd, PCATCH, "otuscmd", hz); + error = tsleep_nsec(cmd, PCATCH, "otuscmd", SEC_TO_NSEC(1)); cmd->odata = NULL; /* In case answer is received too late. */ splx(s); if (error != 0) { diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c index 30aa31b56bf..d597487ded5 100644 --- a/sys/dev/usb/if_uath.c +++ b/sys/dev/usb/if_uath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_uath.c,v 1.83 2019/04/25 01:52:14 kevlo Exp $ */ +/* $OpenBSD: if_uath.c,v 1.84 2019/11/12 07:47:30 mpi Exp $ */ /*- * Copyright (c) 2006 @@ -981,7 +981,7 @@ uath_cmd(struct uath_softc *sc, uint32_t code, const void *idata, int ilen, return 0; /* write: don't wait for reply */ /* wait at most two seconds for command reply */ - error = tsleep(cmd, PCATCH, "uathcmd", 2 * hz); + error = tsleep_nsec(cmd, PCATCH, "uathcmd", SEC_TO_NSEC(2)); cmd->odata = NULL; /* in case answer is received too late */ splx(s); if (error != 0) { @@ -1609,7 +1609,8 @@ uath_reset(struct uath_softc *sc) UATH_CMD_FLAG_ASYNC); /* ..and wait until firmware notifies us that it is ready */ if (error == 0) - error = tsleep(UATH_COND_INIT(sc), PCATCH, "uathinit", 5 * hz); + error = tsleep_nsec(UATH_COND_INIT(sc), PCATCH, "uathinit", + SEC_TO_NSEC(5)); splx(s); if (error != 0) return error; diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c index 16f4f7cb587..5c2294cf090 100644 --- a/sys/dev/usb/if_wi_usb.c +++ b/sys/dev/usb/if_wi_usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_usb.c,v 1.69 2018/11/10 15:28:05 mpi Exp $ */ +/* $OpenBSD: if_wi_usb.c,v 1.70 2019/11/12 07:47:30 mpi Exp $ */ /* * Copyright (c) 2003 Dale Rahn. All rights reserved. @@ -1032,7 +1032,7 @@ wi_usb_do_transmit_sync(struct wi_usb_softc *sc, struct wi_usb_chain *c, err = EIO; goto done; } - err = tsleep(ident, PRIBIO, "wiTXsync", hz*1); + err = tsleep_nsec(ident, PRIBIO, "wiTXsync", SEC_TO_NSEC(1)); if (err) { DPRINTFN(1,("%s: %s: err %x\n", sc->wi_usb_dev.dv_xname, __func__, err)); diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index f3120e3d0d9..99fe6e36e89 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ucom.c,v 1.68 2019/07/19 00:17:15 cheloha Exp $ */ +/* $OpenBSD: ucom.c,v 1.69 2019/11/12 07:47:30 mpi Exp $ */ /* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */ /* @@ -291,7 +291,7 @@ ucom_shutdown(struct ucom_softc *sc) */ if (ISSET(tp->t_cflag, HUPCL)) { ucom_dtr(sc, 0); - (void)tsleep(sc, TTIPRI, ttclos, hz); + tsleep_nsec(sc, TTIPRI, ttclos, SEC_TO_NSEC(1)); } } diff --git a/sys/dev/usb/utrh.c b/sys/dev/usb/utrh.c index a7a3d5e8d93..719b27249f0 100644 --- a/sys/dev/usb/utrh.c +++ b/sys/dev/usb/utrh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: utrh.c,v 1.21 2017/04/08 02:57:25 deraadt Exp $ */ +/* $OpenBSD: utrh.c,v 1.22 2019/11/12 07:47:30 mpi Exp $ */ /* * Copyright (c) 2009 Yojiro UO <yuo@nui.org> @@ -221,7 +221,7 @@ utrh_refresh(void *arg) return; /* wait till sensor data are updated, 1s will be enough */ - tsleep(&sc->sc_sensortask, 0, "utrh", (1*hz)); + tsleep_nsec(&sc->sc_sensortask, 0, "utrh", SEC_TO_NSEC(1)); /* turn off LED 1 */ ledbuf[1] = 0x0; diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c index a32343fbcf6..0ab634b2584 100644 --- a/sys/dev/usb/uvscom.c +++ b/sys/dev/usb/uvscom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvscom.c,v 1.37 2018/04/27 08:08:06 guenther Exp $ */ +/* $OpenBSD: uvscom.c,v 1.38 2019/11/12 07:47:30 mpi Exp $ */ /* $NetBSD: uvscom.c,v 1.9 2003/02/12 15:36:20 ichiro Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. @@ -706,7 +706,7 @@ uvscom_open(void *addr, int portno) /* unit is not ready */ for (i = UVSCOM_UNIT_WAIT; i > 0; --i) { - tsleep(&err, TTIPRI, "uvsop", hz); /* XXX */ + tsleep_nsec(&err, TTIPRI, "uvsop", SEC_TO_NSEC(1)); if (ISSET(sc->sc_usr, UVSCOM_USTAT_MASK)) break; } |