Subject: Re: [New to NetBSD] USB mass-storage hotplug?
To: Hauke Fath <hf@spg.tu-darmstadt.de>
From: Jukka Marin <jmarin@embedtronics.fi>
List: netbsd-users
Date: 06/24/2005 12:19:57
On Fri, Jun 24, 2005 at 11:13:53AM +0200, Hauke Fath wrote:
> Am 23.06.2005 um 15:00 Uhr +0000 schrieb Sylvain Briole:
> >I have read USB manpages (usb(4), umass(4)) on NetBSD 2.0.2, but I 
> >did not find out how to use "hotplug".
> 
> There is no daemon in NetBSD that handles USB hot-plugging events, 
> afaik.

I wrote a prg which polls for a given USB device and executes a script
when the device is plugged in or out.  The problem is that this prg can
cause a kernel panic under 2.0.2 - I think there must be a race condition
which causes the panic if the USB devices are polled at the "wrong" time
(exactly at the moment when a new device is being attached, probably).

I was going to use this prg and script to mount my digicam, move all pics
to hd and then umount the disk - but I don't like the kernel panic that
much :(

  -jm