2021-01-31 20:30:39

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 00/12] iwlwifi: updates intended for v5.12 2021-01-31 part 2

From: Luca Coelho <[email protected]>

Hi,

Here's the fourth set of patches intended for v5.12. It's the usual
development, new features, cleanups and bugfixes.

The changes are:

* Per Platform Antenna Gain (PPAG) fixes and improvements;
* Bump FW API support again;
* Improvements in the debug framework;

As usual, I'm pushing this to a pending branch, for kbuild bot, and
will send a pull-request later.

Please review.

Cheers,
Luca.


Luca Coelho (7):
iwlwifi: mvm: set enabled in the PPAG command properly
iwlwifi: mvm: implement approved list for the PPAG feature
iwlwifi: mvm: add HP to the PPAG approved list
iwlwifi: mvm: add Samsung to the PPAG approved list
iwlwifi: mvm: add Microsoft to the PPAG approved list
iwlwifi: mvm: add Asus to the PPAG approved list
iwlwifi: bump FW API to 61 for AX devices

Mordechay Goodstein (5):
iwlwifi: mvm: add IML/ROM information for other HW families
iwlwifi: mvm: add triggers for MLME events
iwlwifi: fwrt: add suspend/resume time point
iwlwifi: mvm: add tx fail time point
iwlwifi: mvm: add debugfs entry to trigger a dump as any time-point

.../net/wireless/intel/iwlwifi/cfg/22000.c | 2 +-
drivers/net/wireless/intel/iwlwifi/fw/init.c | 2 ++
drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 1 +
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 3 --
.../net/wireless/intel/iwlwifi/mvm/debugfs.c | 19 ++++++++++
drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 35 +++++++++++++++++++
.../net/wireless/intel/iwlwifi/mvm/mac80211.c | 33 +++++++++++++++++
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 26 ++++++++++++--
.../net/wireless/intel/iwlwifi/mvm/utils.c | 24 ++++++++++---
9 files changed, 133 insertions(+), 12 deletions(-)

--
2.29.2


2021-01-31 20:31:39

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 03/12] iwlwifi: fwrt: add suspend/resume time point

From: Mordechay Goodstein <[email protected]>

We should only collect debug data after exiting suspend state, that's
why we delete the current place in d3.c file, and add it to fwrt flows
that occur while we can still access the fw and collect debug data.

Signed-off-by: Mordechay Goodstein <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/fw/init.c | 2 ++
drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 3 ---
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/init.c b/drivers/net/wireless/intel/iwlwifi/fw/init.c
index e317b051b8ed..986913f2fbd5 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/init.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/init.c
@@ -36,11 +36,13 @@ IWL_EXPORT_SYMBOL(iwl_fw_runtime_init);
void iwl_fw_runtime_suspend(struct iwl_fw_runtime *fwrt)
{
iwl_fw_suspend_timestamp(fwrt);
+ iwl_dbg_tlv_time_point(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_START, NULL);
}
IWL_EXPORT_SYMBOL(iwl_fw_runtime_suspend);

void iwl_fw_runtime_resume(struct iwl_fw_runtime *fwrt)
{
+ iwl_dbg_tlv_time_point(fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_END, NULL);
iwl_fw_resume_timestamp(fwrt);
}
IWL_EXPORT_SYMBOL(iwl_fw_runtime_resume);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
index f98eb7b71068..816a82db8252 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c
@@ -2048,9 +2048,6 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
goto err;
}

- iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_HOST_D3_END,
- NULL);
-
ret = iwl_trans_d3_resume(mvm->trans, &d3_status, test, !unified_image);
if (ret)
goto err;
--
2.29.2

2021-01-31 20:32:22

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 05/12] iwlwifi: mvm: add debugfs entry to trigger a dump as any time-point

From: Mordechay Goodstein <[email protected]>

This is used for different tests collecting different types of
debug data from fw (e.g latency issues, hw issues etc).

Signed-off-by: Mordechay Goodstein <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
.../net/wireless/intel/iwlwifi/mvm/debugfs.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index 3834d7197e11..efc908231d74 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -1349,6 +1349,24 @@ static ssize_t iwl_dbgfs_fw_dbg_collect_write(struct iwl_mvm *mvm,
return count;
}

