From owner-freebsd-current@FreeBSD.ORG Wed May 7 07:16:00 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 27D1B37B401 for ; Wed, 7 May 2003 07:16:00 -0700 (PDT) Received: from srv2.resnet.ohio-state.edu (srv2.resnet.ohio-state.edu [164.107.3.56]) by mx1.FreeBSD.org (Postfix) with SMTP id 15F0443F3F for ; Wed, 7 May 2003 07:15:59 -0700 (PDT) (envelope-from mistry.7@osu.edu) Received: (qmail 17179 invoked by uid 506); 7 May 2003 14:48:17 -0000 Received: from mistry.7@osu.edu by srv2.resnet.ohio-state.edu by uid 503 with qmail-scanner-1.14 ( Clear:. Processed in 0.019713 secs); 07 May 2003 14:48:17 -0000 Received: from rdrt-164-107-204-104.resnet.ohio-state.edu (HELO 192.168.1.100) (164.107.204.104) by srv2.resnet.ohio-state.edu with SMTP; 7 May 2003 14:48:17 -0000 From: Anish Mistry To: freebsd-current@freebsd.org Date: Wed, 7 May 2003 10:16:05 -0400 User-Agent: KMail/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200305071016.05214.mistry.7@osu.edu> Subject: Force USB device detach X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2003 14:16:00 -0000 I'm trying to get suspend/resume working on my laptop (-CURRENT as of Monday) so that the USB devices work after a resume. I've made ohci code changes to work as long as the device isn't being access while suspend (ie. cat /dev/uhid0). If it is this seems to cause an interrupt issue and the kernel panics since on resume the usb bus needs to be completly reinitilized itself(ie. just like a fresh boot) and the usb interrupt values have change and it's left in an ambiguous state. The only thing that I can think of is to force all the attached devices to detach on a suspend. I've been poking around the code and can't seem to figure out how to do this. Is there a function call that I need to use or would I need to enumerate all the attached devices and then call a detach on them, and how would I do that? This might seem like bit of a newbie question. Thanks in advance, -- Anish Mistry