HomeFreeBSD

iwmbtfw: Check firmware exists before trying to upload it

Description

iwmbtfw: Check firmware exists before trying to upload it

In the case of an Intel 7260 device, the device needs to be put
into something called "manufacturer mode" before the firmware
is uploaded. The firmware is then upladed, and the card is
taken out of this mode, at which point it disconnects and
reconnects to the USB bus, and is at that point usable.

However, iwmbtfw(8) puts the device into manufacturer mode
before verifying that there exists a copy of the firmware to
upload. As a result, in the case where there is no firmware
available on disk, the device is put into manufacturer mode,
the firmware can't be found so isn't uploaded, and the card is
brought out of manufacturer mode, so it disconnects and
reconnects to the USB bus.

Enter devd(8). There are rules in /etc/devd/iwmbtfw.conf to
call iwmbtfw(8) when the device appears. When there's no
firmware on disk, devd will call iwmbtfw, iwmbtfw will try to
do its thing and fail, the device will dis/reconnect, and devd
will notice the device reappear and start the whole loop again.

Fix is to verify that the firmware exists before putting the device into
its special mode. The fix only changes things for the 7260 and not the
other chips supported, I don't believe the issue exists with other chips
as those do not need to be switched into manufacturer mode before
uploading.

PR: 283896
Reviewed by: emaste

Details

Provenance
gavinAuthored on Tue, Jan 7, 12:02 AM
emasteCommitted on Fri, Jan 17, 4:11 PM
Parents
rGd7df65349960: iwm: add sku_cap_mimo_disable; populate sku_cap_11n_enable
Branches
Unknown
Tags
Unknown