summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2001-07-09 15:20:29 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2001-07-09 15:20:29 +0000
commit4a862059f1fc650d6e7d608c4684f64856290b9c (patch)
treecb744c5151b1a1f104a88f188ffe10c7a76bfe90 /sys
parentb48d7a1ae4e4496dfba1b8bff80121ef670a3c7f (diff)
Fix incorrect logic 'optimization' so that sync is negotiated even if
wide is not. Now my CD drives on the narrow channel of the INI-9100UW negotiate to the same configuration they do on other cards.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/iha.c6
-rw-r--r--sys/dev/ic/iha.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c
index a75e967d451..a3a29e93c20 100644
--- a/sys/dev/ic/iha.c
+++ b/sys/dev/ic/iha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.c,v 1.3 2001/02/20 00:47:33 krw Exp $ */
+/* $OpenBSD: iha.c,v 1.4 2001/07/09 15:20:28 krw Exp $ */
/*
* Initio INI-9xxxU/UW SCSI Device Driver
*
@@ -1054,7 +1054,9 @@ tul_scsi(sc, iot, ioh)
if ((pScb->SCB_Flags & SCSI_RESET) == 0) {
bus_space_write_1(iot, ioh, TUL_SYNCM, pTcs->TCS_JS_Period);
- if ((pTcs->TCS_Flags & FLAG_NO_NEGOTIATE) == 0)
+ if (((pTcs->TCS_Flags & FLAG_NO_NEG_WIDE) == 0)
+ ||
+ ((pTcs->TCS_Flags & FLAG_NO_NEG_SYNC) == 0))
tul_select(sc, iot, ioh, pScb, SELATNSTOP);
else if (pScb->SCB_TagMsg != 0)
diff --git a/sys/dev/ic/iha.h b/sys/dev/ic/iha.h
index 27f8e8e02fd..41c391d99f6 100644
--- a/sys/dev/ic/iha.h
+++ b/sys/dev/ic/iha.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.h,v 1.2 2001/02/08 17:35:05 krw Exp $ */
+/* $OpenBSD: iha.h,v 1.3 2001/07/09 15:20:27 krw Exp $ */
/*
* Initio INI-9xxxU/UW SCSI Device Driver
*
@@ -135,7 +135,6 @@ struct tcs {
#define FLAG_SYNC_DONE 0x0200 /* SDTR msg has been sent */
#define FLAG_NO_NEG_SYNC (FLAG_NO_SYNC | FLAG_SYNC_DONE)
#define FLAG_NO_NEG_WIDE (FLAG_NO_WIDE | FLAG_WIDE_DONE)
-#define FLAG_NO_NEGOTIATE (FLAG_NO_NEG_SYNC | FLAG_NO_NEG_WIDE)
u_int8_t TCS_JS_Period;
#define PERIOD_WIDE_SCSI 0x80 /* Enable Wide SCSI */
#define PERIOD_SYXPD 0x70 /* Synch. SCSI Xfer rate */