diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-11-05 00:21:37 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-11-05 00:21:37 +0000 |
commit | 21812af4b3496b6b0be4dce431f68366f37efffd (patch) | |
tree | 7a0428600ca8ba89d83136158b2de43880e47d55 /sys/dev/ic | |
parent | 807508d2835434424b1a9b4ff449247de67abb5e (diff) |
Take a bit more care to ensure that SCSI_POLL commands always return
COMPLETE and never SUCCESSFULLY_QUEUED.
Diffstat (limited to 'sys/dev/ic')
-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 |