summaryrefslogtreecommitdiffstats
path: root/sys/dev/pccbb
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2004-04-06 22:41:14 +0000
committerimp <imp@FreeBSD.org>2004-04-06 22:41:14 +0000
commitad7ac7636e5bc35ba67d4084eb9d31d871b371f3 (patch)
tree6929b57ff59d4e6d1c817584668745769a638bf6 /sys/dev/pccbb
parent837e6e7a48de17c94632a57c371fb48d5479a5e1 (diff)
downloadFreeBSD-src-ad7ac7636e5bc35ba67d4084eb9d31d871b371f3.zip
FreeBSD-src-ad7ac7636e5bc35ba67d4084eb9d31d871b371f3.tar.gz
Fix mis-merge from p4 by adding line getting sc.
Attempt to deal with larger memory allocation better.
Diffstat (limited to 'sys/dev/pccbb')
-rw-r--r--sys/dev/pccbb/pccbb.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/pccbb/pccbb.c b/sys/dev/pccbb/pccbb.c
index 2139e49..560e2fc 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;
}
OpenPOWER on IntegriCloud