Subject: Re: PCMCIA Daemon
To: None <>
From: Atsushi Onoe <>
List: current-users
Date: 07/24/2000 08:36:51
> > You could make something similar to what I did for USB, and introduce a
> > device that reports events, like hardware attach and detach.
> Where should I start looking for this code?

You could find the kernel code in sys/dev/usb/usb.c, and userland code
can be found, e.g. usr.sbin/usbd of freebsd tree.

I've also implemented this card management stuff for Wildboar for BSD/OS,
which is now integrated into BSD/OS, while I hear that it has been changed
from my cdev implementation to socket base implementation.

I heard also Hayakawa-san ( considers to implement
socketmanager pseudo device.

There will be some point to be discussed.
	- how generic
		just for pccard or integrate usb, scsi, 1394, ...
	- what event should be handled
		- insertion/removal
			hooks to prepare KLM?
		- attached
		- start running (e.g. network device)
	- socket or character device
		I prefer to use character device.
	- locking support for select(2)
		strict locking
			only one device is allowed to open
		multiple device
			use number of devices just like bpf or pty
		cloning device
			create device at open, though not available yet.

Atsushi Onoe