lkml.org 
[lkml]   [2002]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [Fwd: [PATCH] reduce size of bridge regions for yenta.c]
On Sun, Aug 25, 2002 at 06:37:14PM +0200, Manfred Spraul wrote:
>
> yenta.c doesn't contain error handling, and that should be fixed.
>

This is what I have been using.


H.J.
--- linux/drivers/pcmcia/yenta.c.resource Sat Aug 10 20:30:35 2002
+++ linux/drivers/pcmcia/yenta.c Fri Aug 16 09:34:32 2002
@@ -739,17 +739,27 @@ static void yenta_allocate_res(pci_socke
return;
}

- align = size = 4*1024*1024;
- min = PCIBIOS_MIN_MEM; max = ~0U;
if (type & IORESOURCE_IO) {
align = 1024;
size = 256;
min = 0x4000;
max = 0xffff;
}
+ else {
+ align = size = 4*1024*1024;
+ min = PCIBIOS_MIN_MEM;
+ max = ~0U;
+ }

- if (allocate_resource(root, res, size, min, max, align, NULL, NULL) < 0)
+
+ if (allocate_resource(root, res, size, min, max, align, NULL, NULL) < 0) {
+ printk (KERN_NOTICE "PCI: CardBus bridge (%04x:%04x, %04x:%04x): Failed to allocate %s resource: %d bytes!\n",
+ socket->dev->vendor, socket->dev->device,
+ socket->dev->subsystem_vendor,
+ socket->dev->subsystem_device,
+ (type & IORESOURCE_IO) ? "I/O" : "memory", size);
return;
+ }

config_writel(socket, offset, res->start);
config_writel(socket, offset+4, res->end);
\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.039 / U:5.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site