diff options
| author | Warner Losh <imp@FreeBSD.org> | 2004-04-06 22:41:14 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2004-04-06 22:41:14 +0000 |
| commit | 70fc36e89c485febee952e33b2eb9d8f5f0f72f2 (patch) | |
| tree | 6929b57ff59d4e6d1c817584668745769a638bf6 /sys/dev/pccbb | |
| parent | 640c4d40fb1d22e94d329414d50523af8a9a5ab4 (diff) | |
Notes
Diffstat (limited to 'sys/dev/pccbb')
| -rw-r--r-- | sys/dev/pccbb/pccbb.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c index 2139e493069d..560e2fc3071c 100644 --- a/sys/dev/pccbb/pccbb.c +++ b/sys/dev/pccbb/pccbb.c @@ -1346,6 +1346,7 @@ done:; static int cbb_do_power(device_t brdev) { + struct cbb_softc *sc = device_get_softc(brdev); int voltage; /* Don't enable OE */ @@ -1612,6 +1613,7 @@ cbb_cardbus_alloc_resource(device_t brdev, device_t child, int type, struct cbb_softc *sc = device_get_softc(brdev); int tmp; struct resource *res; + u_long align; switch (type) { case SYS_RES_IRQ: @@ -1636,9 +1638,14 @@ 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 (RF_ALIGNMENT(flags) < CBB_MEMALIGN_BITS) { + if (count < CBB_MEMALIGN) + align = CBB_MEMALIGN; + else + align = count; flags = (flags & ~RF_ALIGNMENT_MASK) | - rman_make_alignment_flags(CBB_MEMALIGN); + rman_make_alignment_flags(align); + } break; } |
