Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2018 01:56:52 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339632 - head/sys/dev/dpaa
Message-ID:  <201810230156.w9N1uqeo069016@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Tue Oct 23 01:56:52 2018
New Revision: 339632
URL: https://svnweb.freebsd.org/changeset/base/339632

Log:
  dpaa: Mark BMan and QMan as earlier driver modules
  
  The BMan softc must exist when dtsec devices are created, else a NULL
  pointer is dereferenced.  QMan likely as well.  Until now, we have relied on
  order within the fdt parsing to attach correctly, but this obviously is not
  foolproof.  Mark these as BUS_PASS_SUPPORTDEV so they're probed and attached
  explicitly before dtsec devices.

Modified:
  head/sys/dev/dpaa/bman_fdt.c
  head/sys/dev/dpaa/qman_fdt.c

Modified: head/sys/dev/dpaa/bman_fdt.c
==============================================================================
--- head/sys/dev/dpaa/bman_fdt.c	Tue Oct 23 01:42:43 2018	(r339631)
+++ head/sys/dev/dpaa/bman_fdt.c	Tue Oct 23 01:56:52 2018	(r339632)
@@ -68,7 +68,8 @@ static driver_t bman_driver = {
 };
 
 static devclass_t bman_devclass;
-DRIVER_MODULE(bman, simplebus, bman_driver, bman_devclass, 0, 0);
+EARLY_DRIVER_MODULE(bman, simplebus, bman_driver, bman_devclass, 0, 0,
+    BUS_PASS_SUPPORTDEV);
 
 static int
 bman_fdt_probe(device_t dev)

Modified: head/sys/dev/dpaa/qman_fdt.c
==============================================================================
--- head/sys/dev/dpaa/qman_fdt.c	Tue Oct 23 01:42:43 2018	(r339631)
+++ head/sys/dev/dpaa/qman_fdt.c	Tue Oct 23 01:56:52 2018	(r339632)
@@ -68,7 +68,8 @@ static driver_t qman_driver = {
 };
 
 static devclass_t qman_devclass;
-DRIVER_MODULE(qman, simplebus, qman_driver, qman_devclass, 0, 0);
+EARLY_DRIVER_MODULE(qman, simplebus, qman_driver, qman_devclass, 0, 0,
+    BUS_PASS_SUPPORTDEV);
 
 static int
 qman_fdt_probe(device_t dev)



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