Messages in this thread Patch in this message |  | | Date | Tue, 27 Aug 2002 12:34:01 -0700 | From | "H. J. Lu" <> | Subject | Re: [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); |  |