Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/dev/pci Firware loading fixes.



details:   https://anonhg.NetBSD.org/src-all/rev/ebf1f86f6f97
branches:  trunk
changeset: 950143:ebf1f86f6f97
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Sun Jan 17 04:03:52 2021 +1100

description:
Firware loading fixes.

iwm_intr has to always run as when the fw is being uploaded it relies on a
wakeup sent from iwm_notify_intr();

diffstat:

 sys/dev/pci/if_iwm.c |  7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diffs (27 lines):

diff -r ef47d30fdb9c -r ebf1f86f6f97 sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c      Fri Jan 15 14:45:31 2021 +1100
+++ b/sys/dev/pci/if_iwm.c      Sun Jan 17 04:03:52 2021 +1100
@@ -3411,11 +3411,11 @@
        bus_dmamap_sync(sc->sc_dmat, dma->map, 0, byte_cnt,
            BUS_DMASYNC_PREWRITE);
 
-       sc->sc_fw_chunk_done = 0;
-
        if (!iwm_nic_lock(sc))
                return EBUSY;
 
+       sc->sc_fw_chunk_done = 0;
+
        IWM_WRITE(sc, IWM_FH_TCSR_CHNL_TX_CONFIG_REG(IWM_FH_SRVC_CHNL),
            IWM_FH_TCSR_TX_CONFIG_REG_VAL_DMA_CHNL_PAUSE);
        IWM_WRITE(sc, IWM_FH_SRVC_CHNL_SRAM_ADDR_REG(IWM_FH_SRVC_CHNL),
@@ -7594,9 +7594,6 @@
 {
        struct iwm_softc *sc = arg;
 
-       if (ISSET(sc->sc_flags, IWM_FLAG_HW_INITED))
-               return 0;
-
        /* Disable interrupts */
        IWM_WRITE(sc, IWM_CSR_INT_MASK, 0);
 



Home | Main Index | Thread Index | Old Index