summaryrefslogtreecommitdiff
path: root/sys/arch/arc
diff options
context:
space:
mode:
authorPer Fogelstrom <pefo@cvs.openbsd.org>1996-09-20 18:18:47 +0000
committerPer Fogelstrom <pefo@cvs.openbsd.org>1996-09-20 18:18:47 +0000
commitf6614b32e50a09678042ce0e251150b6b854500d (patch)
treea9dd462f61c41dca3bc2c27a627cfac0bc0d19cd /sys/arch/arc
parent9f03c968aa9091f4fa77753284d8327b2e055113 (diff)
temp kludge until generic scsi is fixed
Diffstat (limited to 'sys/arch/arc')
-rw-r--r--sys/arch/arc/dti/btl.c9
-rw-r--r--sys/arch/arc/dti/btlreg.h4
-rw-r--r--sys/arch/arc/include/param.h8
3 files changed, 12 insertions, 9 deletions
diff --git a/sys/arch/arc/dti/btl.c b/sys/arch/arc/dti/btl.c
index 888f8ab1ced..7c5e9480a42 100644
--- a/sys/arch/arc/dti/btl.c
+++ b/sys/arch/arc/dti/btl.c
@@ -129,6 +129,7 @@ struct bt_softc {
TAILQ_HEAD(, bt_ccb) sc_free_ccb, sc_waiting_ccb;
TAILQ_HEAD(, bt_buf) sc_free_buf;
int sc_numccbs, sc_mbofull;
+ int sc_numbufs;
int sc_scsi_dev; /* adapters scsi id */
struct scsi_link sc_link; /* prototype for devs */
};
@@ -415,6 +416,7 @@ btattach(parent, self, aux)
buf = (struct bt_buf *)bouncearea;
bouncearea += sizeof(struct bt_buf);
TAILQ_INSERT_HEAD(&sc->sc_free_buf, buf, chain);
+ sc->sc_numbufs++;
}
/*
* fill in the prototype scsi_link.
@@ -423,7 +425,7 @@ btattach(parent, self, aux)
sc->sc_link.adapter_target = sc->sc_scsi_dev;
sc->sc_link.adapter = &bt_switch;
sc->sc_link.device = &bt_dev;
- sc->sc_link.openings = 4;
+ sc->sc_link.openings = 1;
#ifdef NEWCONFIG
isa_establish(&sc->sc_id, &sc->sc_dev);
@@ -618,6 +620,7 @@ bt_free_buf(sc, buf)
s = splbio();
TAILQ_INSERT_HEAD(&sc->sc_free_buf, buf, chain);
+ sc->sc_numbufs++;
/*
* If there were none, wake anybody waiting for one to come free,
@@ -706,6 +709,7 @@ bt_get_buf(sc, flags)
buf = sc->sc_free_buf.tqh_first;
if (buf) {
TAILQ_REMOVE(&sc->sc_free_buf, buf, chain);
+ sc->sc_numbufs;
break;
}
if ((flags & SCSI_NOSLEEP) != 0)
@@ -1297,7 +1301,8 @@ bt_scsi_cmd(xs)
}
SC_DEBUGN(sc_link, SDEV_DB4, ("\n"));
if (datalen) {
- printf("%s: bt_scsi_cmd, out of bufs\n");
+ printf("%s: bt_scsi_cmd, out of bufs %d of %d left.\n",
+ sc->sc_dev.dv_xname, datalen, xs->datalen);
goto badbuf;
}
ltophys(KVTOPHYS(ccb->scat_gath), ccb->data_addr);
diff --git a/sys/arch/arc/dti/btlreg.h b/sys/arch/arc/dti/btlreg.h
index 2da6676ce9a..2fbaf4d7fbd 100644
--- a/sys/arch/arc/dti/btlreg.h
+++ b/sys/arch/arc/dti/btlreg.h
@@ -99,7 +99,7 @@ struct bt_mbx_in {
#if defined(BIG_DMA)
#define BT_NSEG 2048 /* Number of scatter gather segments - to much vm */
#else
-#define BT_NSEG 32 /* Bounce buffer is limited to 128k. Be modest... */
+#define BT_NSEG (MAXPHYS / NBPG)
#endif /* BIG_DMA */
struct bt_scat_gath {
@@ -150,7 +150,7 @@ struct bt_ccb {
struct bt_buf {
TAILQ_ENTRY(bt_buf) chain;
- char buf[8192 - 2 * sizeof(struct bt_buf *)];
+ char buf[4096 - 2 * sizeof(struct bt_buf *)];
};
/*
diff --git a/sys/arch/arc/include/param.h b/sys/arch/arc/include/param.h
index 1e3dc7102c2..26e074ec129 100644
--- a/sys/arch/arc/include/param.h
+++ b/sys/arch/arc/include/param.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: param.h,v 1.4 1996/08/26 11:12:03 pefo Exp $ */
+/* $OpenBSD: param.h,v 1.5 1996/09/20 18:18:46 pefo Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -70,15 +70,13 @@
#define SEGSHIFT 22 /* LOG2(NBSEG) */
#define KERNBASE 0x80000000 /* start of kernel virtual */
-#if 0
-#define KERNTEXTOFF 0x80080000 /* start of kernel text for kvm_mkdb */
-#endif
#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
#define DEV_BSIZE 512
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
#define BLKDEV_IOSIZE 2048
-#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
+/* XXX Maxphys temporary changed to 32K while SCSI driver is fixed. */
+#define MAXPHYS (32 * 1024) /* max raw I/O transfer size */
#define CLSIZE 1
#define CLSIZELOG2 0