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)
Oct 5 2024, 1:59 PM
Unknown Object (File)
Oct 5 2024, 7:06 AM
Unknown Object (File)
Oct 2 2024, 2:11 PM
Unknown Object (File)
Oct 1 2024, 4:07 PM
Unknown Object (File)
Sep 26 2024, 3:21 PM
Unknown Object (File)
Sep 25 2024, 5:26 AM
Unknown Object (File)
Sep 21 2024, 5:55 AM
Unknown Object (File)
Sep 19 2024, 5:04 AM
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.