Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63e11434 authored by Utkarsh Saxena's avatar Utkarsh Saxena
Browse files

msm: ipa: Fix WDI2.0 stats



New stat param "num_qmb_int_handled" is added to rx_ch_stats
by IPA uC in WDI2.0. This results in a size mismatch and
WDI stats feature is broken. Make a change to update the
new param "num_qmb_int_handled" in rx_ch_stats structure.

Also make a change to read all the rx_ch_stats to avoid
printing stale values.

Change-Id: I5d141f531f1cfdab0bd0056041e22acb26657960
Acked-by: default avatarChaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: default avatarUtkarsh Saxena <usaxena@codeaurora.org>
parent b184cdd6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1272,8 +1272,9 @@ static ssize_t ipa_read_wdi(struct file *file, char __user *ubuf,
			"RX num_db=%u\n"
			"RX num_unexpected_db=%u\n"
			"RX num_pkts_in_dis_uninit_state=%u\n"
			"num_ic_inj_vdev_change=%u\n"
			"num_ic_inj_fw_desc_change=%u\n"
			"RX num_ic_inj_vdev_change=%u\n"
			"RX num_ic_inj_fw_desc_change=%u\n"
			"RX num_qmb_int_handled=%u\n"
			"RX reserved1=%u\n"
			"RX reserved2=%u\n",
			stats.rx_ch_stats.max_outstanding_pkts,
@@ -1295,6 +1296,7 @@ static ssize_t ipa_read_wdi(struct file *file, char __user *ubuf,
			stats.rx_ch_stats.num_pkts_in_dis_uninit_state,
			stats.rx_ch_stats.num_ic_inj_vdev_change,
			stats.rx_ch_stats.num_ic_inj_fw_desc_change,
			stats.rx_ch_stats.num_qmb_int_handled,
			stats.rx_ch_stats.reserved1,
			stats.rx_ch_stats.reserved2);
		cnt += nbytes;
+3 −0
Original line number Diff line number Diff line
@@ -477,6 +477,9 @@ int ipa2_get_wdi_stats(struct IpaHwStatsWDIInfoData_t *stats)
	RX_STATS(num_db);
	RX_STATS(num_unexpected_db);
	RX_STATS(num_pkts_in_dis_uninit_state);
	RX_STATS(num_ic_inj_vdev_change);
	RX_STATS(num_ic_inj_fw_desc_change);
	RX_STATS(num_qmb_int_handled);
	RX_STATS(reserved1);
	RX_STATS(reserved2);

+5 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1356,8 +1356,9 @@ static ssize_t ipa3_read_wdi(struct file *file, char __user *ubuf,
			"RX num_db=%u\n"
			"RX num_unexpected_db=%u\n"
			"RX num_pkts_in_dis_uninit_state=%u\n"
			"num_ic_inj_vdev_change=%u\n"
			"num_ic_inj_fw_desc_change=%u\n"
			"RX num_ic_inj_vdev_change=%u\n"
			"RX num_ic_inj_fw_desc_change=%u\n"
			"RX num_qmb_int_handled=%u\n"
			"RX reserved1=%u\n"
			"RX reserved2=%u\n",
			stats.rx_ch_stats.max_outstanding_pkts,
@@ -1379,6 +1380,7 @@ static ssize_t ipa3_read_wdi(struct file *file, char __user *ubuf,
			stats.rx_ch_stats.num_pkts_in_dis_uninit_state,
			stats.rx_ch_stats.num_ic_inj_vdev_change,
			stats.rx_ch_stats.num_ic_inj_fw_desc_change,
			stats.rx_ch_stats.num_qmb_int_handled,
			stats.rx_ch_stats.reserved1,
			stats.rx_ch_stats.reserved2);
		cnt += nbytes;
+4 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -472,6 +472,9 @@ int ipa3_get_wdi_stats(struct IpaHwStatsWDIInfoData_t *stats)
	RX_STATS(num_db);
	RX_STATS(num_unexpected_db);
	RX_STATS(num_pkts_in_dis_uninit_state);
	RX_STATS(num_ic_inj_vdev_change);
	RX_STATS(num_ic_inj_fw_desc_change);
	RX_STATS(num_qmb_int_handled);
	RX_STATS(reserved1);
	RX_STATS(reserved2);

+3 −1
Original line number Diff line number Diff line
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -901,6 +901,7 @@ struct IpaHwRingStats_t {
 *		injected due to vdev_id change
 * @num_ic_inj_fw_desc_change : Number of times the Imm Cmd is
 *		injected due to fw_desc change
 * @num_qmb_int_handled : Number of QMB interrupts handled
*/
struct IpaHwStatsWDIRxInfoData_t {
	u32 max_outstanding_pkts;
@@ -914,6 +915,7 @@ struct IpaHwStatsWDIRxInfoData_t {
	u32 num_pkts_in_dis_uninit_state;
	u32 num_ic_inj_vdev_change;
	u32 num_ic_inj_fw_desc_change;
	u32 num_qmb_int_handled;
	u32 reserved1;
	u32 reserved2;
} __packed;