Third batch of iwlwifi fixes intended for v5.1
* Fix an oops when creating debugfs entries; * Fix bug when trying to capture debugging info while in rfkill; * Prevent potential uninitialized memory dumps into debugging logs; * Fix some initialization parameters for AX210 devices; * Fix an oops with non-MSIX devices; -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEF3LNfgb2BPWm68smoUecoho8xfoFAly5ZZEACgkQoUecoho8 xfpPoxAAleC0nBkESSdBFSm6ekAg0FqosSauw4LXpXIt8PoBfXIJnNqns14skpYb A5dB9bYSWIk+7lIoMse5A/Fv5/iZbvBNrcimNLpoGEuyzYOfhfW7WFg67So5W/FW 9ZUO6f+lw0mj2xncjuVkYMkjRFfk+5d09+CEKVLdj4Pr4wFE7i57qWdVOweSRVx6 L5ERSQqDxuBXLlc0fPj9dmgKpQWpY+H8JEr5AsUBoSfVxOAzn3oLFGw83/AVrrgn t3Pdj2Xs+AAFGdEsLg53no9BANIqtvbYM8eYGxUE0h0Ksi1bVvJsQq+2zypxrDzn 4MzW03ztmUoTJfgTJLIHCGKmXhKmlTuLr7wtw6rCQuBBdtXTfuH/FH2ryZRgiJMK 7sH2bPthQk5SpY1p1cgcoexf9+Pe6MEW1ngexVZiNQXC3q1JaCIZhOOzjMhLHQ0R DpECi3YcWojqZa76kQV81tdauad/GF5D2hn+2j8Zfxy73hzD1vCzugxfNNMgeA/5 Nfz6wOuBKm4gSCtdfXDSLZ2+4Bo3o4plUbNP5N6UcZdvPuT//s/FU9Nc3PW+NPuD Ez1d+fXoISlLOIQH69lz6IQ3QWV2Vi35Gz4ki3jH2iXGgJq817sD5kf9HZYABLwo IR6ZL6mW1Njp8rnqr18I4zBI5v/so/hfRqf7aKBt0s1Z6PbD7nY= =I1UT -----END PGP SIGNATURE----- Merge tag 'iwlwifi-for-kalle-2019-04-19' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes Third batch of iwlwifi fixes intended for v5.1 * Fix an oops when creating debugfs entries; * Fix bug when trying to capture debugging info while in rfkill; * Prevent potential uninitialized memory dumps into debugging logs; * Fix some initialization parameters for AX210 devices; * Fix an oops with non-MSIX devices;
This commit is contained in:
commit
792a2fdcee
|
@ -201,7 +201,7 @@ static const struct iwl_ht_params iwl_22000_ht_params = {
|
|||
#define IWL_DEVICE_AX210 \
|
||||
IWL_DEVICE_AX200_COMMON, \
|
||||
.device_family = IWL_DEVICE_FAMILY_AX210, \
|
||||
.base_params = &iwl_22000_base_params, \
|
||||
.base_params = &iwl_22560_base_params, \
|
||||
.csr = &iwl_csr_v1, \
|
||||
.min_txq_size = 128
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ struct iwl_ucode_header {
|
|||
} u;
|
||||
};
|
||||
|
||||
#define IWL_UCODE_INI_TLV_GROUP BIT(24)
|
||||
#define IWL_UCODE_INI_TLV_GROUP 0x1000000
|
||||
|
||||
/*
|
||||
* new TLV uCode file layout
|
||||
|
@ -148,11 +148,14 @@ enum iwl_ucode_tlv_type {
|
|||
IWL_UCODE_TLV_UMAC_DEBUG_ADDRS = 54,
|
||||
IWL_UCODE_TLV_LMAC_DEBUG_ADDRS = 55,
|
||||
IWL_UCODE_TLV_FW_RECOVERY_INFO = 57,
|
||||
IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION = IWL_UCODE_INI_TLV_GROUP | 0x1,
|
||||
IWL_UCODE_TLV_TYPE_HCMD = IWL_UCODE_INI_TLV_GROUP | 0x2,
|
||||
IWL_UCODE_TLV_TYPE_REGIONS = IWL_UCODE_INI_TLV_GROUP | 0x3,
|
||||
IWL_UCODE_TLV_TYPE_TRIGGERS = IWL_UCODE_INI_TLV_GROUP | 0x4,
|
||||
IWL_UCODE_TLV_TYPE_DEBUG_FLOW = IWL_UCODE_INI_TLV_GROUP | 0x5,
|
||||
|
||||
IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION = IWL_UCODE_INI_TLV_GROUP + 0x1,
|
||||
IWL_UCODE_TLV_DEBUG_BASE = IWL_UCODE_TLV_TYPE_BUFFER_ALLOCATION,
|
||||
IWL_UCODE_TLV_TYPE_HCMD = IWL_UCODE_INI_TLV_GROUP + 0x2,
|
||||
IWL_UCODE_TLV_TYPE_REGIONS = IWL_UCODE_INI_TLV_GROUP + 0x3,
|
||||
IWL_UCODE_TLV_TYPE_TRIGGERS = IWL_UCODE_INI_TLV_GROUP + 0x4,
|
||||
IWL_UCODE_TLV_TYPE_DEBUG_FLOW = IWL_UCODE_INI_TLV_GROUP + 0x5,
|
||||
IWL_UCODE_TLV_DEBUG_MAX = IWL_UCODE_TLV_TYPE_DEBUG_FLOW,
|
||||
|
||||
/* TLVs 0x1000-0x2000 are for internal driver usage */
|
||||
IWL_UCODE_TLV_FW_DBG_DUMP_LST = 0x1000,
|
||||
|
|
|
@ -126,7 +126,8 @@ void iwl_alloc_dbg_tlv(struct iwl_trans *trans, size_t len, const u8 *data,
|
|||
len -= ALIGN(tlv_len, 4);
|
||||
data += sizeof(*tlv) + ALIGN(tlv_len, 4);
|
||||
|
||||
if (!(tlv_type & IWL_UCODE_INI_TLV_GROUP))
|
||||
if (tlv_type < IWL_UCODE_TLV_DEBUG_BASE ||
|
||||
tlv_type > IWL_UCODE_TLV_DEBUG_MAX)
|
||||
continue;
|
||||
|
||||
hdr = (void *)&tlv->data[0];
|
||||
|
|
|
@ -774,6 +774,11 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
|||
return;
|
||||
|
||||
mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir);
|
||||
if (IS_ERR_OR_NULL(mvmvif->dbgfs_dir)) {
|
||||
IWL_ERR(mvm, "Failed to create debugfs directory under %pd\n",
|
||||
dbgfs_dir);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mvmvif->dbgfs_dir) {
|
||||
IWL_ERR(mvm, "Failed to create debugfs directory under %pd\n",
|
||||
|
|
|
@ -1121,7 +1121,9 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
|
|||
ret = iwl_mvm_load_rt_fw(mvm);
|
||||
if (ret) {
|
||||
IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret);
|
||||
iwl_fw_dbg_error_collect(&mvm->fwrt, FW_DBG_TRIGGER_DRIVER);
|
||||
if (ret != -ERFKILL)
|
||||
iwl_fw_dbg_error_collect(&mvm->fwrt,
|
||||
FW_DBG_TRIGGER_DRIVER);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
|
@ -834,7 +834,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
|||
mutex_lock(&mvm->mutex);
|
||||
iwl_mvm_ref(mvm, IWL_MVM_REF_INIT_UCODE);
|
||||
err = iwl_run_init_mvm_ucode(mvm, true);
|
||||
if (err)
|
||||
if (err && err != -ERFKILL)
|
||||
iwl_fw_dbg_error_collect(&mvm->fwrt, FW_DBG_TRIGGER_DRIVER);
|
||||
if (!iwlmvm_mod_params.init_dbg || !err)
|
||||
iwl_mvm_stop_device(mvm);
|
||||
|
|
|
@ -3644,20 +3644,27 @@ out_no_pci:
|
|||
|
||||
void iwl_trans_pcie_sync_nmi(struct iwl_trans *trans)
|
||||
{
|
||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
||||
unsigned long timeout = jiffies + IWL_TRANS_NMI_TIMEOUT;
|
||||
u32 inta_addr, sw_err_bit;
|
||||
|
||||
if (trans_pcie->msix_enabled) {
|
||||
inta_addr = CSR_MSIX_HW_INT_CAUSES_AD;
|
||||
sw_err_bit = MSIX_HW_INT_CAUSES_REG_SW_ERR;
|
||||
} else {
|
||||
inta_addr = CSR_INT;
|
||||
sw_err_bit = CSR_INT_BIT_SW_ERR;
|
||||
}
|
||||
|
||||
iwl_disable_interrupts(trans);
|
||||
iwl_force_nmi(trans);
|
||||
while (time_after(timeout, jiffies)) {
|
||||
u32 inta_hw = iwl_read32(trans,
|
||||
CSR_MSIX_HW_INT_CAUSES_AD);
|
||||
u32 inta_hw = iwl_read32(trans, inta_addr);
|
||||
|
||||
/* Error detected by uCode */
|
||||
if (inta_hw & MSIX_HW_INT_CAUSES_REG_SW_ERR) {
|
||||
if (inta_hw & sw_err_bit) {
|
||||
/* Clear causes register */
|
||||
iwl_write32(trans, CSR_MSIX_HW_INT_CAUSES_AD,
|
||||
inta_hw &
|
||||
MSIX_HW_INT_CAUSES_REG_SW_ERR);
|
||||
iwl_write32(trans, inta_addr, inta_hw & sw_err_bit);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue