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)
Thu, Dec 12, 7:14 PM
Unknown Object (File)
Tue, Dec 3, 10:08 PM
Unknown Object (File)
Nov 17 2024, 6:16 PM
Unknown Object (File)
Nov 5 2024, 12:35 AM
Unknown Object (File)
Oct 29 2024, 4:51 PM
Unknown Object (File)
Oct 28 2024, 10:07 PM
Unknown Object (File)
Oct 27 2024, 6:01 AM
Unknown Object (File)
Oct 10 2024, 3:48 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.