+static ssize_t iwl_dbgfs_dbg_time_point_write(struct iwl_mvm *mvm,
+ char *buf, size_t count,
+ loff_t *ppos)
+{
+ u32 timepoint;
+
+ if (kstrtou32(buf, 0, &timepoint))
+ return -EINVAL;
+
+ if (timepoint == IWL_FW_INI_TIME_POINT_INVALID ||
+ timepoint >= IWL_FW_INI_TIME_POINT_NUM)
+ return -EINVAL;
+
+ iwl_dbg_tlv_time_point(&mvm->fwrt, timepoint, NULL);
+
+ return count;
+}
+
#define ADD_TEXT(...) pos += scnprintf(buf + pos, bufsz - pos, __VA_ARGS__)
#ifdef CONFIG_IWLWIFI_BCAST_FILTERING
static ssize_t iwl_dbgfs_bcast_filters_read(struct file *file,
@@ -1786,6 +1804,7 @@ MVM_DEBUGFS_WRITE_FILE_OPS(bt_force_ant, 10);
MVM_DEBUGFS_READ_WRITE_FILE_OPS(scan_ant_rxchain, 8);
MVM_DEBUGFS_READ_WRITE_FILE_OPS(fw_dbg_conf, 8);
MVM_DEBUGFS_WRITE_FILE_OPS(fw_dbg_collect, 64);
+MVM_DEBUGFS_WRITE_FILE_OPS(dbg_time_point, 64);
MVM_DEBUGFS_WRITE_FILE_OPS(indirection_tbl,
(IWL_RSS_INDIRECTION_TABLE_SIZE * 2));
MVM_DEBUGFS_WRITE_FILE_OPS(inject_packet, 512);
--
2.29.2

2021-01-31 20:35:29

by Luca Coelho

[permalink] [raw]
Subject: [PATCH 01/12] iwlwifi: mvm: add IML/ROM information for other HW families

From: Mordechay Goodstein <[email protected]>

This makes it easier to debug IML/ROM errors for other HW families
as well.

Signed-off-by: Mordechay Goodstein <[email protected]>
Signed-off-by: Luca Coelho <[email protected]>
---
drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 1 +
.../net/wireless/intel/iwlwifi/mvm/utils.c | 24 +++++++++++++++----
2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
index 0b03fdedc1f7..9dd2d79f4d5a 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h
@@ -359,6 +359,7 @@ enum {
/* device family 22000 WPROT register */
#define PREG_PRPH_WPROT_22000 0xA04D00

+#define SB_MODIFY_CFG_FLAG 0xA03088
#define SB_CPU_1_STATUS 0xA01E30
#define SB_CPU_2_STATUS 0xA01E34
#define UMAG_SB_CPU_1_STATUS 0xA038C0
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index 01a0fe86fd0d..b6b481ff1518 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -499,18 +499,33 @@ static void iwl_mvm_dump_lmac_error_log(struct iwl_mvm *mvm, u8 lmac_num)
static void iwl_mvm_dump_iml_error_log(struct iwl_mvm *mvm)
{
struct iwl_trans *trans = mvm->trans;
- u32 error;
+ u32 error, data1;
+
+ if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000) {
+ error = UMAG_SB_CPU_2_STATUS;
+ data1 = UMAG_SB_CPU_1_STATUS;
+ } else if (mvm->trans->trans_cfg->device_family >=
+ IWL_DEVICE_FAMILY_8000) {
+ error = SB_CPU_2_STATUS;
+ data1 = SB_CPU_1_STATUS;
+ } else {
+ return;
+ }

error = iwl_read_umac_prph(trans, UMAG_SB_CPU_2_STATUS);

IWL_ERR(trans, "IML/ROM dump:\n");

if (error & 0xFFFF0000)
- IWL_ERR(trans, "IML/ROM SYSASSERT:\n");
+ IWL_ERR(trans, "0x%04X | IML/ROM SYSASSERT\n", error >> 16);

IWL_ERR(mvm, "0x%08X | IML/ROM error/state\n", error);
IWL_ERR(mvm, "0x%08X | IML/ROM data1\n",
- iwl_read_umac_prph(trans, UMAG_SB_CPU_1_STATUS));
+ iwl_read_umac_prph(trans, data1));
+
+ if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_22000)
+ IWL_ERR(mvm, "0x%08X | IML/ROM WFPM_AUTH_KEY_0\n",
+ iwl_read_umac_prph(trans, SB_MODIFY_CFG_FLAG));
}

void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)
@@ -528,8 +543,7 @@ void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm)

iwl_mvm_dump_umac_error_log(mvm);

- if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210)
- iwl_mvm_dump_iml_error_log(mvm);
+ iwl_mvm_dump_iml_error_log(mvm);

iwl_fw_error_print_fseq_regs(&mvm->fwrt);
}
--
2.29.2

2021-02-05 10:06:46

by Luca Coelho

[permalink] [raw]
Subject: Re: [PATCH 01/12] iwlwifi: mvm: add IML/ROM information for other HW families

Luca Coelho <luca[email protected]> wrote:

> From: Mordechay Goodstein <[email protected]>
>
> This makes it easier to debug IML/ROM errors for other HW families
> as well.
>
> Signed-off-by: Mordechay Goodstein <[email protected]>
> Signed-off-by: Luca Coelho <[email protected]>

12 patches applied to iwlwifi-next.git, thanks.

5226cecbc6c8 iwlwifi: mvm: add IML/ROM information for other HW families
119c2a13a3e8 iwlwifi: mvm: add triggers for MLME events
1db5c3472b2a iwlwifi: fwrt: add suspend/resume time point
0d65ce900d11 iwlwifi: mvm: add tx fail time point
9dbb62a29042 iwlwifi: mvm: add debugfs entry to trigger a dump as any time-point
efaa85cf2294 iwlwifi: mvm: set enabled in the PPAG command properly
a2ac0f48a07c iwlwifi: mvm: implement approved list for the PPAG feature
ca176eddeba2 iwlwifi: mvm: add HP to the PPAG approved list
dd158ed674ed iwlwifi: mvm: add Samsung to the PPAG approved list
4a76553c88b4 iwlwifi: mvm: add Microsoft to the PPAG approved list
a7abc1eae7e4 iwlwifi: mvm: add Asus to the PPAG approved list
df8ba77ef4cc iwlwifi: bump FW API to 61 for AX devices