public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* kernel pcmcia
@ 2001-09-23 18:07 John Weber
  2001-09-23 20:06 ` David Woodhouse
  0 siblings, 1 reply; 7+ messages in thread
From: John Weber @ 2001-09-23 18:07 UTC (permalink / raw)
  To: linux-kernel

Is cardmgr absolutely necessary?  I don't use modules, so I don't really
understand what cardmgr does that can't be done by the kernel at boot.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel pcmcia
  2001-09-23 18:07 kernel pcmcia John Weber
@ 2001-09-23 20:06 ` David Woodhouse
  2001-09-24  0:55   ` Eric W. Biederman
  2001-09-27 14:27   ` Pavel Machek
  0 siblings, 2 replies; 7+ messages in thread
From: David Woodhouse @ 2001-09-23 20:06 UTC (permalink / raw)
  To: John Weber; +Cc: linux-kernel


weber@nyc.rr.com said:
> Is cardmgr absolutely necessary?  I don't use modules, so I don't
> really understand what cardmgr does that can't be done by the kernel
> at boot. -

Aside from loading modules, it also performs the matching between devices 
and drivers - rather than drivers registering a list of the devices they're 
capable of driving, as with other bus types, cardmgr is required to 'bind' 
devices to drivers.

The whole lot wants rewriting. I've been looking at it but don't have 
anything that even compiles. 


--
dwmw2



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel pcmcia
  2001-09-23 20:06 ` David Woodhouse
@ 2001-09-24  0:55   ` Eric W. Biederman
  2001-09-27 14:27   ` Pavel Machek
  1 sibling, 0 replies; 7+ messages in thread
From: Eric W. Biederman @ 2001-09-24  0:55 UTC (permalink / raw)
  To: David Woodhouse; +Cc: John Weber, linux-kernel

David Woodhouse <dwmw2@infradead.org> writes:

> weber@nyc.rr.com said:
> > Is cardmgr absolutely necessary?  I don't use modules, so I don't
> > really understand what cardmgr does that can't be done by the kernel
> > at boot. -
> 
> Aside from loading modules, it also performs the matching between devices 
> and drivers - rather than drivers registering a list of the devices they're 
> capable of driving, as with other bus types, cardmgr is required to 'bind' 
> devices to drivers.
> 
> The whole lot wants rewriting. I've been looking at it but don't have 
> anything that even compiles. 

I looked a while ago and the exported driver interfaces don't look to
bad but the code was next to impossible to follow.

Eric

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: kernel pcmcia
  2001-09-23 20:06 ` David Woodhouse
  2001-09-24  0:55   ` Eric W. Biederman
@ 2001-09-27 14:27   ` Pavel Machek
  1 sibling, 0 replies; 7+ messages in thread
From: Pavel Machek @ 2001-09-27 14:27 UTC (permalink / raw)
  To: David Woodhouse; +Cc: John Weber, linux-kernel

Hi!

> > Is cardmgr absolutely necessary?  I don't use modules, so I don't
> > really understand what cardmgr does that can't be done by the kernel
> > at boot. -
> 
> Aside from loading modules, it also performs the matching between devices 
> and drivers - rather than drivers registering a list of the devices they're 
> capable of driving, as with other bus types, cardmgr is required to 'bind' 
> devices to drivers.
> 
> The whole lot wants rewriting. I've been looking at it but don't have 
> anything that even compiles. 

Seconded. I need to see cardmgr dead for proper S3/S4 support without hacks.

								Pavel
-- 
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Kernel PCMCIA
@ 2001-10-25 16:54 John Weber
  2001-10-25 17:12 ` Linus Torvalds
  2001-10-25 17:15 ` Alan Cox
  0 siblings, 2 replies; 7+ messages in thread
From: John Weber @ 2001-10-25 16:54 UTC (permalink / raw)
  To: linux-kernel

I posted a while ago, and a got a partial answer so I've decided to be
more specific in my query.

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.

The only documentation I've found (on sourceforge) is a bit dated.  Can
anyone point me to some recent documentation? 

Also is anyone working on putting the "cardmgr/hotplug" functionality in
the kernel?  In my VERY HUMBLE opinion, putting this in the kernel is
akin to having PCI (or some other bus) init code in the kernel, so why
isn't this done? 
What's the deal with hotplug vs. kernel-pcmcia-cs? 

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.

I really need a good architectural overview of this in Linux.  Any
pointers?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Kernel PCMCIA
  2001-10-25 16:54 Kernel PCMCIA John Weber
@ 2001-10-25 17:12 ` Linus Torvalds
  2001-10-25 17:15 ` Alan Cox
  1 sibling, 0 replies; 7+ messages in thread
From: Linus Torvalds @ 2001-10-25 17:12 UTC (permalink / raw)
  To: linux-kernel

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Kernel PCMCIA
  2001-10-25 16:54 Kernel PCMCIA John Weber
  2001-10-25 17:12 ` Linus Torvalds
@ 2001-10-25 17:15 ` Alan Cox
  1 sibling, 0 replies; 7+ messages in thread
From: Alan Cox @ 2001-10-25 17:15 UTC (permalink / raw)
  To: John Weber; +Cc: linux-kernel

> 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.

It is in user space because
	o	It is possible to put it in user space
	o	The mappings can be complex and are best done in userspace
	o	User space is best positioned to make further complex
		decisions
	o	User space is best positioned to run scripts/tools as needed
		on a hot plug event


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-10-25 17:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-23 18:07 kernel pcmcia John Weber
2001-09-23 20:06 ` David Woodhouse
2001-09-24  0:55   ` Eric W. Biederman
2001-09-27 14:27   ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2001-10-25 16:54 Kernel PCMCIA John Weber
2001-10-25 17:12 ` Linus Torvalds
2001-10-25 17:15 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox