summaryrefslogtreecommitdiff
path: root/sys/arch/amiga/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-11-28 19:36:20 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-11-28 19:36:20 +0000
commite566f88d923ebad2a2c1a680f198c67980486f5d (patch)
tree4bf2ee4dda94f17330139228badd8726910937b7 /sys/arch/amiga/dev
parent54f407f25c3a6d6649d968d11456183645a9898a (diff)
let loadbsd define sync scsi operation
Diffstat (limited to 'sys/arch/amiga/dev')
-rw-r--r--sys/arch/amiga/dev/sbic.c25
-rw-r--r--sys/arch/amiga/dev/sbicvar.h4
-rw-r--r--sys/arch/amiga/dev/sfas.c11
-rw-r--r--sys/arch/amiga/dev/siop.c20
4 files changed, 54 insertions, 6 deletions
diff --git a/sys/arch/amiga/dev/sbic.c b/sys/arch/amiga/dev/sbic.c
index 149a484caea..ff84f213d92 100644
--- a/sys/arch/amiga/dev/sbic.c
+++ b/sys/arch/amiga/dev/sbic.c
@@ -1,4 +1,4 @@
-/* $NetBSD: sbic.c,v 1.19 1995/10/05 12:36:07 chopps Exp $ */
+/* $NetBSD: sbic.c,v 1.19.2.1 1995/11/24 07:51:17 chopps Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -125,7 +125,7 @@ int sbic_init_wait = SBIC_INIT_WAIT;
* was broken before.. now if you want this you get it for all drives
* on sbic controllers.
*/
-int sbic_inhibit_sync = 0;
+u_char sbic_inhibit_sync[8];
int sbic_enable_reselect = 1;
int sbic_clock_override = 0;
int sbic_no_dma = 0;
@@ -836,6 +836,10 @@ sbicinit(dev)
u_int my_id, i, s;
u_char csr;
struct sbic_acb *acb;
+ u_int inhibit_sync;
+
+ extern u_long scsi_nosync;
+ extern int shift_nosync;
regs = dev->sc_sbicp;
@@ -862,6 +866,20 @@ sbicinit(dev)
dev->sc_flags |= SBICF_ALIVE;
dev->sc_flags &= ~SBICF_SELECTED;
+ /* initialize inhibit array */
+ if (scsi_nosync) {
+ inhibit_sync = (scsi_nosync >> shift_nosync) & 0xff;
+ shift_nosync += 8;
+#ifdef DEBUG
+ if (inhibit_sync)
+ printf("%s: Inhibiting synchronous transfer %02x\n",
+ dev->sc_dev.dv_xname, inhibit_sync);
+#endif
+ for (i = 0; i < 8; ++i)
+ if (inhibit_sync & (1 << i))
+ sbic_inhibit_sync[i] = 1;
+ }
+
sbicreset(dev);
}
@@ -1093,7 +1111,8 @@ sbicselectbus(dev, regs, target, lun, our_addr)
* handle drives that don't want to be asked
* whether to go sync at all.
*/
- if (sbic_inhibit_sync && dev->sc_sync[id].state == SYNC_START) {
+ if (sbic_inhibit_sync[id]
+ && dev->sc_sync[id].state == SYNC_START) {
#ifdef DEBUG
if (sync_debug)
printf("Forcing target %d asynchronous.\n", id);
diff --git a/sys/arch/amiga/dev/sbicvar.h b/sys/arch/amiga/dev/sbicvar.h
index b8e4b213389..dc29ff114f8 100644
--- a/sys/arch/amiga/dev/sbicvar.h
+++ b/sys/arch/amiga/dev/sbicvar.h
@@ -1,4 +1,4 @@
-/* $NetBSD: sbicvar.h,v 1.9 1995/09/04 13:04:48 chopps Exp $ */
+/* $NetBSD: sbicvar.h,v 1.9.2.1 1995/11/24 07:51:20 chopps Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -162,7 +162,7 @@ struct sbic_softc {
#define DDB_FOLLOW 0x04
#define DDB_IO 0x08
#endif
-extern int sbic_inhibit_sync;
+extern u_char sbic_inhibit_sync[8];
extern int sbic_no_dma;
extern int sbic_clock_override;
diff --git a/sys/arch/amiga/dev/sfas.c b/sys/arch/amiga/dev/sfas.c
index 62101bfb473..2c89c1ea828 100644
--- a/sys/arch/amiga/dev/sfas.c
+++ b/sys/arch/amiga/dev/sfas.c
@@ -128,6 +128,9 @@ sfasinitialize(dev)
sfas_regmap_p rp;
u_int *pte, page;
int i;
+ u_int inhibit_sync;
+ extern u_long scsi_nosync;
+ extern int shift_nosync;
dev->sc_led_status = 0;
@@ -175,6 +178,14 @@ sfasinitialize(dev)
dev->sc_flags = 0;
+ if (scsi_nosync) {
+ inhibit_sync = (scsi_nosync >> shift_nosync) & 0xff;
+ shift_nosync += 8;
+ for (i = 0; i < 8; ++i)
+ if (inhibit_sync & (1 << i))
+ sfas_inhibit_sync[i] = 1;
+ }
+
for(i=0; i<8; i++)
sfas_init_nexus(dev, &dev->sc_nexus[i]);
diff --git a/sys/arch/amiga/dev/siop.c b/sys/arch/amiga/dev/siop.c
index 760a5d073e6..c30b9cfb1ec 100644
--- a/sys/arch/amiga/dev/siop.c
+++ b/sys/arch/amiga/dev/siop.c
@@ -1,4 +1,4 @@
-/* $NetBSD: siop.c,v 1.25 1995/09/29 13:52:04 chopps Exp $ */
+/* $NetBSD: siop.c,v 1.25.2.1 1995/11/24 07:51:23 chopps Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@@ -520,6 +520,11 @@ void
siopinitialize(sc)
struct siop_softc *sc;
{
+ int i;
+ u_int inhibit_sync;
+ extern u_long scsi_nosync;
+ extern int shift_nosync;
+
/*
* Need to check that scripts is on a long word boundary
* and that DS is on a long word boundary.
@@ -547,6 +552,19 @@ siopinitialize(sc)
sc->sc_tcp[0] = 3000 / sc->sc_clock_freq;
}
+ if (scsi_nosync) {
+ inhibit_sync = (scsi_nosync >> shift_nosync) & 0xff;
+ shift_nosync += 8;
+#ifdef DEBUG
+ if (inhibit_sync)
+ printf("%s: Inhibiting synchronous transfer %02x\n",
+ sc->sc_dev.dv_xname, inhibit_sync);
+#endif
+ for (i = 0; i < 8; ++i)
+ if (inhibit_sync & (1 << i))
+ siop_inhibit_sync[i] = 1;
+ }
+
siopreset (sc);
}