git: 41e85e8e35e9 - main - dpaa: Don't probe disabled devices

From: Justin Hibbits <jhibbits_at_FreeBSD.org>
Date: Sun, 27 Nov 2022 00:43:30 UTC
The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=41e85e8e35e98af3f2f8032b57774eb3489ff45c

commit 41e85e8e35e98af3f2f8032b57774eb3489ff45c
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2022-11-27 00:45:37 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2022-11-27 00:45:37 +0000

    dpaa: Don't probe disabled devices
    
    Probing disabled devices just adds noise.
---
 sys/dev/dpaa/fman_fdt.c     | 3 +++
 sys/dev/dpaa/if_dtsec_fdt.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/sys/dev/dpaa/fman_fdt.c b/sys/dev/dpaa/fman_fdt.c
index b6234179b382..a3888d91b8a0 100644
--- a/sys/dev/dpaa/fman_fdt.c
+++ b/sys/dev/dpaa/fman_fdt.c
@@ -72,6 +72,9 @@ static int
 fman_fdt_probe(device_t dev)
 {
 
+	if (!ofw_bus_status_okay(dev))
+		return (ENXIO);
+
 	if (!ofw_bus_is_compatible(dev, "fsl,fman"))
 		return (ENXIO);
 
diff --git a/sys/dev/dpaa/if_dtsec_fdt.c b/sys/dev/dpaa/if_dtsec_fdt.c
index 1ab331caf0d1..179d620fcc3b 100644
--- a/sys/dev/dpaa/if_dtsec_fdt.c
+++ b/sys/dev/dpaa/if_dtsec_fdt.c
@@ -98,6 +98,9 @@ static int
 dtsec_fdt_probe(device_t dev)
 {
 
+	if (!ofw_bus_status_okay(dev))
+		return (ENXIO);
+
 	if (!ofw_bus_is_compatible(dev, "fsl,fman-dtsec") &&
 	    !ofw_bus_is_compatible(dev, "fsl,fman-xgec"))
 		return (ENXIO);