HomeFreeBSD

newbus: Create a knob to disable devices that fail to attach.

Description

newbus: Create a knob to disable devices that fail to attach.

Normally, when a device fails to attach, we tear down the newbus state
for that device so that future driver loads can try again (maybe with a
different driver, or maybe with a re-loaded and fixed kld).

Sometimes, however, it is desirable to have the device fail
permanantly. We do this by calling device_disable() on a failed
attached, as well as keeping the device in DS_ATTACHING forever. This
prevents retries on that device. This is enabled via
hw.bus.disable_failed_devices=1 in either a hint via the loader, or at
runtime with a sysctl setting. Setting from 1 -> 0 at runtime will not
affect previously disabled devices, however: they remain disabled.
They can be re-enabled manually with devctl enable, however.

Sponsored by: Netflix

Reviewed by: gallatin, hselasky, jhb
Differential Revision: https://reviews.freebsd.org/D37517

Details

Provenance
impAuthored on Dec 4 2022, 11:20 PM
Reviewer
gallatin
Differential Revision
D37517: newbus: Create a knob to disable devices that fail to attach.
Parents
rG9f7269677c5e: kboot: Add md_addr to metadata
Branches
Unknown
Tags
Unknown