Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jan 2018 02:19:54 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r327665 - head/sys/dev/extres/syscon
Message-ID:  <201801070219.w072Jsx2085251@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.
+ */
 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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801070219.w072Jsx2085251>