ath10k: support dev_coredump for crash dump
authorArun Khandavalli <akhandav@qti.qualcomm.com>
Wed, 21 Dec 2016 12:19:21 +0000 (14:19 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 30 Dec 2016 09:14:07 +0000 (11:14 +0200)
commit727000e6af34748552d13069ce52de2ad3d6c271
treef1bd0b11aa199890bc9928cc74ffe229d21a839a
parent88407beb1b1462f706a1950a355fd086e1c450b6
ath10k: support dev_coredump for crash dump

Whenever firmware crashes, and both CONFIG_ATH10K_DEBUGFS and
CONFIG_ALLOW_DEV_COREDUMP are enabled, dump information about the crash via a
devcoredump device. Dump can be read from userspace for further analysis from:

/sys/class/devcoredump/devcd*/data

As until now we have provided the firmware crash dump file via fw_crash_dump
debugfs keep it still available but deprecate and a warning print that the user
should switch to using dev_coredump.

Future improvement would be not to depend on CONFIG_ATH10K_DEBUGFS, as there
might be systems which want to get the firmware crash dump but not enable
debugfs. How to handle memory consumption is also something which needs to be
taken into account.

Signed-off-by: Arun Khandavalli <akhandav@qti.qualcomm.com>
[kvalo@qca.qualcomm.com: rebase, fixes, improve commit log]
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/debug.c
drivers/net/wireless/ath/ath10k/debug.h