From cc44085f89643c3793d324296845e227c6e97365 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 18 Oct 2008 01:15:33 +0000 Subject: [PATCH] Allow an alignment default of 0 to be treated as 1. Obtained-from: FreeBSD --- sys/bus/isa/isa_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/bus/isa/isa_common.c b/sys/bus/isa/isa_common.c index 6ce9e2200f..cc07df872f 100644 --- a/sys/bus/isa/isa_common.c +++ b/sys/bus/isa/isa_common.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/isa/isa_common.c,v 1.16.2.1 2000/09/16 15:49:52 roger Exp $ - * $DragonFly: src/sys/bus/isa/isa_common.c,v 1.13 2006/12/22 23:12:16 swildner Exp $ + * $DragonFly: src/sys/bus/isa/isa_common.c,v 1.14 2008/10/18 01:15:33 dillon Exp $ */ /* * Modifications for Intel architecture by Garrett A. Wollman. @@ -133,7 +133,7 @@ isa_find_memory(device_t child, size = config->ic_mem[i].ir_size, align = config->ic_mem[i].ir_align; start + size - 1 <= end; - start += align) { + start += MAX(align, 1)) { bus_set_resource(child, SYS_RES_MEMORY, i, start, size); res[i] = bus_alloc_resource(child, -- 2.41.0