diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-01-07 10:12:17 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2020-01-07 10:12:17 +0000 |
commit | 2cd6ed3822e7a806d3fc348a83de3a095b5b3932 (patch) | |
tree | 13454c3cedea3e1ff864d2b78051cfb8d9b7748b | |
parent | fce8e6c905cfa47e7e92712664b65b4e12cf27b1 (diff) |
ZYD_INTR_TIMEOUT is expressed in msecs not in ticks, fixes that by calling
tsleep_nsec(9).
Tested by and ok stsp@
-rw-r--r-- | sys/dev/usb/if_zyd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c index 23ea61f7d3f..61dc357bf69 100644 --- a/sys/dev/usb/if_zyd.c +++ b/sys/dev/usb/if_zyd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_zyd.c,v 1.121 2019/09/12 12:55:07 stsp Exp $ */ +/* $OpenBSD: if_zyd.c,v 1.122 2020/01/07 10:12:16 mpi Exp $ */ /*- * Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr> @@ -785,7 +785,8 @@ zyd_cmd_read(struct zyd_softc *sc, const void *reg, size_t regsize, int olen) if (!sc->odone) { /* wait for ZYD_NOTIF_IORD interrupt */ - if (tsleep(sc, PWAIT, "zydcmd", ZYD_INTR_TIMEOUT) != 0) + if (tsleep_nsec(sc, PWAIT, "zydcmd", + MSEC_TO_NSEC(ZYD_INTR_TIMEOUT)) != 0) printf("%s: read command failed\n", sc->sc_dev.dv_xname); } |