From c6d0f56cd03b705a65d07a80163a5199f8b47490 Mon Sep 17 00:00:00 2001 From: markj Date: Thu, 7 Nov 2019 23:36:25 +0000 Subject: [PATCH] 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 --- sys/dev/iwm/if_iwm_pcie_trans.c | 4 ++++ sys/dev/iwm/if_iwmreg.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sys/dev/iwm/if_iwm_pcie_trans.c b/sys/dev/iwm/if_iwm_pcie_trans.c index 36c4da6f458f..19ceb7ff0d3f 100644 --- a/sys/dev/iwm/if_iwm_pcie_trans.c +++ b/sys/dev/iwm/if_iwm_pcie_trans.c @@ -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); diff --git a/sys/dev/iwm/if_iwmreg.h b/sys/dev/iwm/if_iwmreg.h index be43eb0e1a13..bde46229870f 100644 --- a/sys/dev/iwm/if_iwmreg.h +++ b/sys/dev/iwm/if_iwmreg.h @@ -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) /*