From owner-cvs-all@FreeBSD.ORG Mon Nov 21 15:19:12 2005 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC9F416A420; Mon, 21 Nov 2005 15:19:12 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CE7943D99; Mon, 21 Nov 2005 15:18:57 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 2364199 for multiple; Mon, 21 Nov 2005 10:18:17 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.1/8.13.1) with ESMTP id jALFI3kh069401; Mon, 21 Nov 2005 10:18:03 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "M. Warner Losh" Date: Mon, 21 Nov 2005 10:15:25 -0500 User-Agent: KMail/1.8.2 References: <20051119165547.0A4BD16A43D@hub.freebsd.org> <00ca01c5ed4a$86b0e570$0300a8c0@COMETE> <20051119.144210.122123926.imp@bsdimp.com> In-Reply-To: <20051119.144210.122123926.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511211015.27879.jhb@freebsd.org> X-Spam-Status: No, score=-2.8 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: cvs-src@freebsd.org, damien.bergamini@free.fr, src-committers@freebsd.org, cvs-all@freebsd.org, nate@root.org Subject: Re: cvs commit: src/sys/modules/iwi Makefile src/sys/dev/iwi if_iwi.c if_iwireg.h if_iwivar.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 15:19:13 -0000 On Saturday 19 November 2005 04:42 pm, M. Warner Losh wrote: > In message: <00ca01c5ed4a$86b0e570$0300a8c0@COMETE> > > "Damien Bergamini" writes: > : | I'm a little concerned about this change. The notes claim the firmware > : | is loaded after a resume from the filesystem as well as at > : | initialization time. So your driver is then assuming the ATA driver is > : | fully reinitialized before your driver's resume method can be called. > : | You can't assume that since it's not a child device of ATA. > : > : Wouldn't the call to VOP_READ block until "/" is recovered in that case ? > > If it blocks until "/" is recovered, then the system will block. We > presently restore single threaded, and if anything in there blocks, we > wait until it unblocks. Interrupts are runnable, so some things would > still work... Devices get resumed based on their relative positions in the device tree which is rather arbitrary (it depends on how the PCI busses are laid out on a machine for example). You really cannot know that the kernel is back up and running well enough to do a VOP_READ (which is _synchronous_, not magically async, so you'd need to create your own kthread to even try to get the behavior you seem to want) until all the hardware is up. The easiest way to accomplish this is for your driver to send a message to devd requesting that the firmware be reloaded on resume since devd won't run until the kernel is fully back up. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org