]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
iwlwifi: implement Bz NMI behaviour
authorJohannes Berg <johannes.berg@intel.com>
Mon, 2 Aug 2021 18:58:52 +0000 (21:58 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 26 Aug 2021 20:34:25 +0000 (23:34 +0300)
The method to NMI the firmware also changed in Bz devices,
implement the new logic.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210802215208.c9bd2034dc05.I983c25caa09c3776c7640fff73fe739362ecc5b6@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-csr.h
drivers/net/wireless/intel/iwlwifi/iwl-io.c

index 704ff2ada12279dde83dd3c0b948dfd86c988b51..cf796403c45c0e908ddaf7fb78a5bf7b7311e3c6 100644 (file)
 /* GIO Chicken Bits (PCI Express bus link power management) */
 #define CSR_GIO_CHICKEN_BITS    (CSR_BASE+0x100)
 
+/* Doorbell NMI (since Bz) */
+#define CSR_DOORBELL_VECTOR    (CSR_BASE + 0x130)
+#define CSR_DOORBELL_VECTOR_NMI        BIT(1)
+
 /* host chicken bits */
 #define CSR_HOST_CHICKEN       (CSR_BASE + 0x204)
 #define CSR_HOST_CHICKEN_PM_IDLE_SRC_DIS_SB_PME        BIT(19)
index dba54b3297d161c55a3385174e5416b3872a9a90..2517c4ae07ab3449dde2e5d9c004ab5a9dd346da 100644 (file)
@@ -213,9 +213,12 @@ void iwl_force_nmi(struct iwl_trans *trans)
        else if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210)
                iwl_write_umac_prph(trans, UREG_NIC_SET_NMI_DRIVER,
                                UREG_NIC_SET_NMI_DRIVER_NMI_FROM_DRIVER);
-       else
+       else if (trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_BZ)
                iwl_write_umac_prph(trans, UREG_DOORBELL_TO_ISR6,
                                    UREG_DOORBELL_TO_ISR6_NMI_BIT);
+       else
+               iwl_write32(trans, CSR_DOORBELL_VECTOR,
+                           CSR_DOORBELL_VECTOR_NMI);
 }
 IWL_EXPORT_SYMBOL(iwl_force_nmi);