Page MenuHomeFreeBSD

Integrate bhnd(4) and bhnd-based if_bwn_pci.
ClosedPublic

Authored by landon_landonf.org on May 3 2016, 6:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 23 2024, 11:58 AM
Unknown Object (File)
Dec 20 2023, 12:47 AM
Unknown Object (File)
Nov 30 2023, 1:08 PM
Unknown Object (File)
Nov 9 2023, 9:37 AM
Unknown Object (File)
Nov 9 2023, 12:24 AM
Unknown Object (File)
Nov 8 2023, 8:50 PM
Unknown Object (File)
Nov 7 2023, 10:26 AM
Unknown Object (File)
Oct 31 2023, 6:20 PM
Subscribers

Details

Summary

This adds the full suite of man pages (bhnd.4, bcma.4,
and updated siba.4), kernel configuration options (bhnd,
bhndbus, etc), and inclusion of bhnd modules in the standard
kernel build.

Additionally, this adds a bhnd(4)-based if_bwn_pci module,
which will match (BUS_PROBE_LOW_PRIORITY) devices supported
by the current bwn(4), as well as newer bcma(4)-based devices.

For all devices supported by the existing if_bwn driver, the
bhnd(4)-based driver will return a lower probe priority unless
hw.bwn_pci.preferred is set.

This should reduce everyone's merge/integration workload on
bhnd(4)-based driver and platform (e.g. MIPS SoC) bring-up.

Test Plan

On a system with a bwn(4)-supported WiFi chipset:

  • kldload if_bwn_pci
  • verify that it *does not* attach to the device
  • set hw.bwn_pci.preferred tunable.
  • kldload if_bwn_pci
  • verify that it *does* attach to the device.

On a system with a newer chipset supported only by the new
bhnd(4)-based driver (e.g. BCM4331):

  • kldload if_bwn_pci
  • verify that it *does* attach to the device.

Diff Detail

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

Event Timeline

landon_landonf.org retitled this revision from to Integrate bhnd(4) and bhnd-based if_bwn_pci..
landon_landonf.org updated this object.
landon_landonf.org edited the test plan for this revision. (Show Details)
landon_landonf.org added a reviewer: adrian.
landon_landonf.org edited edge metadata.

Fix merge issue in device match table.

mizhka added inline comments.
sys/conf/files
1115–1138 ↗(On Diff #15864)

Hi,

The mapping looks very complex.

For instance, bhnd wo bcma & siba is not a case. May be it's worth to merge bcma+siba+bhnd to bhnd.

I suppose that "bhndbus" is like "all inclusive". If bcma / siba will be replaced by bhnd, bhndbus will be simple combination of bhnd and bhndb and can be also removed.

sys/conf/files
1115–1138 ↗(On Diff #15864)

Hey Mizhka,

My goal with separating things into bcma, siba, and bhnd was to support building smaller SoC-targeted kernels; if you know your SoC only has bcma devices attached, you can save a bit of space by excluding siba entirely, and vis versa.

This also applies to the core drivers; since not all SoCs include all of the cores in question, giving them individual toggles should allow for a smaller kernel.

The bhnd vs bhndbus split is modeled on the mii and miibus configuration options; bhnd only brings in the generic bhnd support, whereas bhndbus incorporates everything; all of the core drivers, the bcma and siba implementations, etc.

On desktop machines (and generic Broadcom SoC configurations meant to target multiple devices), I'd expect bhndbus to be used more often than the individual options.

As you noted, bhnd isn't useful without also providing a concrete bus driver (currently one of siba or bcma), but there's no mechanism to enforce that via config(8), and it's also the case that someone could locally supply a concrete bhnd bus driver other than the included two.

This revision was automatically updated to reflect the committed changes.