Эх сурвалжийг харах

qcacmn: Print the timestamp of FW_HANG command and Tx completion

A customer has reported an issue regarding the FW not asserting when it
receives the WMI_FORCE_FW_HANG_CMDID from the host. We need to confirm
whether the FW actually receiving the command or it is stuck in the WMI
command queue because it’s full.
To do this, adding some prints along with the timestamps in the WMI command
path and WMI command Tx completion path.

Change-Id: Ib4d6423365a150f91597a9d83ab8a85a053de777
CRs-Fixed: 3598136
Shashikala Prabhu 1 жил өмнө
parent
commit
f58bde59f4

+ 1 - 0
wmi/inc/wmi_unified_priv.h

@@ -2375,6 +2375,7 @@ QDF_STATUS (*extract_vdev_peer_delete_all_response_event)(
 
 bool (*is_management_record)(uint32_t cmd_id);
 bool (*is_diag_event)(uint32_t event_id);
+bool (*is_force_fw_hang_cmd)(uint32_t event_id);
 uint8_t *(*wmi_id_to_name)(uint32_t cmd_id);
 QDF_STATUS (*send_dfs_phyerr_offload_en_cmd)(wmi_unified_t wmi_handle,
 		uint32_t pdev_id);

+ 5 - 0
wmi/src/wmi_unified.c

@@ -3567,6 +3567,11 @@ static void wmi_htc_tx_complete(void *ctx, HTC_PACKET *htc_pkt)
 			WMI_MGMT_COMMAND_TX_CMP_RECORD(wmi_handle, cmd_id,
 						       offset_ptr);
 		} else {
+			if (wmi_handle->ops->is_force_fw_hang_cmd(cmd_id)) {
+				wmi_info("Tx completion received for WMI_FORCE_FW_HANG_CMDID, current_time:%ld",
+					 qdf_mc_timer_get_system_time());
+			}
+
 			WMI_COMMAND_TX_CMP_RECORD(wmi_handle, cmd_id,
 						  offset_ptr, dma_addr,
 						  phy_addr);

+ 11 - 0
wmi/src/wmi_unified_tlv.c

@@ -2832,6 +2832,8 @@ static QDF_STATUS send_crash_inject_cmd_tlv(wmi_unified_t wmi_handle,
 	cmd->delay_time_ms = param->delay_time_ms;
 
 	wmi_mtrace(WMI_FORCE_FW_HANG_CMDID, NO_SESSION, 0);
+	wmi_info("type:%d delay_time_ms:%d current_time:%ld",
+		 cmd->type, cmd->delay_time_ms, qdf_mc_timer_get_system_time());
 	ret = wmi_unified_cmd_send(wmi_handle, buf, len,
 		WMI_FORCE_FW_HANG_CMDID);
 	if (ret) {
@@ -15997,6 +15999,14 @@ static bool is_management_record_tlv(uint32_t cmd_id)
 	}
 }
 
+static bool is_force_fw_hang_cmd_tlv(uint32_t cmd_id)
+{
+	if (cmd_id == WMI_FORCE_FW_HANG_CMDID)
+		return true;
+
+	return false;
+}
+
 static bool is_diag_event_tlv(uint32_t event_id)
 {
 	if (WMI_DIAG_EVENTID == event_id)
@@ -21472,6 +21482,7 @@ struct wmi_ops tlv_ops =  {
 				send_wlan_profile_hist_intvl_cmd_tlv,
 	.is_management_record = is_management_record_tlv,
 	.is_diag_event = is_diag_event_tlv,
+	.is_force_fw_hang_cmd = is_force_fw_hang_cmd_tlv,
 #ifdef WLAN_FEATURE_ACTION_OUI
 	.send_action_oui_cmd = send_action_oui_cmd_tlv,
 #endif