HomeFreeBSD

MFC: mii: include missing sources in loadable module

Description

MFC: mii: include missing sources in loadable module

As of today, using 'kldload miibus' is not equivalent to using 'device
miibus' in a kernel config. Newly introduced PHY drivers (DP83822,
DP83867, VSCPHY) and source files/PHY driver for FDT-enabled kernels
are missing. Without including them, kernel modules using any function
from dev/mii/mii_fdt.c refuse to load. Additionally, miivar.h directly
includes opt_platform.h.

Add the missing sources to the module build, with the FDT-only files
gated behind an OPT_FDT check. Maintain the alphabetical listing of
SRCS, but move the required header files to a separate line to improve
readability.

Reviewed by: mhorne, mindal@semihalf.com
Differential Revision: https://reviews.freebsd.org/D34256

(cherry picked from commit 517ea731d4e803450537e9369d6a16aa4081acd7)

Details

Provenance
bsd_dino.skAuthored on Apr 2 2022, 6:28 PM
eugen_grosbein.netCommitted on Apr 16 2022, 7:18 PM
Reviewer
mhorne
Differential Revision
D34256: Make miibus.ko module on par with using 'device miibus' in kernel config
Parents
rGab7456d72afa: MFC: modules: mgb: need opt_platform.h
Branches
Unknown
Tags
Unknown