Firmware loading code inherited from iwm(4) loads firmware twice:
Once to load the 'INIT' (boot) device firmware, and a second time
to load the RT (run-time) device firmware. Both of these firmware
images are part of the single firmware file in /etc/firmware.

With iwx(4) devices only a single load is required. Double-loading the
firmware seems to be the reason for various fatal firmware errors.

The older -46 firmware we currently use works to some extent anyway,
which is why this problem wasn't obvious at all and took quite a
while to track down.

The -48 version of the firmware was extremely unhappy and just went
into fatal firmware error mode as soon as the driver tried to send
a frame. I have that firmware version working locally now with this
change and some additional fixes.

With this change regulatory domain updates start appearing on both
firmware versions. Which suggests that we never actually had the
firmware running in a fully operational state before.
I have already sent another patch which adds support for these
regulatory domain notifications.

ok?
 
diff 3387c0fc20f29323f58bb3abae4a685d2cca4969 
593cf89bed2f9f27ccf55d4cebf8aa65c36c7bb1
blob - eaad5ad73abbd1d25eb5895de88cf48e731abfcc
blob + bb81a869c36b13d7bf5cb7c037a4c023d9baf6d0
--- sys/dev/pci/if_iwx.c
+++ sys/dev/pci/if_iwx.c
@@ -6547,20 +6547,6 @@ iwx_init_hw(struct iwx_softc *sc)
        if (err)
                return err;
 
-       /* Should stop and start HW since INIT image just loaded. */
-       iwx_stop_device(sc);
-       err = iwx_start_hw(sc);
-       if (err) {
-               printf("%s: could not initialize hardware\n", DEVNAME(sc));
-               return err;
-       }
-
-       err = iwx_load_ucode_wait_alive(sc);
-       if (err) {
-               printf("%s: could not load firmware\n", DEVNAME(sc));
-               goto err;
-       }
-
        if (!iwx_nic_lock(sc))
                return EBUSY;
 

Reply via email to