Page MenuHomeFreeBSD

iwlwifi: avoid (hard) hang on loading module
ClosedPublic

Authored by bz on Dec 8 2024, 8:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 5, 9:58 PM
Unknown Object (File)
Sun, Jan 5, 8:22 AM
Unknown Object (File)
Tue, Dec 31, 9:07 AM
Unknown Object (File)
Dec 15 2024, 5:59 PM
Unknown Object (File)
Dec 15 2024, 2:05 PM
Unknown Object (File)
Dec 9 2024, 2:53 PM
Unknown Object (File)
Dec 9 2024, 5:07 AM

Details

Summary

For certain users or chipsets (reports were for CNVi devices but
we are ot sure if this is limited or specific to them) loading
if_iwlwifi hangs.

The reason for this is that a SYSINIT (module_load_order()) has not
yet run in this case and the Linux driver tries to load the
chipsets-specific module. On FreeBSD all supported sub-modules are
part of if_iwlwifi so we do not have to load them separately but
calling into kern_kldload via LinuxKPI request_module while loading
the module gives us a hard hang.

iwlwifi calls request_module_nowait() so we can simply skip over this
and continue and the SYSINIT will do the job later if no other
dependencies fail.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
PR: 282789

Test Plan

I cannot really test this as with no hardware avail I am
running into this case.

So putting the patch out (with the bootverbose check disabled;
should be put in before committing) so the affected users
can test.

Changing other orders (an alternate solution) requires more
shuffling around in the driver and runs into more dependency
issues, so that option was abandoned.

Diff Detail

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

Event Timeline

bz requested review of this revision.Dec 8 2024, 8:33 PM
This revision was not accepted when it landed; it landed in state Needs Review.Dec 9 2024, 2:47 PM
This revision was automatically updated to reflect the committed changes.