[Prism54-users] Re: prism54: pci_request_regions failure

Jörg Esser jackfritt@boh.de
Fri, 07 May 2004 19:40:00 +0200


Alec H. Peterson schrieb:

> I thought you may be interested that I _think_ I have a fix.
>
> Line 738 of drivers/pcmcia/yenta.c:
>
>        mask = ~0x1fff;


Ok this one works for me!

I also tried your suggested patch but I don´t know how I should apply it 
right. (I use kernel 2.4.26 where the code looks the same)

drivers/pcmcia/yenta.c that looks like this (in yenta_allocate_res(), 
kernel 2.4.25):

       start = config_readl(socket, offset) & mask;
       end = config_readl(socket, offset+4) | ~mask;
#if 1
       if (!(type & IORESOURCE_IO) && (((end - start) < BRIDGE_SIZE_MIN) ||
           (start & (end - start))))
       {
               printk(KERN_INFO "yenta %s: Preassigned resource start 
%lx end %lx too small or not aligned.\n", socket->dev->slot_name, start, 
end);
               res->start = res->end = 0;
       }
       else
#endif
       if (start && end > start) {
               res->start = start;

but I´m not a programmer. Can you provide me some more Info ? Or a diff 
file (for the patch program)? Should I also change mask = ~0x1fff; ?
Or just apply the second code ?

Let me know and I try my best.

But the best is that with just the first patch all my problems are gone. 
My WG511 from Netgear now works out of the box.

Thanks a lot !


Joerg