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

Commit 1bbb119d authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo
Browse files

ath10k: fix fw crash dumping



Recent crash dump patches introduced a regression.
If debugfs was disabled upon crash user could only
see the following:

 [  793.880000] ath10k: firmware crashed! (uuid n/a)
 [  793.890000] ath10k: qca988x hw2.0 (0x4100016c, 0x043202ff) fw 10.1.467.2-1 api 2 htt 2.1
 [  793.890000] ath10k: debug 0 debugfs 0 tracing 0 dfs 1

The report was missing register dump. Fix it by
printing registers regardless if crash_data is
present or not.

Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 7aa7a72a
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -916,6 +916,9 @@ static void ath10k_pci_dump_registers(struct ath10k *ar,
			   reg_dump_values[i + 2],
			   reg_dump_values[i + 2],
			   reg_dump_values[i + 3]);
			   reg_dump_values[i + 3]);


	if (!crash_data)
		return;

	/* crash_data is in little endian */
	/* crash_data is in little endian */
	for (i = 0; i < REG_DUMP_COUNT_QCA988X; i++)
	for (i = 0; i < REG_DUMP_COUNT_QCA988X; i++)
		crash_data->registers[i] = cpu_to_le32(reg_dump_values[i]);
		crash_data->registers[i] = cpu_to_le32(reg_dump_values[i]);
@@ -937,13 +940,8 @@ static void ath10k_pci_fw_crashed_dump(struct ath10k *ar)


	ath10k_err(ar, "firmware crashed! (uuid %s)\n", uuid);
	ath10k_err(ar, "firmware crashed! (uuid %s)\n", uuid);
	ath10k_print_driver_info(ar);
	ath10k_print_driver_info(ar);

	if (!crash_data)
		goto exit;

	ath10k_pci_dump_registers(ar, crash_data);
	ath10k_pci_dump_registers(ar, crash_data);


exit:
	spin_unlock_bh(&ar->data_lock);
	spin_unlock_bh(&ar->data_lock);


	queue_work(ar->workqueue, &ar->restart_work);
	queue_work(ar->workqueue, &ar->restart_work);