Better checks to make sure that we get good alignment. This code is a
bit of a bandaide until I get better pci bus code committed to head from my p4 tree.
This commit is contained in:
parent
70fc36e89c
commit
0a6c6a6dd2
@ -1638,14 +1638,13 @@ cbb_cardbus_alloc_resource(device_t brdev, device_t child, int type,
|
|||||||
start = cbb_start_mem;
|
start = cbb_start_mem;
|
||||||
if (end < start)
|
if (end < start)
|
||||||
end = start;
|
end = start;
|
||||||
if (RF_ALIGNMENT(flags) < CBB_MEMALIGN_BITS) {
|
if (count < CBB_MEMALIGN)
|
||||||
if (count < CBB_MEMALIGN)
|
align = CBB_MEMALIGN;
|
||||||
align = CBB_MEMALIGN;
|
else
|
||||||
else
|
align = count;
|
||||||
align = count;
|
if (align > (1 << RF_ALIGNMENT(flags)))
|
||||||
flags = (flags & ~RF_ALIGNMENT_MASK) |
|
flags = (flags & ~RF_ALIGNMENT_MASK) |
|
||||||
rman_make_alignment_flags(align);
|
rman_make_alignment_flags(align);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user