summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2004-07-30 00:24:33 +0000
committerkrw <krw@openbsd.org>2004-07-30 00:24:33 +0000
commit74b27737b9dc29dc846aa53c7ddb811400fcae14 (patch)
treed54f22013af68b7a3262822686421bdda6e0fd81
parentUse '#!/bin/ksh' for install scripts, as we use so many ksh'isms. Some of (diff)
downloadwireguard-openbsd-74b27737b9dc29dc846aa53c7ddb811400fcae14.tar.xz
wireguard-openbsd-74b27737b9dc29dc846aa53c7ddb811400fcae14.zip
Do not negotiate or use non-async transfer rates until probing (i.e.
SCSI_POLL'ing) is complete. Similar to what is done on mpt, ahc, ahd, etc. This fixes problems during probe on hppa. Problems found & ok mickey@.
-rw-r--r--sys/dev/ic/siop.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c
index 5dbfcc6976c..6144e138ab1 100644
--- a/sys/dev/ic/siop.c
+++ b/sys/dev/ic/siop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop.c,v 1.34 2004/04/25 01:49:12 krw Exp $ */
+/* $OpenBSD: siop.c,v 1.35 2004/07/30 00:24:33 krw Exp $ */
/* $NetBSD: siop.c,v 1.65 2002/11/08 22:04:41 bouyer Exp $ */
/*
@@ -1402,6 +1402,11 @@ siop_scsicmd(xs)
TAILQ_INSERT_TAIL(&sc->ready_list, siop_cmd, next);
+ /* Negotiate transfer parameters on first non-polling command. */
+ if (((xs->flags & SCSI_POLL) == 0) &&
+ siop_target->target_c.status == TARST_PROBING)
+ siop_target->target_c.status = TARST_ASYNC;
+
siop_start(sc);
if ((xs->flags & SCSI_POLL) == 0) {
splx(s);
@@ -1428,8 +1433,6 @@ siop_scsicmd(xs)
*/
for (j = 0; j < SIOP_NTAG; j += SIOP_NCMDPB)
siop_morecbd(sc);
- if (sc->sc_c.targets[target]->status == TARST_PROBING)
- sc->sc_c.targets[target]->status = TARST_ASYNC;
/*
* Set TARF_DT here because if it is turned off during