[EMAIL PROTECTED] said:
>  Is there a technical reason for this?  Not that I know of; but then I
> also cannot think of a good reason for wanting, say, the generic code
> built in but the controller support as modules.  I do see reasonable
> arguments for all-builtin or all-modules.

register_ss_entry() is broken and when you unload a socket driver it'll get 
very confused and leave /proc entries behind. You can clean this up by 
removing pcmcia_core.o and reloading it.

If you have pcmcia_core.o built in and a socket driver as a module, then 
obviously you can't do this without rebooting.

I doubt this was known at the time the Config.in choices were made, but 
it's sufficient reason right now to leave it as it is.

The correct fix is to dump the static socket tables completely, as has
already happened in the standalone code, but I think that should probably
wait for 2.5. In the meantime, this patch ought to work around the problem
for most cases - although it'll still break if you load 2 socket drivers,
then unload them again FIFO.

Index: drivers/pcmcia/cs.c
===================================================================
RCS file: /net/passion/inst/cvs/linux/drivers/pcmcia/Attic/cs.c,v
retrieving revision 1.1.2.28
diff -u -r1.1.2.28 cs.c
--- drivers/pcmcia/cs.c 2000/11/10 14:56:32     1.1.2.28
+++ drivers/pcmcia/cs.c 2000/11/22 10:37:33
@@ -416,12 +416,10 @@
 {
     int i;
 
-    for (i = 0; i < sockets; i++) {
+    for (i = sockets-1; i >= 0; i-- ) {
        socket_info_t *socket = socket_table[i];
        if (socket->ss_entry == ss_entry)
-           pcmcia_unregister_socket (socket);
-       else
-           i++;
+               pcmcia_unregister_socket (socket);
     }
 } /* unregister_ss_entry */
 


--
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to