Author: markj
Date: Thu Nov  7 23:36:25 2019
New Revision: 354506
URL: https://svnweb.freebsd.org/changeset/base/354506

Log:
  iwm: Explicitly enable MSI on newer chipsets.
  
  9000-series chips implement support for MSI-X interrupts and disable MSI
  by default.
  
  MFC after:    2 weeks
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/dev/iwm/if_iwm_pcie_trans.c
  head/sys/dev/iwm/if_iwmreg.h

Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c
==============================================================================
--- head/sys/dev/iwm/if_iwm_pcie_trans.c        Thu Nov  7 23:36:10 2019        
(r354505)
+++ head/sys/dev/iwm/if_iwm_pcie_trans.c        Thu Nov  7 23:36:25 2019        
(r354506)
@@ -616,6 +616,10 @@ iwm_start_hw(struct iwm_softc *sc)
        if ((error = iwm_apm_init(sc)) != 0)
                return error;
 
+       /* On newer chipsets MSI is disabled by default. */
+       if (sc->cfg->mqrx_supported)
+               iwm_write_prph(sc, IWM_UREG_CHICK, IWM_UREG_CHICK_MSI_ENABLE);
+
        iwm_enable_rfkill_int(sc);
        iwm_check_rfkill(sc);
 

Modified: head/sys/dev/iwm/if_iwmreg.h
==============================================================================
--- head/sys/dev/iwm/if_iwmreg.h        Thu Nov  7 23:36:10 2019        
(r354505)
+++ head/sys/dev/iwm/if_iwmreg.h        Thu Nov  7 23:36:25 2019        
(r354506)
@@ -457,6 +457,10 @@ enum iwm_secure_boot_status_reg {
 #define IWM_LMPM_CHICK                         0xa01ff8
 #define IWM_LMPM_CHICK_EXTENDED_ADDR_SPACE     0x01
 
+#define        IWM_UREG_CHICK                  0xa05c00
+#define        IWM_UREG_CHICK_MSI_ENABLE       0x01000000
+#define        IWM_UREG_CHICK_MSIX_ENABLE      0x02000000
+
 #define IWM_FH_TCSR_0_REG0 (0x1D00)
 
 /*
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to