summaryrefslogtreecommitdiffstats
path: root/sys/scsi/scsi_base.c
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/scsi_base.c
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/scsi_base.c')
-rw-r--r--sys/scsi/scsi_base.c14
1 files changed, 7 insertions, 7 deletions
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
}
/*
OpenPOWER on IntegriCloud