iwlwifi: fix Bz NMI behaviour
authorJohannes Berg <johannes.berg@intel.com>
Fri, 10 Dec 2021 07:06:11 +0000 (09:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:05:36 +0000 (11:05 +0100)
commit fdfde0cb79264f88992e72b5a056a3a3284fcaad upstream.

Contrary to what was stated before, the hardware hasn't changed
the bits here yet. In any case, the new CSR is also directly
(lower 16 bits) connected to UREG_DOORBELL_TO_ISR6, so if it
still changes the changes would be there. Adjust the code and
comments accordingly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: 6c0795f1a524 ("iwlwifi: implement Bz NMI behaviour")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211210090244.75b6207536e3.I7d170a48a9096e6b7269c3a9f447c326f929b171@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/iwl-csr.h
drivers/net/wireless/intel/iwlwifi/iwl-io.c

index cf796403c45c0e908ddaf7fb78a5bf7b7311e3c6..845a09d0dabaf44b9ea0a80f6e9f7e512270fff2 100644 (file)
 /* GIO Chicken Bits (PCI Express bus link power management) */
 #define CSR_GIO_CHICKEN_BITS    (CSR_BASE+0x100)
 
-/* Doorbell NMI (since Bz) */
+/* Doorbell - since Bz
+ * connected to UREG_DOORBELL_TO_ISR6 (lower 16 bits only)
+ */
 #define CSR_DOORBELL_VECTOR    (CSR_BASE + 0x130)
-#define CSR_DOORBELL_VECTOR_NMI        BIT(1)
 
 /* host chicken bits */
 #define CSR_HOST_CHICKEN       (CSR_BASE + 0x204)
index 2517c4ae07ab3449dde2e5d9c004ab5a9dd346da..5e76ab6c8ad0ac154497fbcb68f0fca486ee6534 100644 (file)
@@ -218,7 +218,7 @@ void iwl_force_nmi(struct iwl_trans *trans)
                                    UREG_DOORBELL_TO_ISR6_NMI_BIT);
        else
                iwl_write32(trans, CSR_DOORBELL_VECTOR,
-                           CSR_DOORBELL_VECTOR_NMI);
+                           UREG_DOORBELL_TO_ISR6_NMI_BIT);
 }
 IWL_EXPORT_SYMBOL(iwl_force_nmi);