This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
en:users:drivers:ath10k:debug [2015/04/24 14:34] Kalle Valo Add more complicated set bitrates examples |
en:users:drivers:ath10k:debug [2017/03/29 13:47] Kalle Valo Add a section about firmware crash dump files |
||
---|---|---|---|
Line 26: | Line 26: | ||
ATH10K_DBG_BMI = 0x00000400, | ATH10K_DBG_BMI = 0x00000400, | ||
ATH10K_DBG_REGULATORY = 0x00000800, | ATH10K_DBG_REGULATORY = 0x00000800, | ||
+ | ATH10K_DBG_TESTMODE = 0x00001000, | ||
+ | ATH10K_DBG_WMI_PRINT = 0x00002000, | ||
+ | ATH10K_DBG_PCI_PS = 0x00004000, | ||
+ | ATH10K_DBG_AHB = 0x00008000, | ||
ATH10K_DBG_ANY = 0xffffffff, | ATH10K_DBG_ANY = 0xffffffff, | ||
};</code> | };</code> | ||
Line 206: | 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" | ||
+ | cat /sys/${DEVPATH}/data > ${filename} | ||
+ | echo 1 > /sys/${DEVPATH}/data</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> | ||
+ | |||
+ |