The Linux firmware loader happily warns when it can't find one of the many options for firmware load (such as for the ath10k drivers), but never announces when it succeeds.
As I've been caught by misinterpreting the dmesg
output myself, I've put together a patch that should clearly indicate success as well. It has been tested against Linux 4.14. I was going to put a PR in for it, but it looks like the structure of the code has changed significantly in Linux 4.19 and its not clear to me yet what the messaging is there.
Edit: Looks like failures for non-existent file (-ENOENT, -2) are no longer warnings in Kernel 4.19. See, for example, https://elixir.bootlin.com/linux/v4.19.35/source/drivers/base/firmware_loader/main.c#L328
In the hopes that it might help someone before I can get Linux 4.19 running and further examine it, give this an appropriate file name and drop into target/linux/generic/pending-4.14/
or the like.
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -1224,9 +1224,20 @@ _request_firmware(const struct firmware
dev_warn(device, "Falling back to user helper\n");
ret = fw_load_from_user_helper(fw, name, device,
opt_flags);
- }
- } else
+ if (!ret && !(opt_flags & FW_OPT_NO_WARN)) {
+ dev_info(device,
+ "Helper firmware load for %s succeeded\n",
+ name);
+ };
+ };
+ } else {
+ if (!ret && !(opt_flags & FW_OPT_NO_WARN)) {
+ dev_info(device,
+ "Direct firmware load for %s succeeded\n",
+ name);
+ };
ret = assign_firmware_buf(fw, device, opt_flags);
+ };
out:
if (ret < 0) {
Here is an example of the output under Linux 4.14.111
[...]
[ 10.583243] ath10k 4.19 driver, optimized for CT firmware, probing pci device: 0x56.
[ 10.583952] ath10k_pci 0000:01:00.0: enabling device (0140 -> 0142)
[ 10.590661] ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[ 10.764847] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/fwcfg-pci-0000:01:00.0.txt failed with error -2
[ 10.765176] ath10k_pci 0000:01:00.0: Falling back to user helper
[ 10.812101] firmware ath10k!fwcfg-pci-0000:01:00.0.txt: firmware_loading_store: map pages failed
[ 10.812521] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
[ 10.819991] ath10k_pci 0000:01:00.0: Falling back to user helper
[ 10.935953] ath10k_pci 0000:01:00.0: Helper firmware load for ath10k/pre-cal-pci-0000:01:00.0.bin succeeded
[ 10.940175] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/ct-firmware-5.bin failed with error -2
[ 10.944587] ath10k_pci 0000:01:00.0: Falling back to user helper
[ 10.988251] firmware ath10k!QCA9888!hw2.0!ct-firmware-5.bin: firmware_loading_store: map pages failed
[ 10.988656] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/ct-firmware-2.bin failed with error -2
[ 10.996605] ath10k_pci 0000:01:00.0: Falling back to user helper
[ 11.061963] firmware ath10k!QCA9888!hw2.0!ct-firmware-2.bin: firmware_loading_store: map pages failed
[ 11.062345] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/firmware-6.bin failed with error -2
[ 11.070192] ath10k_pci 0000:01:00.0: Falling back to user helper
[ 11.127653] firmware ath10k!QCA9888!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
[ 11.434524] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/firmware-5.bin succeeded
[ 11.434604] ath10k_pci 0000:01:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
[ 11.443130] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[ 11.457814] ath10k_pci 0000:01:00.0: firmware ver 10.4b-ct-9888-fW-012-604ef8d6 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT crc32 b1e5658d
[ 11.768725] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/board-2.bin succeeded
[ 11.769078] ath10k_pci 0000:01:00.0: board_file api 2 bmi_id 0:23 crc32 b050e9d6
[ 13.798054] ath10k_pci 0000:01:00.0: 10.4 wmi init: vdevs: 16 peers: 48 tid: 96
[ 13.798098] ath10k_pci 0000:01:00.0: msdu-desc: 2500 skid: 32
[ 13.852565] ath10k_pci 0000:01:00.0: wmi print 'P 48/48 V 16 K 144 PH 176 T 186 msdu-desc: 2500 sw-crypt: 0 ct-sta: 0'
[ 13.853677] ath10k_pci 0000:01:00.0: wmi print 'free: 121760 iram: 26004 sram: 30092'
[ 14.076165] ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1
[ 14.220288] ath: EEPROM regdomain: 0x834b
[ 14.220365] ath: EEPROM indicates we should expect a country code
[ 14.220452] ath: doing EEPROM country->regdmn map search
[ 14.220542] ath: country maps to regdmn code: 0x3a
[ 14.220604] ath: Country alpha2 being used: US
[ 14.220657] ath: Regpair used: 0x3a
[...]
This does not increase the size of the kernels or builds I examined. Amusingly, it seems as though the kernel compressed better with the patch!
commit e762f5d44a (master)
kernel image
ath79 Archer C7v2 patched 1614527 4064018
ath79 Archer C7v2 stock 1614723 4064016
ar71xx Archer C7v2 patched 1589046 4063236
ar71xx Archer C7v2 stock 1589105 4063236
Yes, @chunkeey, you've gotten me off on a related tangent again.