diff options
author | imp <imp@FreeBSD.org> | 2005-01-23 03:03:58 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-01-23 03:03:58 +0000 |
commit | 5779c8e6f2381426979505dec7ab5fecf85a2691 (patch) | |
tree | c736b28b1598a36caa3beb7913355300fb1a0f40 /sys/isa | |
parent | 3d727e0e249f6ec8e0a3698825566c766416a245 (diff) | |
download | FreeBSD-src-5779c8e6f2381426979505dec7ab5fecf85a2691.zip FreeBSD-src-5779c8e6f2381426979505dec7ab5fecf85a2691.tar.gz |
Protect against wrapping. This appaers to fix some hangs that people
have seen in the isa pnp case where a resource buts up against
0xffffffff. This would only impact when the board was booted without
ACPI.
Submitted by: Ed Maste (freebsd-stable <20050103145720.GA90754@sandvine.com>)
MFC After: 5 days
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/isa_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c index 2ff3a6a..9948955 100644 --- a/sys/isa/isa_common.c +++ b/sys/isa/isa_common.c @@ -147,7 +147,7 @@ isa_find_memory(device_t child, struct isa_config *config, for (start = config->ic_mem[i].ir_start, end = config->ic_mem[i].ir_end, align = config->ic_mem[i].ir_align; - start + size - 1 <= end; + start + size - 1 <= end && start + size > start; start += align) { bus_set_resource(child, SYS_RES_MEMORY, i, start, size); |