This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:users:drivers:ath10k:debug [2016/02/19 09:41] Kalle Valo Add new debug levels |
en:users:drivers:ath10k:debug [2017/03/29 14:32] (current) Kalle Valo [Firmware crash dump file] useless use of cat and add a log message |
||
---|---|---|---|
Line 210: | Line 210: | ||
`assert` - this will send special illegal parameter to firmware to cause assert failure and crash. | `assert` - this will send special illegal parameter to firmware to cause assert failure and crash. | ||
`hw-restart` - this will simply queue hw restart without fw/hw actually crashing.</code> | `hw-restart` - this will simply queue hw restart without fw/hw actually crashing.</code> | ||
+ | |||
+ | ==== Firmware crash dump file ==== | ||
+ | |||
+ | When the firmware crashes ath10k collects various information which helps to debug the crash and creates a crash dump file. This is available via dev_coredump facility from /sys/class/devcoredump. | ||
+ | |||
+ | To automatically collect devcoredump files add script /usr/local/sbin/devcoredump-collect.sh: | ||
+ | |||
+ | <code> | ||
+ | #!/bin/sh | ||
+ | |||
+ | timestamp=$(date +%Y%m%d%H%M%S) | ||
+ | filename="/var/spool/devcoredump/devcoredump-${timestamp}.dump" | ||
+ | cp /sys/${DEVPATH}/data ${filename} | ||
+ | echo 1 > /sys/${DEVPATH}/data | ||
+ | logger "created ${filename}"</code> | ||
+ | |||
+ | Create a directory for the dump files: | ||
+ | |||
+ | <code> | ||
+ | sudo mkdir /var/spool/devcoredump</code> | ||
+ | |||
+ | And add a udev rules script /etc/udev/rules.d/50-devcoredump.rules: | ||
+ | |||
+ | <code> | ||
+ | SUBSYSTEM=="devcoredump", ACTION=="add", RUN+="/usr/local/sbin/devcoredump-collect.sh"</code> | ||
+ | |||
+ |