[KERNEL 2.6.7] fix "cs: unable to map card memory!" problem
komujun at nifty.com
komujun at nifty.com
Wed Jun 23 11:12:47 EDT 2004
Dear all
find_mem_region in rsrc_mgr.c calls allocate_resource with align=0.
bogus value is loaded, then causes "cs: unable to map card memory" problem.
> ret = allocate_resource(&iomem_resource, res, num, min,
max, 0, pcmcia_align, &data);
Following patch fixes this problem.
Best Regards
Komuro
--- linux/kernel/resource.c.orig 2004-06-23 23:09:58.000000000 +0900
+++ linux/kernel/resource.c 2004-06-23 23:10:38.000000000 +0900
@@ -261,7 +261,8 @@
new->start = min;
if (new->end > max)
new->end = max;
- new->start = (new->start + align - 1) & ~(align - 1);
+ if (align != 0)
+ new->start = (new->start + align - 1) & ~(align - 1);
if (alignf)
alignf(alignf_data, new, size, align);
if (new->start < new->end && new->end - new->start + 1 >= size) {
More information about the linux-pcmcia
mailing list