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)
Wed, Dec 18, 12:22 AM
Unknown Object (File)
Tue, Dec 10, 7:21 AM
Unknown Object (File)
Mon, Dec 2, 3:43 PM
Unknown Object (File)
Mon, Dec 2, 1:28 AM
Unknown Object (File)
Nov 25 2024, 5:12 PM
Unknown Object (File)
Nov 21 2024, 8:05 PM
Unknown Object (File)
Nov 11 2024, 2:56 AM
Unknown Object (File)
Oct 31 2024, 4:34 PM
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.