Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2007 16:47:05 +0200
From:      Bernd Walter <ticso@cicely12.cicely.de>
To:        Sven Hazejager <sven-freebsd@hazejager.nl>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE?
Message-ID:  <20070814144705.GN72415@cicely12.cicely.de>
In-Reply-To: <07081416114656.-1077948560@somehost.domainz.com>
References:  <07081411265549.-1077952816@somehost.domainz.com> <20070814030833.49a7a030@soralx> <20070814041736.4c16f41e@soralx> <07081416114656.-1077948560@somehost.domainz.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 14, 2007 at 04:14:06PM +0200, Sven Hazejager wrote:
> >>>So, the question really is: how to send a IRP_MN_REMOVE_DEVICE
> >>>command?
> >>
> >>`camcontrol da? stop` seemed to do the trick before (5.2.1-R, AFAIR),
> >>but now I'm not sure (looks like it doesn't)
> >
> >sorry, I meant to say that `camcontrol da? stop` does not power down
> >the device anymore; nonetheless, it is probably safe to disconnect it
> 
> No, camcontrol does not support this over USB. Windows XP demonstrates it 
> is technically possible, and I do not believe it is fully safe to 
> disconnect the drive (even when unmounted), as the drive then is not able 
> to park its heads, which it DOES do under XP.

Why do you think it is not safe?
You either don't physically move the drive when disconneting it or it's
not a mechanical drive at all.

> So, we come back to the original question: how to send an 
> IRP_MN_REMOVE_DEVICE event?

You don't have to, there is nothing more than not using the device you
are about to remove.
This is different in windows where every device available is
automatically mounted, polled for media change, or whatever.

-- 
B.Walter                http://www.bwct.de      http://www.fizon.de
bernd@bwct.de           info@bwct.de            support@fizon.de



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