Subject: Re: question on device detachment
To: Ferry Sutanto <>
From: Manuel Bouyer <>
List: tech-kern
Date: 10/20/2001 19:13:44
On Thu, Oct 18, 2001 at 03:26:38PM -0700, Ferry Sutanto wrote:
> Thanks for all the replies. I want to know what would
> be the right/clean way if a microdrive is connected to
> the pcmcia controller. I think it is better to
> mount/unmount the drive as the device is
> attached/removed. What I have currently is the
> following.
> 1. Interrupt happen.
> 2. Interrupt handler will send a signal to my daemon.
> 3. The daemon will ioctl the device and it will
> attached/detached the device.
> 4. When attachment/detachment is successful, the
> daemon will mount/unmount. 
> Has this been done before ? Any code example i can
> look at ?

For pcmcia IDE or scsi controllers, an umount will be attempted at detach time.
this happen all in kernel.  mount must be done by hand.

There is  currently no mechanism to inform userland processes of devices

Manuel Bouyer <>