Re: Kernel PCMCIA

From: Linus Torvalds (torvalds@transmeta.com)
Date: Thu Oct 25 2001 - 12:12:06 EST


In article <3BD843DE.6FD5AF2D@nyc.rr.com>,
John Weber <weber@nyc.rr.com> wrote:
>
>Why are hotplug and cardmgr needed? As I understand it, cardbus uses
>hotplug for config/init, and other pcmcia cards use cardmgr for init and
>/etc/pcmcia/* for config. This seems like a big, smelly mess.

I'd personally love to get rid of cardmgr, and in fact you do not need
it with true 32-bit cards and proper PCI drivers, because the drivers
have sane plug/unplug semantics.

In fact, with CardBus cards, you don't strictly need /sbin/hotplug
either: /sbin/hotplug is nothing but a _notification_ thing, and as such
you can easily for example just compile the proper PCI driver into the
kernel, and the driver will automatically find and configure the card,
and if you don't insert/remove it at run-time you can consider the
CardBus slot just another PCI slot.

So the "/sbin/hotplug" is really not a cardbus thing at all: it's just
the kernels way of telling user space that "hey, you might want to load
a driver" (if the kernel didn't find one pre-loaded) or "hey, I just got
a new network card, maybe you should set up routing etc?"

In fact /sbin/hotplug works well for non-CardBus events too, like USB.

  Now comes the ugly part.

When I wrote the new CardBus code I didn't want to know about how 16-bit
PCMCIA works (I still mostly don't, but the pain of having to have
cardmgr might some day push me over the edge), so 16-bit PCMCIA cards
are handled with all the old legacy stuff, and they don't understand
about /sbin/hotplug and friends.

If somebody who knows 16-bit PCMCIA wants to change the "hey, I need a
driver" code to use /sbin/hotplug and not need cardmgr, I'd be thrilled.

>I don't use modules, so I don't use cardmgr for anything except to tell
>the kernel that there is a card in the socket.

You shouldn't even need that, if the 16-bit PCMCIA drivers weren't too
damn helpless..

                Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Oct 31 2001 - 21:00:28 EST