提交 391481ad 编写于 作者: S Shahar S Matityahu 提交者: Luca Coelho

iwlwifi: dbg: replace dump info device family with HW type

In the dump info, the driver sets device_family to
IWL_FW_ERROR_DUMP_FAMILY_7 in case IWL_FW_ERROR_DUMP_FAMILY_7 is used or
IWL_FW_ERROR_DUMP_FAMILY_8 otherwise. This information is misleading and
incorrect since the driver sets the device family to 8 to any device that
is from family 8 and later, e.g. device family 9 is represented as 8 in
the dump.
Also, the device family enum is known only to the driver and
does not give any information to the FW developer

Change the device family to HW type to give propper data about the nic
in use.
Signed-off-by: NShahar S Matityahu <shahar.s.matityahu@intel.com>
Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
上级 bfd8e3da
...@@ -917,11 +917,8 @@ iwl_fw_error_dump_file(struct iwl_fw_runtime *fwrt, ...@@ -917,11 +917,8 @@ iwl_fw_error_dump_file(struct iwl_fw_runtime *fwrt,
dump_data->type = cpu_to_le32(IWL_FW_ERROR_DUMP_DEV_FW_INFO); dump_data->type = cpu_to_le32(IWL_FW_ERROR_DUMP_DEV_FW_INFO);
dump_data->len = cpu_to_le32(sizeof(*dump_info)); dump_data->len = cpu_to_le32(sizeof(*dump_info));
dump_info = (void *)dump_data->data; dump_info = (void *)dump_data->data;
dump_info->device_family = dump_info->hw_type =
fwrt->trans->cfg->device_family == cpu_to_le32(CSR_HW_REV_TYPE(fwrt->trans->hw_rev));
IWL_DEVICE_FAMILY_7000 ?
cpu_to_le32(IWL_FW_ERROR_DUMP_FAMILY_7) :
cpu_to_le32(IWL_FW_ERROR_DUMP_FAMILY_8);
dump_info->hw_step = dump_info->hw_step =
cpu_to_le32(CSR_HW_REV_STEP(fwrt->trans->hw_rev)); cpu_to_le32(CSR_HW_REV_STEP(fwrt->trans->hw_rev));
memcpy(dump_info->fw_human_readable, fwrt->fw->human_readable, memcpy(dump_info->fw_human_readable, fwrt->fw->human_readable,
......
...@@ -184,7 +184,7 @@ enum iwl_fw_error_dump_family { ...@@ -184,7 +184,7 @@ enum iwl_fw_error_dump_family {
/** /**
* struct iwl_fw_error_dump_info - info on the device / firmware * struct iwl_fw_error_dump_info - info on the device / firmware
* @device_family: the family of the device (7 / 8) * @hw_type: the type of the device
* @hw_step: the step of the device * @hw_step: the step of the device
* @fw_human_readable: human readable FW version * @fw_human_readable: human readable FW version
* @dev_human_readable: name of the device * @dev_human_readable: name of the device
...@@ -196,7 +196,7 @@ enum iwl_fw_error_dump_family { ...@@ -196,7 +196,7 @@ enum iwl_fw_error_dump_family {
* if the dump collection was not initiated by an assert, the value is 0 * if the dump collection was not initiated by an assert, the value is 0
*/ */
struct iwl_fw_error_dump_info { struct iwl_fw_error_dump_info {
__le32 device_family; __le32 hw_type;
__le32 hw_step; __le32 hw_step;
u8 fw_human_readable[FW_VER_HUMAN_READABLE_SZ]; u8 fw_human_readable[FW_VER_HUMAN_READABLE_SZ];
u8 dev_human_readable[64]; u8 dev_human_readable[64];
......
...@@ -290,6 +290,7 @@ ...@@ -290,6 +290,7 @@
/* HW REV */ /* HW REV */
#define CSR_HW_REV_DASH(_val) (((_val) & 0x0000003) >> 0) #define CSR_HW_REV_DASH(_val) (((_val) & 0x0000003) >> 0)
#define CSR_HW_REV_STEP(_val) (((_val) & 0x000000C) >> 2) #define CSR_HW_REV_STEP(_val) (((_val) & 0x000000C) >> 2)
#define CSR_HW_REV_TYPE(_val) (((_val) & 0x000FFF0) >> 4)
/* HW RFID */ /* HW RFID */
#define CSR_HW_RFID_FLAVOR(_val) (((_val) & 0x000000F) >> 0) #define CSR_HW_RFID_FLAVOR(_val) (((_val) & 0x000000F) >> 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册