[BUG pcmcia] multi-function card can't get the correct ConfigBase

Dominik Brodowski linux at dominikbrodowski.net
Sat Oct 17 07:59:37 EDT 2009


Dear Komuro,

On Sun, Nov 30, 2008 at 05:54:02PM +0900, Komuro wrote:
> Multi-function card can't get the correct ConfigBase.
> 
> unfortunately, pccard_read_tuple always get the ConfigBase for 1st device.

Is this still an issue?

> The reason of this problem is pccard_read_tuple set
> tuple.Attributes = TUPLE_RETURN_COMMON.
> 
> Any idea to fix this?

Well, we could add something like that:


diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
index 4a110b7..0141063 100644
--- a/drivers/pcmcia/cistpl.c
+++ b/drivers/pcmcia/cistpl.c
@@ -1463,7 +1463,10 @@ int pccard_read_tuple(struct pcmcia_socket *s, unsigned int function, cisdata_t
 	    return -ENOMEM;
     }
     tuple.DesiredTuple = code;
-    tuple.Attributes = TUPLE_RETURN_COMMON;
+    if (function == 0)
+	    tuple.Attributes = TUPLE_RETURN_COMMON;
+    else:
+	    tuple.Attributes = TUPLE_RETURN_LINK;
     ret = pccard_get_first_tuple(s, function, &tuple);
     if (ret != 0)
 	    goto done;


though I would be worried whether this breaks other accesses to
pccard_read_tuple with function > 0, e.g. when looking up the MANF_ID?

Best,
	Dominik



More information about the linux-pcmcia mailing list