]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
if_iwm - Move iwm_read_firmware() call into iwm_attach().
authorKyle Evans <kevans@FreeBSD.org>
Thu, 24 Jan 2019 03:42:23 +0000 (03:42 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Thu, 24 Jan 2019 03:42:23 +0000 (03:42 +0000)
commit544b40d85ed25e5a8f6367b2c065e879d6fd13b0
treefeffe96e3291aa9bdc8dd4fbf168ae9ba472a2f2
parentaa0972c6ceaca46abe4e5b3f6fe250bd21b1127d
if_iwm - Move iwm_read_firmware() call into iwm_attach().

* We should load the firmware exactly once before the driver really
initializes the hardware the first time, and unload it at detach time.
There is no need to retrieve the firmware during execution of
iwm_mvm_load_ucode_wait_alive(), we should make sure we already have the
firmware data at hand before that.

* The existing sc_preinit_hook code fails to deal with the case where
if_iwm is loaded by the loader (or is statically linked) and the
firmware needs to be loaded from disk. So we can just call
iwm_read_firmware() from iwm_attach() directly.

* A separate solution will have to be added to properly defer the firmware
loading during bootup, until the necessary filesystem is mounted.

Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku)
Obtained from: DragonFlyBSD (0104ee1f4cb6a2313c00c2526c6ae98d42e5041d)
sys/dev/iwm/if_iwm.c
sys/dev/iwm/if_iwmvar.h