aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Meloun <mmel@FreeBSD.org>2026-09-26 07:23:52 +0000
committerMichal Meloun <mmel@FreeBSD.org>2026-09-26 08:30:42 +0000
commit12c3004129466634cbe5c34a1049dc0d5ecdff3b (patch)
tree2b3dcbcdbc364b3c71ed18b13596867b02e15b9f
parent22039031a15238c69497bbd9d8dea3cd97ee6bc6 (diff)
dpaa2: Don't return simplebus devinfo for a non-simplebus child
dpaa2_mc_simplebus_get_devinfo() must not treat the MC resource-container device as a simplebus child. Return NULL when child is sc->rcdev instead of forwarding OFW_BUS_GET_DEVINFO() for that device. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D59836
-rw-r--r--sys/dev/dpaa2/dpaa2_mc_fdt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/dev/dpaa2/dpaa2_mc_fdt.c b/sys/dev/dpaa2/dpaa2_mc_fdt.c
index a571f4cf7219..2a808948306f 100644
--- a/sys/dev/dpaa2/dpaa2_mc_fdt.c
+++ b/sys/dev/dpaa2/dpaa2_mc_fdt.c
@@ -345,6 +345,11 @@ dpaa2_mc_fdt_get_phy_dev(device_t dev, device_t *phy_dev, uint32_t id)
static const struct ofw_bus_devinfo *
dpaa2_mc_simplebus_get_devinfo(device_t bus, device_t child)
{
+ struct dpaa2_mc_softc *sc;
+
+ sc = device_get_softc(bus);
+ if (child == sc->rcdev)
+ return (NULL);
return (OFW_BUS_GET_DEVINFO(device_get_parent(bus), child));
}