Page MenuHomeFreeBSD

simplebus pnp: Do not generate pnp info is the bus status is not okay
ClosedPublic

Authored by manu on Jun 12 2018, 6:09 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 3:14 PM
Unknown Object (File)
Jan 10 2024, 12:00 AM
Unknown Object (File)
Dec 12 2023, 12:35 AM
Unknown Object (File)
Nov 4 2023, 5:55 AM
Unknown Object (File)
Oct 25 2023, 6:22 PM
Unknown Object (File)
Oct 19 2023, 12:26 PM
Unknown Object (File)
Sep 22 2023, 5:00 AM
Unknown Object (File)
Aug 31 2023, 2:33 AM
Subscribers
None

Details

Summary

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.

Test Plan

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

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

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This is somewhat a dangerous change. However, it's the best change we can have given our current use of ofs_bus_status_okay().

This revision is now accepted and ready to land.Jun 12 2018, 7:53 PM
This revision was automatically updated to reflect the committed changes.