Page MenuHomeFreeBSD

Implement bhnd(4) platform device registration.
ClosedPublic

Authored by landonf on Sep 16 2017, 4:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 5:12 PM
Unknown Object (File)
Thu, Nov 21, 8:05 PM
Unknown Object (File)
Mon, Nov 11, 2:56 AM
Unknown Object (File)
Thu, Oct 31, 4:34 PM
Unknown Object (File)
Thu, Oct 31, 11:56 AM
Unknown Object (File)
Oct 9 2024, 12:59 PM
Unknown Object (File)
Sep 25 2024, 10:59 AM
Unknown Object (File)
Sep 25 2024, 5:04 AM
Subscribers
None

Details

Summary

Add bhnd(4) API for explicitly registering BHND platform devices with the bus, rather than walking the newbus hierarchy to discover platform devices (ChipCommon, PMU, NVRAM, etc). These devices are now also refcounted; attempting to deregister an actively used platform device will return EBUSY.

This resolves a lock ordering issue with bwn(4)'s firmware loading threads; previously it was necessary to acquire Giant to protect newbus access when locating and querying the NVRAM device.

Test Plan

Tested for regressions against both Broadcom MIPS SoCs and Wi-Fi chipsets.

Diff Detail

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

Event Timeline

Adopt a non-sleepable lock for the bhnd_service_registry; this allows use of
bhnd_service_registry_retain() while holding either an unbounded or bounded
sleep lock.

This revision is now accepted and ready to land.Sep 27 2017, 1:50 AM
This revision was automatically updated to reflect the committed changes.