Page MenuHomeFreeBSD

rtw88: Add bus attachments to the module Makefile
ClosedPublic

Authored by bz on Sat, Jan 31, 8:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Feb 17, 7:26 PM
Unknown Object (File)
Mon, Feb 16, 2:35 AM
Unknown Object (File)
Sun, Feb 15, 2:18 PM
Unknown Object (File)
Sun, Feb 15, 12:13 AM
Unknown Object (File)
Fri, Feb 13, 12:54 PM
Unknown Object (File)
Tue, Feb 10, 12:54 AM
Unknown Object (File)
Sun, Feb 8, 2:35 AM
Unknown Object (File)
Sun, Feb 1, 7:10 PM
Subscribers
None

Details

Summary

In addition to PCIe we now support USB and also prepare for SDIO (still
disabled locally). The module SRCS are split up into a common part,
which we always add. All three bus parts are guarded by a local "WITH"
variable in the Makefile.
In addition the PCI parts require PCI to be compiled into the kernel.
We add that check in case of, e.g., SoCs with SDIO but no PCI, which
may not have PCI in the kernel config and thus the module would fail
to attach.
USB has no additional check as it is fully loadable and does not have
to be in a kernel config.
SDIO depends on an MMCCAM-enabled kernel but is otherwise laodable.

While we could, we are not splitting the various bus attachments into
individual modules as we generally do not do that in FreeBSD. [1]

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Discussed with: imp and jhb (2022, 2024), see also 17732dd8f01b [1]

Test Plan

review just for the build time checks for the bus parts.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Sat, Jan 31, 8:05 PM
bz created this revision.

@jhb @imp Are the two bus attachment .if checks here with ${KERN_OPTS:..} as you were thinking/expect? If that is all right I am good wit this. You can just leave a comment. No need to accept.

I didn't notice before, but all the variables starting with WITH could collide with future options. Why'd you use those named?

In D55022#1261005, @imp wrote:

I didn't notice before, but all the variables starting with WITH could collide with future options. Why'd you use those named?

Felt natural. Were local only.

I'll change them to RTW88_FOO . Or WITH_RTW88_FOO ? Likely should do the same for iwlwifi and rtw89 (and mt76) too. I'll make that a separate pass.

The question remains about the compile time magic got KERN_OPTS as expected?

If no one complains within the next 48 hours that I got the KERN_OPTS bits wrong, then I'll get things in.

I will do a full pass over multiple Makefiles once they are in and cleanup all the WITH_* stuff removing possible future conflicts. But I have 6? drivers either in tree or with updates queued all with the same concept. Doing it as one cleanup will be a lot easier than 6 individual ones.

In D55022#1261876, @bz wrote:

If no one complains within the next 48 hours that I got the KERN_OPTS bits wrong, then I'll get things in.

I will do a full pass over multiple Makefiles once they are in and cleanup all the WITH_* stuff removing possible future conflicts. But I have 6? drivers either in tree or with updates queued all with the same concept. Doing it as one cleanup will be a lot easier than 6 individual ones.

That works. We should chat about the cleanup when you're ready.

This revision was not accepted when it landed; it landed in state Needs Review.Tue, Feb 10, 10:17 AM
This revision was automatically updated to reflect the committed changes.