summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Cosgrove <tom@cvs.openbsd.org>2007-05-27 00:57:18 +0000
committerTom Cosgrove <tom@cvs.openbsd.org>2007-05-27 00:57:18 +0000
commit865e82ef84474c6020bb7962f04d7ad749b661a4 (patch)
treefa3fb7dbcce247f806454ee4710c92b279bc8e5b
parent726f77ccc76fd7e439700083cadff66da1879d56 (diff)
When deciding whether to allocate a bounce buffer, we need one if
we are going to read exactly at 1 MB (i.e. fix an off-by-one that is already correct in the amd64 version of this file). ok toby@
-rw-r--r--sys/arch/i386/stand/libsa/biosdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c
index b3dbe74c317..4d6348a8c72 100644
--- a/sys/arch/i386/stand/libsa/biosdev.c
+++ b/sys/arch/i386/stand/libsa/biosdev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: biosdev.c,v 1.71 2007/04/04 14:36:05 jmc Exp $ */
+/* $OpenBSD: biosdev.c,v 1.72 2007/05/27 00:57:17 tom Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
@@ -260,11 +260,11 @@ biosd_io(int rw, bios_diskinfo_t *bd, daddr_t off, int nsect, void *buf)
/*
* Use a bounce buffer to not cross 64k DMA boundary, and to
- * not access above 1 MB.
+ * not access 1 MB or above.
*/
if (((((u_int32_t)buf) & ~0xffff) !=
(((u_int32_t)buf + bbsize) & ~0xffff)) ||
- (((u_int32_t)buf) > 0x100000)) {
+ (((u_int32_t)buf) >= 0x100000)) {
/*
* XXX we believe that all the io is buffered
* by fs routines, so no big reads anyway