All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. J. Lu" <hjl@lucon.org>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: ink@jurassic.park.msu.ru, linux-kernel@vger.kernel.org,
	torvalds@transmeta.com, dhinds@zen.stanford.edu
Subject: Re: [Fwd: [PATCH] reduce size of bridge regions for yenta.c]
Date: Tue, 27 Aug 2002 12:34:01 -0700	[thread overview]
Message-ID: <20020827123401.A28519@lucon.org> (raw)
In-Reply-To: <3D6907BA.5020603@colorfullife.com>; from manfred@colorfullife.com on Sun, Aug 25, 2002 at 06:37:14PM +0200

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

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.

[-- Attachment #2: linux-2.4.18-yenta-resource.patch --]
[-- Type: text/plain, Size: 1004 bytes --]

--- 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);

      reply	other threads:[~2002-08-27 19:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3D6874A0.5B110F6@zip.com.au>
2002-08-25 14:57 ` [Fwd: [PATCH] reduce size of bridge regions for yenta.c] H. J. Lu
2002-08-25 16:37   ` Manfred Spraul
2002-08-27 19:34     ` H. J. Lu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020827123401.A28519@lucon.org \
    --to=hjl@lucon.org \
    --cc=dhinds@zen.stanford.edu \
    --cc=ink@jurassic.park.msu.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.