From owner-freebsd-usb@FreeBSD.ORG Fri Aug 10 04:32:24 2007 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DC9C16A46E for ; Fri, 10 Aug 2007 04:32:24 +0000 (UTC) (envelope-from gcr+freebsd-usb@tharned.org) Received: from xm17.infosec.fedex.com (xm17.infosec.fedex.com [199.81.216.41]) by mx1.freebsd.org (Postfix) with ESMTP id 16A6113C457 for ; Fri, 10 Aug 2007 04:32:24 +0000 (UTC) (envelope-from gcr+freebsd-usb@tharned.org) X-AuditID: c751805b-a5dbbbb000005d78-a2-46bbdcc2aa3d Received: from inet04.prod.fedex.com (inet04.prod.fedex.com [199.81.10.44]) by xm17.infosec.fedex.com (FedEx MX) with ESMTP id 05D6C4E4002 for ; Thu, 9 Aug 2007 22:34:26 -0500 (CDT) Received: from nc8000.tharned.org ([172.18.80.15]) by inet04.prod.fedex.com (8.12.11/8.12.11) with ESMTP id l7A3YK2w002292 for ; Thu, 9 Aug 2007 22:34:25 -0500 (CDT) Received: from nc8000.tharned.org (gcr@localhost [127.0.0.1]) by nc8000.tharned.org (8.14.1/8.14.1) with ESMTP id l7A3YHua049260; Thu, 9 Aug 2007 22:34:17 -0500 (CDT) (envelope-from gcr+freebsd-usb@tharned.org) Received: from localhost (gcr@localhost) by nc8000.tharned.org (8.14.1/8.14.1/Submit) with ESMTP id l7A3YGop049257; Thu, 9 Aug 2007 22:34:17 -0500 (CDT) (envelope-from gcr+freebsd-usb@tharned.org) Date: Thu, 9 Aug 2007 22:34:16 -0500 (CDT) From: Greg Rivers Sender: gcr@tharned.org To: Sven Hazejager In-Reply-To: <07080923185142.-1077952816@somehost.domainz.com> Message-ID: <20070809222720.T950@nc8000.tharned.org> References: <07080923185142.-1077952816@somehost.domainz.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Brightmail-Tracker: AAAAAA== Cc: freebsd-usb@freebsd.org Subject: Re: How to stop attached USB device / send IRP_MN_REMOVE_DEVICE? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Aug 2007 04:32:24 -0000 On Thu, 9 Aug 2007, Sven Hazejager wrote: > Is there a tool under FreeBSD 6.2 that properly stops a USB device, > equivalent to Windows XPs Safely Remove Hardware? I noticed that Windows > sends a IRP_MN_REMOVE_DEVICE command, after which my LaCie external HDD > spins down. I would like to do this under FreeBSD too. > > So, the question really is: how to send a IRP_MN_REMOVE_DEVICE command? > See camcontrol(8). `camcontrol eject` should do the trick in this case, but only if the device supports it. `camcontrol stop` works to spin down many hard drives, but in my experience is more likely to work on firewire than USB drives. -- Greg