lkml.org 
[lkml]   [2000]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: Why not PCMCIA built-in and yenta/i82365 as modules
Date

dhinds@lahmed.stanford.edu 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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:47    [W:0.066 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site