public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: David Hinds <dhinds@lahmed.stanford.edu>
Cc: Tobias Ringstrom <tori@tellus.mine.nu>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Why not PCMCIA built-in and yenta/i82365 as modules
Date: Wed, 22 Nov 2000 11:05:20 +0000	[thread overview]
Message-ID: <6911.974891120@redhat.com> (raw)
In-Reply-To: <20001121160443.B18150@lahmed.stanford.edu>
In-Reply-To: <20001121160443.B18150@lahmed.stanford.edu>  <Pine.LNX.4.21.0011212328570.30344-100000@svea.tellus>


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/

      parent reply	other threads:[~2000-11-22 11:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-21 22:34 Why not PCMCIA built-in and yenta/i82365 as modules Tobias Ringstrom
2000-11-22  0:04 ` David Hinds
2000-11-22  1:10   ` Albert D. Cahalan
2000-11-22  1:28     ` David Hinds
2000-11-22  1:44   ` Horst von Brand
2000-11-22  1:50     ` David Hinds
2000-11-22 10:54   ` Tobias Ringstrom
2000-11-22 10:25 ` Matti Aarnio
2000-11-22 12:29   ` Alan Cox
2000-11-24 17:06   ` Oliver Xymoron
2000-11-22 11:05 ` David Woodhouse [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6911.974891120@redhat.com \
    --to=dwmw2@infradead.org \
    --cc=dhinds@lahmed.stanford.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tori@tellus.mine.nu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox