FS#39722 - [linux] iwlwifi module not loading correct firmware

Attached to Project: Arch Linux
Opened by Mike Cloaked (mcloaked) - Wednesday, 02 April 2014, 20:29 GMT
Last edited by Thomas Bächler (brain0) - Thursday, 03 April 2014, 08:51 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: iwlwifi module does not load correct firmware file from the linux-firmware package


Additional info:
* package version(s)
core/linux-firmware 20140316.dec41bc-1
kernel - 3.13.8-1-ARCH
* config and/or log files etc.


Steps to reproduce:

Ensure latest kernel and linux-firmware are installed.

Then check as follows:

# pacman -Ss linux-firmware
core/linux-firmware 20140316.dec41bc-1 [installed]
Firmware files for Linux
# ls /lib/firmware/iwlwifi*
/lib/firmware/iwlwifi-1000-3.ucode /lib/firmware/iwlwifi-5000-2.ucode
/lib/firmware/iwlwifi-1000-5.ucode /lib/firmware/iwlwifi-5000-5.ucode
/lib/firmware/iwlwifi-100-5.ucode /lib/firmware/iwlwifi-5150-2.ucode
/lib/firmware/iwlwifi-105-6.ucode /lib/firmware/iwlwifi-6000-4.ucode
/lib/firmware/iwlwifi-135-6.ucode /lib/firmware/iwlwifi-6000g2a-5.ucode
/lib/firmware/iwlwifi-2000-6.ucode /lib/firmware/iwlwifi-6000g2a-6.ucode
/lib/firmware/iwlwifi-2030-6.ucode /lib/firmware/iwlwifi-6000g2b-5.ucode
/lib/firmware/iwlwifi-3160-7.ucode /lib/firmware/iwlwifi-6000g2b-6.ucode
/lib/firmware/iwlwifi-3160-8.ucode /lib/firmware/iwlwifi-6050-4.ucode
/lib/firmware/iwlwifi-3945-2.ucode /lib/firmware/iwlwifi-6050-5.ucode
/lib/firmware/iwlwifi-4965-2.ucode /lib/firmware/iwlwifi-7260-7.ucode
/lib/firmware/iwlwifi-5000-1.ucode /lib/firmware/iwlwifi-7260-8.ucode
# modinfo iwlwifi | grep firmware
firmware: iwlwifi-100-5.ucode
firmware: iwlwifi-1000-5.ucode
firmware: iwlwifi-135-6.ucode
firmware: iwlwifi-105-6.ucode
firmware: iwlwifi-2030-6.ucode
firmware: iwlwifi-2000-6.ucode
firmware: iwlwifi-5150-2.ucode
firmware: iwlwifi-5000-5.ucode
firmware: iwlwifi-6000g2b-6.ucode
firmware: iwlwifi-6000g2a-5.ucode
firmware: iwlwifi-6050-5.ucode
firmware: iwlwifi-6000-4.ucode
firmware: iwlwifi-3160-7.ucode
firmware: iwlwifi-7260-7.ucode
parm: fw_restart:restart firmware in case of error (default true) (bool)

So in /lib/firmware there are several files for which there are two versions, but in the module not always the latest is loaded!

7260 is the older one, 3160 also, 6000g2a-5 also - but some are OK.

This presents problems with wireless functionality with bugs due to the older version still apparent despite installing the latest linux-firmware package.
This task depends upon

Closed by  Thomas Bächler (brain0)
Thursday, 03 April 2014, 08:51 GMT
Reason for closing:  Not a bug
Comment by Gene (GeneC) - Wednesday, 02 April 2014, 22:25 GMT
I have the same issue - doesn't go away with 3.14 kernel either.
I checked the 3.14 testing kernel config in case it revealed anything of interest:

% egrep -i IWL .config
CONFIG_IWLWIFI=m
CONFIG_IWLDVM=m
CONFIG_IWLMVM=m
CONFIG_IWLWIFI_OPMODE_MODULAR=y
# CONFIG_IWLWIFI_DEBUG is not set
CONFIG_IWLWIFI_DEVICE_TRACING=y
CONFIG_IWLEGACY=m
CONFIG_IWL4965=m
CONFIG_IWL3945=m
Comment by Mike Cloaked (mcloaked) - Thursday, 03 April 2014, 08:46 GMT
I have added a comment at the kernel bug at https://bugzilla.kernel.org/show_bug.cgi?id=72601
Comment by Thomas Bächler (brain0) - Thursday, 03 April 2014, 08:50 GMT
This is from the kernel log.

[ 7.034152] iwlwifi 0000:03:00.0: loaded firmware version 22.24.8.0 op_mode iwlmvm

Quote from https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/tree/WHENCE#n809:

File: iwlwifi-7260-7.ucode
Version: 22.1.7.0

File: iwlwifi-7260-8.ucode
Version: 22.24.8.0

So, it actually loads the -8.ucode.

In fact, iwl-7000.c in the kernel source says

/* Highest firmware API version supported */
#define IWL7260_UCODE_API_MAX 8
#define IWL3160_UCODE_API_MAX 8

/* Oldest version we won't warn about */
#define IWL7260_UCODE_API_OK 7
#define IWL3160_UCODE_API_OK 7

/* Lowest firmware API version supported */
#define IWL7260_UCODE_API_MIN 7
#define IWL3160_UCODE_API_MIN 7

Then the driver adds the "OK" version as a string to the module, so it is visible to you in that list.
MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK));

It is debatable what information to provide when the driver does not need all firmware files, but chooses a suitable one based on hardware and availability. Maybe one should list all of them, or only the latest. Intel chooses to list the oldest usable one. Anyway, none of this is a bug.

Loading...