wifi: iwlwifi: pcie: enable TOP fatal error interrupt
authorJohannes Berg <johannes.berg@intel.com>
Wed, 13 Sep 2023 11:56:39 +0000 (14:56 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 13 Sep 2023 14:11:39 +0000 (16:11 +0200)
Enable the TOP (HW part) fatal error interrupt and add a
print when it happens. Currently FW always adds also the
SW error interrupt, but for >= Bz we'll need to do PLDR
in case this is asserted, so leave a TODO item already.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230913145231.127d914a4d0d.I41ea409df63474554ef727c49382d0b5bf15939e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-csr.h
drivers/net/wireless/intel/iwlwifi/pcie/rx.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c

index 587368a0ad4ae2e48ca977ac1c0d5d2b94f46b3b..3653a9fd9d8cba4dcf24ecf4bd336c0d0872d7eb 100644 (file)
@@ -618,6 +618,7 @@ enum msix_hw_int_causes {
        MSIX_HW_INT_CAUSES_REG_WAKEUP           = BIT(1),
        MSIX_HW_INT_CAUSES_REG_IML              = BIT(1),
        MSIX_HW_INT_CAUSES_REG_RESET_DONE       = BIT(2),
+       MSIX_HW_INT_CAUSES_REG_TOP_FATAL_ERR    = BIT(3),
        MSIX_HW_INT_CAUSES_REG_SW_ERR_BZ        = BIT(5),
        MSIX_HW_INT_CAUSES_REG_CT_KILL          = BIT(6),
        MSIX_HW_INT_CAUSES_REG_RF_KILL          = BIT(7),
index 607c180d1eb3c244fe39c6778fdfd0e08416656e..23b5a0adcbd62ba65ab7d0f4ffc7cacee76cba18 100644 (file)
@@ -2291,6 +2291,12 @@ irqreturn_t iwl_pcie_irq_msix_handler(int irq, void *dev_id)
        else
                sw_err = inta_hw & MSIX_HW_INT_CAUSES_REG_SW_ERR;
 
+       if (inta_hw & MSIX_HW_INT_CAUSES_REG_TOP_FATAL_ERR) {
+               IWL_ERR(trans, "TOP Fatal error detected, inta_hw=0x%x.\n",
+                       inta_hw);
+               /* TODO: PLDR flow required here for >= Bz */
+       }
+
        /* Error detected by uCode */
        if ((inta_fh & MSIX_FH_INT_CAUSES_FH_ERR) || sw_err) {
                IWL_ERR(trans,
index 93e10d7d12fb5159e0fb5cdd1a558f238d88c47d..849ea1851508a6c9628264cf18523bf83a80e153 100644 (file)
@@ -1111,6 +1111,7 @@ static const struct iwl_causes_list causes_list_common[] = {
        IWL_CAUSE(CSR_MSIX_HW_INT_MASK_AD, MSIX_HW_INT_CAUSES_REG_ALIVE),
        IWL_CAUSE(CSR_MSIX_HW_INT_MASK_AD, MSIX_HW_INT_CAUSES_REG_WAKEUP),
        IWL_CAUSE(CSR_MSIX_HW_INT_MASK_AD, MSIX_HW_INT_CAUSES_REG_RESET_DONE),
+       IWL_CAUSE(CSR_MSIX_HW_INT_MASK_AD, MSIX_HW_INT_CAUSES_REG_TOP_FATAL_ERR),
        IWL_CAUSE(CSR_MSIX_HW_INT_MASK_AD, MSIX_HW_INT_CAUSES_REG_CT_KILL),
        IWL_CAUSE(CSR_MSIX_HW_INT_MASK_AD, MSIX_HW_INT_CAUSES_REG_RF_KILL),
        IWL_CAUSE(CSR_MSIX_HW_INT_MASK_AD, MSIX_HW_INT_CAUSES_REG_PERIODIC),