Page MenuHomeFreeBSD

Migrate bhndb(4) to the new bhnd_erom API.
ClosedPublic

Authored by landonf on Sep 3 2016, 2:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 10:54 PM
Unknown Object (File)
Fri, Nov 8, 4:25 PM
Unknown Object (File)
Mon, Nov 4, 1:29 PM
Unknown Object (File)
Oct 24 2024, 1:24 AM
Unknown Object (File)
Oct 10 2024, 11:54 PM
Unknown Object (File)
Oct 2 2024, 8:44 AM
Unknown Object (File)
Sep 25 2024, 10:59 AM
Unknown Object (File)
Sep 23 2024, 8:21 AM
Subscribers

Details

Summary

This adds support for probing and initializing bhndb(4) bridge state using
the bhnd_erom API, ensuring that full bridge configuration is available
*prior* to actually attaching and enumerating the bhnd(4) child device,
allowing us to safely allocate bus-level agent/device resources during bhnd(4)
bus enumeration (as required for bhnd(4) interrupt handling).

Changes:

  • Add a bhnd_erom_probe() method usable by bhndb(4). This is an analogue to the existing bhnd_erom_probe_static() method, and allows the bhndb bridge to discover the best available erom parser class prior to newbus probing of its children.
  • Add support for supplying identification hints when probing erom devices. This is required on early EXTIF-only chipsets, where chip identification registers are not available.
  • Migrate bhndb over to the new bhnd_erom API, using bhnd_core_info records rather than bridged bhnd(4) device_t references to determine the bridged chipsets' capability/bridge configuration.
  • We now require that the bhndb parent (e.g. if_bwn) supply a hardware priority table to the bridge. The default table is currently sufficient for our supported devices.
  • Drop the two-pass attach approach we used for compatibility with bhndb(4) in the bhnd(4) bus drivers, and instead perform bus enumeration immediately, and allocate bridged per-child bus-level resources during that enumeration.

Depends on D7748

Test Plan

Verified that platform/bus enumeration executes successfully on:

  • BCM43225 (wifi/bcma)
  • BCM4312 (wifi/siba)
  • BCM4716 (mips/bcma)
  • BCM5357 (mips/bcma)
  • BCM5365 (mips/siba)

Diff Detail

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

Event Timeline

landonf retitled this revision from to Migrate bhndb(4) to the new bhnd_erom API..
landonf updated this object.
landonf edited the test plan for this revision. (Show Details)
landonf added reviewers: adrian, mizhka.
adrian edited edge metadata.
This revision is now accepted and ready to land.Sep 3 2016, 4:29 AM
This revision was automatically updated to reflect the committed changes.