diff options
author | 2005-05-28 00:15:41 +0000 | |
---|---|---|
committer | 2005-05-28 00:15:41 +0000 | |
commit | 3b80142b576fd56f605390f4296af6d16f4112f3 (patch) | |
tree | 6009b0404baa9a523abf8e3c8d80373051f01550 | |
parent | Step 2 in fixing bioctl commands intermixed with regular io. (diff) | |
download | wireguard-openbsd-3b80142b576fd56f605390f4296af6d16f4112f3.tar.xz wireguard-openbsd-3b80142b576fd56f605390f4296af6d16f4112f3.zip |
Step 3 in fixing bioctl commands intermixed with regular io.
Enhance performance by using two sleep channels instead of one. All mickey, but I'll take credit for typing it.
ok mickey@
-rw-r--r-- | sys/dev/ic/ami.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 6c739af4792..d939cb4bedd 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.40 2005/05/28 00:07:03 marco Exp $ */ +/* $OpenBSD: ami.c,v 1.41 2005/05/28 00:15:41 marco Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -1191,7 +1191,7 @@ ami_done(sc, idx) AMI_DPRINTF(AMI_D_CMD, ("scsi_done(%d) ", idx)); scsi_done(xs); if (sc->sc_flags & AMI_CMDWAIT && TAILQ_EMPTY(&sc->sc_ccbq)) - wakeup(&sc->sc_ccbq); + wakeup(&sc->sc_free_ccb); } AMI_UNLOCK_AMI(sc, lock); @@ -1630,7 +1630,7 @@ ami_ioctl(dev, cmd, addr) case BIOCSCSICMD: sc->sc_flags |= AMI_CMDWAIT; while (!TAILQ_EMPTY(&sc->sc_ccbq)) - if (tsleep(&sc->sc_ccbq, PRIBIO, "ami_ioctl", + if (tsleep(&sc->sc_free_ccb, PRIBIO, "ami_ioctl", 100 * 60) == EWOULDBLOCK) return EWOULDBLOCK; } |