Page MenuHomeFreeBSD

Implement bhnd(4) platform device registration.
ClosedPublic

Authored by landonf on Sep 16 2017, 4:06 AM.
Tags
None
Referenced Files
F81922782: D12392.id.diff
Tue, Apr 23, 5:57 AM
F81921690: D12392.id.diff
Tue, Apr 23, 5:31 AM
F81921593: D12392.id33145.diff
Tue, Apr 23, 5:29 AM
F81921581: D12392.id33145.diff
Tue, Apr 23, 5:29 AM
F81921306: D12392.diff
Tue, Apr 23, 5:23 AM
Unknown Object (File)
Mar 19 2024, 5:27 PM
Unknown Object (File)
Mar 1 2024, 7:00 AM
Unknown Object (File)
Feb 21 2024, 2:46 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.