Subject: Re: device tree traversal
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 07/10/2006 16:29:28
--A9z/3b/E4MkkD+7G
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Tue, Jul 04, 2006 at 09:40:57AM -0700, Garrett D'Amore wrote:
> Daniel Carosone wrote:
> > On Mon, Jul 03, 2006 at 10:22:57PM -0700, Garrett D'Amore wrote:
> > =20
> > One possible fly in the ointment: there are usb-to-pci bridges (and
> > many other weird things besides), so you can have a pci bus behind a
> > hot-deteached usb device. I've seen them get used for USB video cards
> > among other things.
> >
> > Trying to deal with these might well lead to otherwise-unnecessary
> > overengineering, of course, but it's worth mentioning.
> > =20
> In such a case, I suspect you _really_ want user interaction _before_
> the device is removed. I would imagine a lot of PCI device drivers are
> not well equipped for a hard device removal in the middle of doing
> things like DMA. (From my experience with hotplug drivers mostly on
> Solaris, it is pretty common to have drivers that want to "clean" the
> device up for things like removal or power down -- sometimes for example
> this means waiting for the device to go quiescent -- e.g. waiting for
> the txfifo on a serial port to drain.)
The problem is that while we WANT user interaction before, we should have
a way to handle cases where it doesn't happen. Say your cat is walking
across your desk and across USB cables. Say now someone makes a loud
noise, and the cat decides s/he NEEDS to be elsewhere NOW and jumps off
your desk. Say your USB cables now go flying. Or say some of the things
you had plugged in went flying instead. These things happen...
You've now had a very unexpected device removal event.
I think we need to figure out how to have the system not explode when this=
=20
happens.
Take care,
Bil
--A9z/3b/E4MkkD+7G
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
iD8DBQFEsuLYWz+3JHUci9cRAgZAAJ4xrcpAO7SqncG3RRmFdH9wYzJeZgCfdezx
/EJqDu3uy71WlVVf8HY4jlU=
=iVUY
-----END PGP SIGNATURE-----
--A9z/3b/E4MkkD+7G--