]> git.hungrycats.org Git - linux/commitdiff
[PATCH] pcmcia: yenta override to re-allocate resources
authorDominik Brodowski <linux@dominikbrodowski.de>
Tue, 11 Jan 2005 11:30:10 +0000 (03:30 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 11 Jan 2005 11:30:10 +0000 (03:30 -0800)
From: Manfred Spraul

One bios assigns a small window for i/o access to yenta bridges.  But there
are Cardbus cards that needs lots of i/o ports.  yenta usually honors the bios
selected values, except if the bios choice is clearly invalid.  The patch
allows an override from the command line.

Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
Signed-Off-By: Dominik Brodowski <linux@brodo.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/pcmcia/yenta_socket.c

index 91b7b133989acc0a55edc380e0f22240610f1901..9fae06ac2761c13a5f9b80bc5ccfc5f9a16dd61a 100644 (file)
@@ -45,6 +45,10 @@ MODULE_PARM_DESC(disable_clkrun, "If PC card doesn't function properly, please t
 static int yenta_probe_cb_irq(struct yenta_socket *socket);
 
 
+static unsigned int override_bios;
+module_param(override_bios, uint, 0000);
+MODULE_PARM_DESC (override_bios, "yenta ignore bios resource allocation");
+
 /*
  * Generate easy-to-use ways of reading a cardbus sockets
  * regular memory space ("cb_xxx"), configuration space
@@ -554,7 +558,7 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ
 
        start = config_readl(socket, offset) & mask;
        end = config_readl(socket, offset+4) | ~mask;
-       if (start && end > start) {
+       if (start && end > start && !override_bios) {
                res->start = start;
                res->end = end;
                if (request_resource(root, res) == 0)