pgt(4): tsleep(9) -> tsleep_nsec(9)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

pgt(4): tsleep(9) -> tsleep_nsec(9)

Scott Cheloha
1/10 seconds, so, 100 milliseconds.

ok?

Index: ic/pgt.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/pgt.c,v
retrieving revision 1.97
diff -u -p -r1.97 pgt.c
--- ic/pgt.c 9 Jan 2020 14:35:19 -0000 1.97
+++ ic/pgt.c 20 Feb 2020 01:29:49 -0000
@@ -1648,7 +1648,7 @@ pgt_mgmt_request(struct pgt_softc *sc, s
 {
  struct pgt_desc *pd;
  struct pgt_mgmt_frame *pmf;
- int error, i;
+ int error, i, ret;
 
  if (sc->sc_flags & (SC_DYING | SC_NEEDS_RESET))
  return (EIO);
@@ -1695,7 +1695,8 @@ pgt_mgmt_request(struct pgt_softc *sc, s
  */
  i = 0;
  do {
- if (tsleep(pmd, 0, "pgtmgm", hz / 10) != EWOULDBLOCK)
+ ret = tsleep_nsec(pmd, 0, "pgtmgm", MSEC_TO_NSEC(100));
+ if (ret != EWOULDBLOCK)
  break;
  if (pmd->pmd_error != EINPROGRESS)
  break;