diff options
author | 2007-11-05 00:21:36 +0000 | |
---|---|---|
committer | 2007-11-05 00:21:36 +0000 | |
commit | d091b2795a5cb6b39ad8c7b34a4672bfe6cd45dd (patch) | |
tree | c14d5bdee1c50becc8316021f2d8e0f25b98821d | |
parent | audio encoding conversion cleanup (diff) | |
download | wireguard-openbsd-d091b2795a5cb6b39ad8c7b34a4672bfe6cd45dd.tar.xz wireguard-openbsd-d091b2795a5cb6b39ad8c7b34a4672bfe6cd45dd.zip |
Take a bit more care to ensure that SCSI_POLL commands always return
COMPLETE and never SUCCESSFULLY_QUEUED.
-rw-r--r-- | sys/dev/ic/iha.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/oosiop.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/osiop.c | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c index fb04412ab47..e5f047686ff 100644 --- a/sys/dev/ic/iha.c +++ b/sys/dev/ic/iha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iha.c,v 1.27 2007/10/18 20:28:26 otto Exp $ */ +/* $OpenBSD: iha.c,v 1.28 2007/11/05 00:21:36 krw Exp $ */ /*------------------------------------------------------------------------- * * Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller. @@ -350,10 +350,10 @@ iha_scsi_cmd(xs) iha_exec_scb(sc, pScb); - if ((xs->flags & ITSDONE) == 0) - return (SUCCESSFULLY_QUEUED); - else + if (xs->flags & (SCSI_POLL | ITSDONE)) return (COMPLETE); + else + return (SUCCESSFULLY_QUEUED); } /* diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c index 9b400aa49c3..c66ef7f0f39 100644 --- a/sys/dev/ic/oosiop.c +++ b/sys/dev/ic/oosiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: oosiop.c,v 1.6 2007/10/01 04:03:51 krw Exp $ */ +/* $OpenBSD: oosiop.c,v 1.7 2007/11/05 00:21:36 krw Exp $ */ /* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */ /* @@ -803,10 +803,10 @@ oosiop_scsicmd(struct scsi_xfer *xs) splx(s); - if ((xs->flags & ITSDONE) == 0) - return (SUCCESSFULLY_QUEUED); - else + if (xs->flags & (SCSI_POLL | ITSDONE)) return (COMPLETE); + else + return (SUCCESSFULLY_QUEUED); } void diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c index a32e69479c1..9bc8c2a259f 100644 --- a/sys/dev/ic/osiop.c +++ b/sys/dev/ic/osiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: osiop.c,v 1.30 2007/10/01 04:03:51 krw Exp $ */ +/* $OpenBSD: osiop.c,v 1.31 2007/11/05 00:21:36 krw Exp $ */ /* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */ /* @@ -458,10 +458,10 @@ osiop_scsicmd(xs) /* start expire timer */ timeout_add(&xs->stimeout, (xs->timeout/1000) * hz); - if ((xs->flags & ITSDONE) == 0) - return (SUCCESSFULLY_QUEUED); - else + if (xs->flags & (SCSI_POLL | ITSDONE)) return (COMPLETE); + else + return (SUCCESSFULLY_QUEUED); } void |