lkml.org 
[lkml]   [2001]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Memory region check in drivers/pcmcia/rsrc_mgr.c

On Sat, 7 Jul 2001, Paul Mackerras wrote:
>
> The patch below does this (and makes a similar correction for I/O
> space). With this patch applied, the pcmcia stuff works fine on my
> powerbook, and I end up with something like this in /proc/iomem:

This is wrong.

The reason it currently uses the rather fascist check_resource() is that
the thing needs a completely _unallocated_ region.

By changing it to use "check_region" instead of "check_resource()", you
allow the PCMCIA code to use an already allocated (but not in use) PCI
region. That is not what the code is meant to do - you might find that the
yenta code suddenly starts allocating the PCMCIA resources inside another
PCI device that just hasn't marked its resources busy yet.

This is, in fact, exactly what happens for you: it allocates the resources
inside your PCI bridge mappings. Which happens to be what you want in this
case, but it's not right in general.

> Linus, would you apply this patch to your tree?

I don't think so.

HOWEVER, you can change the resource checking to use the proper "parent
resource" instead of using the root resource. I absolutely agree that
using the root resource is wrong per se - it depends (incorrectly) on the
fact that on all laptops the PCMCIA controller tends to be on the root
bus.

Note that the CardBus side gets this all right - I assume that a 32-bit
CardBus card with a PCI driver should work on your powerbook even without
this patch, no?

It's only the old-style PCMCIA resource management that is fairly broken.
It may be that you rpatch might be an acceptable band-aid, but I really
think that the problem should be solved differently.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:56    [W:0.055 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site