aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pccbb
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2004-04-06 22:50:50 +0000
committerWarner Losh <imp@FreeBSD.org>2004-04-06 22:50:50 +0000
commit0a6c6a6dd264097f5ec3e82c18f205a2b72cc7f6 (patch)
tree5bc6abb82c5be0a10c36a0dac670a365a286da71 /sys/dev/pccbb
parent70fc36e89c485febee952e33b2eb9d8f5f0f72f2 (diff)
Notes
Diffstat (limited to 'sys/dev/pccbb')
-rw-r--r--sys/dev/pccbb/pccbb.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index 560e2fc3071c..75044ba17595 100644
--- a/sys/dev/pccbb/pccbb.c
+++ b/sys/dev/pccbb/pccbb.c
@@ -1638,14 +1638,13 @@ cbb_cardbus_alloc_resource(device_t brdev, device_t child, int type,
start = cbb_start_mem;
if (end < start)
end = start;
- if (RF_ALIGNMENT(flags) < CBB_MEMALIGN_BITS) {
- if (count < CBB_MEMALIGN)
- align = CBB_MEMALIGN;
- else
- align = count;
- flags = (flags & ~RF_ALIGNMENT_MASK) |
+ if (count < CBB_MEMALIGN)
+ align = CBB_MEMALIGN;
+ else
+ align = count;
+ if (align > (1 << RF_ALIGNMENT(flags)))
+ flags = (flags & ~RF_ALIGNMENT_MASK) |
rman_make_alignment_flags(align);
- }
break;
}