From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 14 15:13:05 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6A7A16A419 for ; Tue, 14 Aug 2007 15:13:05 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 7CE1C13C480 for ; Tue, 14 Aug 2007 15:13:05 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id l7EElFdh062845; Tue, 14 Aug 2007 16:47:15 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id l7EEl6Zc093205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Aug 2007 16:47:07 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id l7EEl6PB076989; Tue, 14 Aug 2007 16:47:06 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id l7EEl5wg076988; Tue, 14 Aug 2007 16:47:05 +0200 (CEST) (envelope-from ticso) Date: Tue, 14 Aug 2007 16:47:05 +0200 From: Bernd Walter To: Sven Hazejager Message-ID: <20070814144705.GN72415@cicely12.cicely.de> References: <07081411265549.-1077952816@somehost.domainz.com> <20070814030833.49a7a030@soralx> <20070814041736.4c16f41e@soralx> <07081416114656.-1077948560@somehost.domainz.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <07081416114656.-1077948560@somehost.domainz.com> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.1.7 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on cicely12.cicely.de Cc: freebsd-hackers@freebsd.org Subject: Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2007 15:13:06 -0000 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