Cardbus memory problem

GregR gr at ridefix.com
Wed Dec 29 16:24:16 EST 2004


>Hm. The memory window -- which is the area devices "below" the bridge can
>access, and can be accessed at, is
>>         Memory window 0: e2001000-e2002000 (prefetchable)
>>         Memory window 1: e2003000-e2004000
>
>which is only _very_ small. (btw: does anyone know why
>this is bordering on 0x2000 and not on 0x1fff or 0x2fff? seems to be wasted
>space to me).
>
>> PCI: Failed to allocate resource 0(e2010000-e2004fff) for 0000:02:00.0
>However, the cardbus/pci layer tries to allocate a resource _outside_ of
>the area mentioned above. It should see its too big a request, and fail (or,
>better yet, fix it up...), but why does it try at all even though it cannot
>work? Also, is it a typo or is it really a request from e2010000 to
>e2004fff? That would be (end < start)!
>
>> e2001000-e2002fff : PCI CardBus #02
>> e2003000-e2004fff : PCI CardBus #02

Found patch at:  http://bugzilla.kernel.org/show_bug.cgi?id=1840

--- linux-2.6/drivers/pcmcia/yenta_socket.c.orig	2004-05-12
18:52:15.373964008 +0100
+++ linux-2.6/drivers/pcmcia/yenta_socket.c	2004-05-12 18:55:34.901631192
+0100
@@ -548,7 +548,13 @@

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

Applied patch, recompiled and its working.  I am having a small problem
with eth0, but eth1 works fine.  (ath0 is for the wireless).



More information about the linux-pcmcia mailing list