YhLu YhLu@tyan.com writes:
Comment out
// resource->limit = info->mask | (step - 1);
In pnp_get_ioresource
Will make it works right.
That part of the code is correct. Fixing that exposed the problem.
The chunk of code out of device.c:compute_allocate_resource() that clamps the limit is below.
If you notice it currently ignores anything that is IORESOURCE_FIXED. So if you hard code the problem resource in Config.lb the symptoms will go away.
This is not a good long term solution, but it does work for now. This is a general problem with taking resource limits into account and compute_allocate_resource() needs an overhaul to do that properly. I will get to that as soon as I get back to getting 64bit resource handling properly and making it generic. So it should not be delayed too long.
/* Do NOT I repeat do not ignore resources which have zero size. * If they need to be ignored dev->read_resources should not even * return them. Some resources must be set even when they have * no size. PCI bridge resources are a good example of this. */
/* Propogate the resource alignment to the bridge register */ if (resource->align > bridge->align) { bridge->align = resource->align; }
/* Make certain we are dealing with a good minimum size */ size = resource->size; align = resource->align; if (align < min_align) { align = min_align; } if (resource->flags & IORESOURCE_FIXED) { continue; } /* Propogate the resource limit to the bridge register */ if (bridge->limit > resource->limit) { bridge->limit = resource->limit; } /* Artificially deny limits between DEVICE_MEM_HIGH and 0xffffffff */ if ((bridge->limit > DEVICE_MEM_HIGH) && (bridge->limit <= 0xffffffff)) { bridge->limit = DEVICE_MEM_HIGH; }
Eric