diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-06-24 22:00:02 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-06-24 22:00:02 +0000 |
commit | 8fbaa9ccdc93ccb5d210aee64e85f04b44b20d3c (patch) | |
tree | cb465845b919354f41cbb21abdd13137c8d87a9b | |
parent | a947602a8e490b9c56e746231bf6fc1a45b63ab9 (diff) |
Remove an over-optimization from the polling loop of siop_scsicmd(),
i.e. calling siop_print_info() immediately for async devices.
With the change to use xs->sc_link as parameter to siop_print_info()
this immediate call wouldn't work as the sc_link is not initialized
until AFTER the return from processing the INQUIRY command.
So, just use the default negotiation logic which is triggered by the
next command to be handled.
-rw-r--r-- | sys/dev/ic/siop.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c index b46a9a89169..333f0d8f547 100644 --- a/sys/dev/ic/siop.c +++ b/sys/dev/ic/siop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siop.c,v 1.8 2001/06/24 18:28:10 krw Exp $ */ +/* $OpenBSD: siop.c,v 1.9 2001/06/24 22:00:01 krw Exp $ */ /* $NetBSD: siop.c,v 1.39 2001/02/11 18:04:49 bouyer Exp $ */ /* @@ -1368,6 +1368,7 @@ siop_scsicmd(xs) && (xs->sc_link->lun == 0) && (xs->error == XS_NOERROR)) { inqdata = (struct scsi_inquiry_data *)xs->data; + if (inqdata->flags & SID_CmdQue) { sc->targets[target]->flags |= TARF_TAG; xs->sc_link->openings += SIOP_NTAG - SIOP_OPENINGS; @@ -1383,15 +1384,12 @@ siop_scsicmd(xs) && (inqdata->flags2 & (SID_CLOCKING | SID_QAS | SID_IUS))) sc->targets[target]->flags |= TARF_PPR; + sc->targets[target]->status = TARST_ASYNC; + if (sc->targets[target]->flags & (TARF_WIDE | TARF_SYNC | TARF_PPR)) { - sc->targets[target]->status = TARST_ASYNC; siop_add_dev(sc, target, lun); } - else { - sc->targets[target]->status = TARST_OK; - siop_print_info(xs->sc_link); - } } break; } |