From owner-svn-src-head@FreeBSD.ORG Fri May 3 08:19:10 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 366627B1; Fri, 3 May 2013 08:19:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 295B81D8B; Fri, 3 May 2013 08:19:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r438JAcF063171; Fri, 3 May 2013 08:19:10 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r438J9rB063169; Fri, 3 May 2013 08:19:09 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201305030819.r438J9rB063169@svn.freebsd.org> From: Hans Petter Selasky Date: Fri, 3 May 2013 08:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250202 - in head/sys: conf dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2013 08:19:10 -0000 Author: hselasky Date: Fri May 3 08:19:09 2013 New Revision: 250202 URL: http://svnweb.freebsd.org/changeset/base/250202 Log: Allow the default USB template to be specified at compile time. Modified: head/sys/conf/options head/sys/dev/usb/usb_device.c Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Fri May 3 07:44:58 2013 (r250201) +++ head/sys/conf/options Fri May 3 08:19:09 2013 (r250202) @@ -644,6 +644,7 @@ BUS_DEBUG opt_bus.h USB_DEBUG opt_usb.h USB_HOST_ALIGN opt_usb.h USB_REQ_DEBUG opt_usb.h +USB_TEMPLATE opt_usb.h USB_VERBOSE opt_usb.h USB_EHCI_BIG_ENDIAN_DESC opt_usb.h U3G_DEBUG opt_u3g.h Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Fri May 3 07:44:58 2013 (r250201) +++ head/sys/dev/usb/usb_device.c Fri May 3 08:19:09 2013 (r250202) @@ -112,7 +112,11 @@ static void usb_cdev_free(struct usb_dev /* This variable is global to allow easy access to it: */ -int usb_template = 0; +#ifdef USB_TEMPLATE +int usb_template = USB_TEMPLATE; +#else +int usb_template; +#endif TUNABLE_INT("hw.usb.usb_template", &usb_template); SYSCTL_INT(_hw_usb, OID_AUTO, template, CTLFLAG_RW | CTLFLAG_TUN,