summaryrefslogtreecommitdiff
path: root/sys/arch/arc/dti
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/dti
parent9f03c968aa9091f4fa77753284d8327b2e055113 (diff)
temp kludge until generic scsi is fixed
Diffstat (limited to 'sys/arch/arc/dti')
-rw-r--r--sys/arch/arc/dti/btl.c9
-rw-r--r--sys/arch/arc/dti/btlreg.h4
2 files changed, 9 insertions, 4 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 *)];
};
/*