From owner-svn-src-all@FreeBSD.ORG Sat Jan 7 09:17:32 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id BB053106566B; Sat, 7 Jan 2012 09:17:32 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 89443151F95; Sat, 7 Jan 2012 09:17:31 +0000 (UTC) Message-ID: <4F080DAA.9030109@FreeBSD.org> Date: Sat, 07 Jan 2012 01:17:30 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Hans Petter Selasky References: <201112191535.pBJFZ6hY063597@svn.freebsd.org> In-Reply-To: <201112191535.pBJFZ6hY063597@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228711 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jan 2012 09:17:32 -0000 Is this the change that is causing all the new usb-related messages when shutting down? If so, can it be hidden behind verbose? Doug On 12/19/2011 07:35, Hans Petter Selasky wrote: > Author: hselasky > Date: Mon Dec 19 15:35:05 2011 > New Revision: 228711 > URL: http://svn.freebsd.org/changeset/base/228711 > > Log: > Add code to wait for USB shutdown to be executed at system shutdown. > Add sysctl which can be used to skip this waiting. > > MFC after: 3 days > > Modified: > head/sys/dev/usb/controller/usb_controller.c > > Modified: head/sys/dev/usb/controller/usb_controller.c > ============================================================================== > --- head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 14:55:14 2011 (r228710) > +++ head/sys/dev/usb/controller/usb_controller.c Mon Dec 19 15:35:05 2011 (r228711) > @@ -87,7 +87,12 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug > static int usb_no_boot_wait = 0; > TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait); > SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, &usb_no_boot_wait, 0, > - "No device enumerate waiting at boot."); > + "No USB device enumerate waiting at boot."); > + > +static int usb_no_shutdown_wait = 0; > +TUNABLE_INT("hw.usb.no_shutdown_wait", &usb_no_shutdown_wait); > +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RDTUN, &usb_no_shutdown_wait, 0, > + "No USB device waiting at system shutdown."); > > static devclass_t usb_devclass; > > @@ -277,11 +282,20 @@ usb_shutdown(device_t dev) > return (0); > } > > + device_printf(bus->bdev, "Controller shutdown\n"); > + > USB_BUS_LOCK(bus); > usb_proc_msignal(&bus->explore_proc, > &bus->shutdown_msg[0], &bus->shutdown_msg[1]); > + if (usb_no_shutdown_wait == 0) { > + /* wait for shutdown callback to be executed */ > + usb_proc_mwait(&bus->explore_proc, > + &bus->shutdown_msg[0], &bus->shutdown_msg[1]); > + } > USB_BUS_UNLOCK(bus); > > + device_printf(bus->bdev, "Controller shutdown complete\n"); > + > return (0); > } > > -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/