Date: Tue, 12 Jun 2018 20:03:00 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335014 - head/sys/dev/ofw Message-ID: <201806122003.w5CK30Lx001653@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Tue Jun 12 20:03:00 2018 New Revision: 335014 URL: https://svnweb.freebsd.org/changeset/base/335014 Log: simplebus pnp: Do not generate pnp info is the bus status is not okay Generating the pnp info have the side effect to include all nodes even if the status isn't "okay". That means that loading the module will load but not attach as it checks the status in the probe function. On pine64 before : root@pine64-lts:~ # devmatch -u unattached on ofwbus pnpinfo name=memory unattached on ofwbus pnpinfo name=chosen unattached on ofwbus pnpinfo name=sound_spdif compat=simple-audio-card unattached on ofwbus pnpinfo name=spdif-out compat=linux,spdif-dit unattached on simplebus pnpinfo name=dma-controller@1c02000 compat=allwinner,sun50i-a64-dma unattached on simplebus pnpinfo name=mmc@1c10000 compat=allwinner,sun50i-a64-mmc unattached on simplebus pnpinfo name=usb@1c19000 compat=allwinner,sun8i-a33-musb unattached on simplebus pnpinfo name=spdif@1c21000 compat=allwinner,sun50i-a64-spdif unattached on simplebus pnpinfo name=i2s@1c22000 compat=allwinner,sun50i-a64-i2s unattached on simplebus pnpinfo name=i2s@1c22400 compat=allwinner,sun50i-a64-i2s unattached on simplebus pnpinfo name=serial@1c28400 compat=snps,dw-apb-uart unattached on simplebus pnpinfo name=serial@1c28800 compat=snps,dw-apb-uart unattached on simplebus pnpinfo name=serial@1c28c00 compat=snps,dw-apb-uart unattached on simplebus pnpinfo name=serial@1c29000 compat=snps,dw-apb-uart unattached on simplebus pnpinfo name=i2c@1c2ac00 compat=allwinner,sun6i-a31-i2c unattached on simplebus pnpinfo name=i2c@1c2b000 compat=allwinner,sun6i-a31-i2c unattached on simplebus pnpinfo name=i2c@1c2b400 compat=allwinner,sun6i-a31-i2c unattached on ofwbus pnpinfo name=aliases unattached on ofwbus pnpinfo name=symbols All simplebus node are disabled After : root@pine64-lts:~ # devmatch -u unattached on ofwbus pnpinfo name=memory unattached on ofwbus pnpinfo name=chosen unattached on ofwbus pnpinfo name=sound_spdif compat=simple-audio-card unattached on ofwbus pnpinfo name=spdif-out compat=linux,spdif-dit unattached on simplebus pnpinfo name=dma-controller@1c02000 compat=allwinner,sun50i-a64-dma unattached on simplebus pnpinfo name=usb@1c19000 compat=allwinner,sun8i-a33-musb unattached on ofwbus pnpinfo name=aliases unattached on ofwbus pnpinfo name=symbols Reviewed by: imp (with some objection) Differential Revision: https://reviews.freebsd.org/D15770 Modified: head/sys/dev/ofw/ofw_bus_subr.c Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Tue Jun 12 19:50:33 2018 (r335013) +++ head/sys/dev/ofw/ofw_bus_subr.c Tue Jun 12 20:03:00 2018 (r335014) @@ -91,6 +91,9 @@ ofw_bus_gen_child_pnpinfo_str(device_t cbdev, device_t { *buf = '\0'; + if (!ofw_bus_status_okay(child)) + return (0); + if (ofw_bus_get_name(child) != NULL) { strlcat(buf, "name=", buflen); strlcat(buf, ofw_bus_get_name(child), buflen); @@ -100,6 +103,7 @@ ofw_bus_gen_child_pnpinfo_str(device_t cbdev, device_t strlcat(buf, " compat=", buflen); strlcat(buf, ofw_bus_get_compat(child), buflen); } + return (0); };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806122003.w5CK30Lx001653>