summaryrefslogtreecommitdiffstats
path: root/sys/scsi
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-08-31 06:17:49 +0000
committerdg <dg@FreeBSD.org>1994-08-31 06:17:49 +0000
commita9a9ceeae2109e65721d0b5ed662e324502ceb15 (patch)
tree7ff25817640db4f5e71d9a492c482795929bb37f /sys/scsi
parente149c004635e54083175fac38276b9c5d5f138e4 (diff)
downloadFreeBSD-src-a9a9ceeae2109e65721d0b5ed662e324502ceb15.zip
FreeBSD-src-a9a9ceeae2109e65721d0b5ed662e324502ceb15.tar.gz
Rather than exclude bounce buffers support with NOBOUNCE, include it
with BOUNCE_BUFFERS. This is more intuitive, and is better for future multiplatform support. Added BOUNCE_BUFFERS option to the GENERIC and LINT kernel config files.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/cd.c4
-rw-r--r--sys/scsi/scsi_base.c14
-rw-r--r--sys/scsi/sd.c6
-rw-r--r--sys/scsi/st.c4
4 files changed, 13 insertions, 15 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 9317450..dc03c6b 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992
*
- * $Id: cd.c,v 1.20 1994/08/27 16:14:31 davidg Exp $
+ * $Id: cd.c,v 1.21 1994/08/29 21:25:11 ache Exp $
*/
#define SPLCD splbio
@@ -424,7 +424,7 @@ cdstrategy(bp)
/*
* Use a bounce buffer if necessary
*/
-#ifndef NOBOUNCE
+#ifdef BOUNCE_BUFFERS
if (cd->sc_link->flags & SDEV_BOUNCE)
vm_bounce_alloc(bp);
#endif
diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c
index 8cf9584..e254cd9 100644
--- a/sys/scsi/scsi_base.c
+++ b/sys/scsi/scsi_base.c
@@ -8,7 +8,7 @@
* file.
*
* Written by Julian Elischer (julian@dialix.oz.au)
- * $Id: scsi_base.c,v 1.10 1994/08/20 03:48:58 davidg Exp $
+ * $Id: scsi_base.c,v 1.11 1994/08/27 16:14:33 davidg Exp $
*/
#define SPLSD splbio
@@ -440,10 +440,10 @@ scsi_scsi_cmd(sc_link, scsi_cmd, cmdlen, data_addr, datalen,
retval = EFAULT;
goto bad;
}
-#ifdef NOBOUNCE
- xs->data = malloc(datalen, M_TEMP, M_WAITOK);
-#else
+#ifdef BOUNCE_BUFFERS
xs->data = (caddr_t) vm_bounce_kva_alloc( (datalen + PAGE_SIZE - 1)/PAGE_SIZE);
+#else
+ xs->data = malloc(datalen, M_TEMP, M_WAITOK);
#endif
/* I think waiting is ok *//*XXX */
switch ((int)(flags & (SCSI_DATA_IN | SCSI_DATA_OUT))) {
@@ -527,10 +527,10 @@ retry:
bcopy(xs->data, data_addr, datalen);
break;
}
-#ifdef NOBOUNCE
- free(xs->data, M_TEMP);
-#else
+#ifdef BOUNCE_BUFFERS
vm_bounce_kva_alloc_free(xs->data, (datalen + PAGE_SIZE - 1)/PAGE_SIZE, 0);
+#else
+ free(xs->data, M_TEMP);
#endif
}
/*
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 39bfcb5..cd4a958 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -14,7 +14,7 @@
*
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
*
- * $Id: sd.c,v 1.27 1994/08/30 00:12:11 jkh Exp $
+ * $Id: sd.c,v 1.28 1994/08/30 14:31:38 ache Exp $
*/
#define SPLSD splbio
@@ -419,12 +419,10 @@ sdstrategy(bp)
/*
* Use a bounce buffer if necessary
*/
-/*
-#ifndef NOBOUNCE
+#ifdef BOUNCE_BUFFERS
if (sd->sc_link->flags & SDEV_BOUNCE)
vm_bounce_alloc(bp);
#endif
-*/
/*
* Place it in the queue of disk activities for this disk
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 65a3109..4ecbe23 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances.
*
- * $Id$
+ * $Id: st.c,v 1.17 1994/08/02 07:52:34 davidg Exp $
*/
/*
@@ -904,7 +904,7 @@ ststrategy(bp)
/*
* Use a bounce buffer if necessary
*/
-#ifndef NOBOUNCE
+#ifdef BOUNCE_BUFFERS
if (st->sc_link->flags & SDEV_BOUNCE)
vm_bounce_alloc(bp);
#endif
OpenPOWER on IntegriCloud