Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jan 2007 08:16:29 -0800
From:      Luigi Rizzo <rizzo@icir.org>
To:        usb@freebsd.org
Subject:   any way to detect usb detached from a device driver ?
Message-ID:  <20070109081629.A74724@xorpc.icir.org>

next in thread | raw e-mail | index | archive | help
I am modifying a kernel device driver for webcams
(see http://info.iet.unipi.it/~luigi/FreeBSD/usb-cameras.html)
packing together various projects around, and i was wondering
how to handle the situation of a device being
detached while in use.

Right now the code (from ports/multimedia/pwcbsd) detects
that the device is in use while the driver-specific USB_DETACH
routine is called, however then it goes on without doing
anything.

In another driver in the dree (urio.c) i see the driver
calls usb_detach_wait() to wait up to 60s for the
drivers to complete. However that function is not documented
and used a bit inconsistently in the rest of /sys/dev/usb

Any suggestions ?

	cheers
	luigi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070109081629.A74724>