From owner-svn-src-head@freebsd.org Sun Jan 7 09:55:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76CC1E63218; Sun, 7 Jan 2018 09:55:48 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EB9D7F58B; Sun, 7 Jan 2018 09:55:46 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id a1694042; Sun, 7 Jan 2018 10:55:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h= mime-version:content-type:content-transfer-encoding:date:from:to :cc:subject:in-reply-to:references:message-id; s=mail; bh=dHeQsY 7JicdZxRCIelLgf25sbjk=; b=rMkd/Sygcmhsz2xMbEp43iQXHALIKLGRsI8z3w oZDOJeQzeJFYdtFr29Lfh+n0tvou8ds7cdA0PotQsLTW9Iqnv1vXzNDxSQWmtsA3 8+dzpiH0H4j97+aos22Lnov3MRUhMTtyqIeRTkzf4UmPPkRfs6x9icE4Hlbl1FrZ UPPBM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h= mime-version:content-type:content-transfer-encoding:date:from:to :cc:subject:in-reply-to:references:message-id; q=dns; s=mail; b= b9sxhBxdh5Ac73OKf2bLQvRodiDhiL3qkhYVBfhLLBhseSA9G2glbiaMQuJP3VgF 0GFi8jBMrATQC5Gz+n4DUj0nOs0iUUl3uYLY91mAW8oxgSwGq4Y5jEX/5M0fGy07 iNVNSjGsVAKQI5rIxiHhMpGrTfqVdvmUlcjLbmBsOEY= Received: from webmail.megadrive.org (www1.blih.net [212.83.177.180]) by mail.blih.net (OpenSMTPD) with ESMTP id 9c75bae9; Sun, 7 Jan 2018 10:55:44 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 07 Jan 2018 10:55:43 +0100 From: Emmanuel Vadot To: Kyle Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, owner-src-committers@freebsd.org Subject: Re: svn commit: r327665 - head/sys/dev/extres/syscon Organization: Bidouilliste In-Reply-To: <201801070219.w072Jsx2085251@repo.freebsd.org> References: <201801070219.w072Jsx2085251@repo.freebsd.org> Message-ID: X-Sender: manu@bidouilliste.com User-Agent: Roundcube Webmail/1.1.1 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Sun, 07 Jan 2018 09:55:48 -0000 On 2018-01-07 03:19, Kyle Evans wrote: > Author: kevans > Date: Sun Jan 7 02:19:54 2018 > New Revision: 327665 > URL: https://svnweb.freebsd.org/changeset/base/327665 > > Log: > Fix bogus pass for syscon_generic introduced in r327621 > > ian@ pointed out that BUS_PASS_DEFAULT + $anything is bogus, given > that > BUS_PASS_DEFAULT is defined as __INT_MAX. Instead, we take a page out > of > imx6_usbphy's book and use BUS_PASS_DEFAULT - 1000 to achieve the > desired > effect of syscon_generic attaching before if_awg and other potential > consumers, but late enough that more specialized implementations > should have > no problem attaching instead. > > Reported by: ian > > Modified: > head/sys/dev/extres/syscon/syscon_generic.c > > Modified: head/sys/dev/extres/syscon/syscon_generic.c > ============================================================================== > --- head/sys/dev/extres/syscon/syscon_generic.c Sun Jan 7 01:08:10 > 2018 (r327664) > +++ head/sys/dev/extres/syscon/syscon_generic.c Sun Jan 7 02:19:54 > 2018 (r327665) > @@ -206,6 +206,11 @@ static device_method_t syscon_generic_dmethods[] = > { > DEFINE_CLASS_0(syscon_generic, syscon_generic_driver, > syscon_generic_dmethods, > sizeof(struct syscon_generic_softc)); > static devclass_t syscon_generic_devclass; > +/* > + * syscon_generic needs to attach before other devices that may > require it, such > + * as if_awg, but later than others to give way for more specialized > syscon > + * implementations. > + */ I think that the comment should be more generic, syscon_generic will only be match for the "syscon" compatible, if a driver needs to attach at a specific pass, it should be subclassed and use the other compatible in the node. All the syscon node I've seen always have a specific compatible and a fallback to "syscon". > EARLY_DRIVER_MODULE(syscon_generic, simplebus, syscon_generic_driver, > - syscon_generic_devclass, 0, 0, BUS_PASS_DEFAULT + > BUS_PASS_ORDER_FIRST); > + syscon_generic_devclass, 0, 0, BUS_PASS_DEFAULT - 1000); > MODULE_VERSION(syscon_generic, 1); -- Emmanuel Vadot