From owner-freebsd-arch@FreeBSD.ORG Fri Mar 28 08:22:45 2008 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 782D21065670; Fri, 28 Mar 2008 08:22:45 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 34C858FC26; Fri, 28 Mar 2008 08:22:45 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m2S8MSlb071952; Fri, 28 Mar 2008 02:22:29 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Fri, 28 Mar 2008 02:23:08 -0600 (MDT) Message-Id: <20080328.022308.1645215000.imp@bsdimp.com> To: jhb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200803271727.51811.jhb@freebsd.org> References: <200803271105.18401.jhb@freebsd.org> <20080327.142052.-1337017421.imp@bsdimp.com> <200803271727.51811.jhb@freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arch@FreeBSD.org Subject: Re: AsiaBSDCon DEVSUMMIT patch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Mar 2008 08:22:45 -0000 OK. I've updated the kernel side of this patch. It still only supports suspend/resume, but tells the bus to do it. The PCI bus will now set the state properly. We can extend this to include detach and rescan (and somehow attach, but that's harder), but I haven't had time to do this yet. I drank way too much beer last night to do more (or I'd have merged in the suggested userland changes too). I'm still leery about doing things directly powering devices, but so long as it translates to suspend/resume, I'm happy. Power state management when a device isn't suspended also needs careful thought. This patch mimics the suspend and resume paths better, so we can do more testing on drivers. This has already found, or rediscovered, bugs in the usb code's integration into newbus. I've not yet fixed those, since they are hard (but also affect eject of USB Cardbus cards with devices attached). Warner