Ath9k kernel panic on TL-WR940N(EU) V4

Hi,

Flashing both the trunk and the 17.01.4 versions of tl-wr940n-v4-squashfs-factory.bin to the device results in the following kernel panic:

[    8.988494] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.999446] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    9.016471] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    9.024804] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    9.034798] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.048775] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    9.109605] xt_time: kernel timezone is -0000
[    9.170700] PPP generic driver version 2.4.2
[    9.177723] NET: Registered protocol family 24
[    9.236149] Data bus error, epc == 80e03770, ra == 80e03770
[    9.241913] Oops[#1]:
[    9.244262] CPU: 0 PID: 481 Comm: kmodloader Not tainted 4.9.67 #0
[    9.250638] task: 819cf8b8 task.stack: 81bae000
[    9.255311] $ 0   : 00000000 00000025 deadc0de 00000000
[    9.260740] $ 4   : b8115f18 00015f18 00000007 00000004
[    9.266169] $ 8   : 00000001 7c7c3c7c 7c7c7c7c 7c7c7c7c
[    9.271600] $12   : 7c7c3c7c 00000000 00000000 7c7c7c3c
[    9.277030] $16   : 00000064 81be8010 00000000 00015f18
[    9.282459] $20   : 00000007 00000004 00000004 000003ff
[    9.287889] $24   : 00000000 a7cc4a73
[    9.293319] $28   : 81bae000 81bafa10 81bafa9c 80e03770
[    9.298749] Hi    : 00000000
[    9.301715] Lo    : 00000064
[    9.304740] epc   : 80e03770 ath9k_hw_wait+0x64/0xb0 [ath9k_hw]
[    9.310856] ra    : 80e03770 ath9k_hw_wait+0x64/0xb0 [ath9k_hw]
[    9.316964] Status: 1100fc03 KERNEL EXL IE
[    9.321311] Cause : 4080801c (ExcCode 07)
[    9.325451] PrId  : 00019750 (MIPS 74Kc)
[    9.329498] Modules linked in: ath9k(+) ath9k_common pppoe ppp_async ath9k_hw ath pppox ppp_generic nf_conntrack_ipv6 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_CT slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack iptable_mangle iptable_filter ip_tables crc_ccitt compat ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables gpio_button_hotplug
[    9.389322] Process kmodloader (pid: 481, threadinfo=81bae000, task=819cf8b8, tls=77572df4)
[    9.397936] Stack : 804c0000 80cd3e10 00000000 00000025 000000ba 81be8010 00000000 00030000
[    9.406626]         00000300 00000400 00010000 80e1f7a4 00000000 805402a0 ffffff80 00000000
[    9.415317]         000003e8 de6bb81c 00002710 00000018 000003ff 80e20000 81a4e800 81be8010
[    9.424008]         99999999 00000001 81bafb2c 81be8434 00000001 80e1e9cc 81bae000 81bafab0
[    9.432699]         800c8998 81be8010 00020000 ffffffff 00000220 80e1fa9c 81be8038 80e03b40
[    9.441391]         ...
[    9.443929] Call Trace:
[    9.446469] [<80e03770>] ath9k_hw_wait+0x64/0xb0 [ath9k_hw]
[    9.452238] [<80e1f7a4>] ath9k_hw_setup_statusring+0xe18/0x1df8 [ath9k_hw]
[    9.459338] Code: 02202025  0040f809  00000000 <00541024> 10550008  24020001  0c076e8c  2404000a  1000fff4
[    9.469471]
[    9.471046] ---[ end trace ff5a4e9b40be9f63 ]---
[    9.476867] Kernel panic - not syncing: Fatal exception
[    9.482869] Rebooting in 1 seconds..

I've also tried tl-wr940n-v4-squashfs-factory-eu.bin and even tl-wr940n-v4-squashfs-factory-us.bin but still get the same result.

Any clues how to go about getting LEDE running on this device? Does function names ath9k_hw_wait and ath9k_hw_setup_statusring provide any useful information to debug this issue?

Thanks.

1 Like

do you tried to flash the sysupgrade.bin after flashing the factory.bin

There is no reason to do so.

Problem solved itself as the flash chip I was using seemed to be the cause of the issue.

For the benefit of future Google searches: I dumped the original 32Mbit flash onto a fresh 64Mbit part (as I wanted to expand the space later) and this, for some reason, caused the ath9k kernel panic. I didn't even suspect the flash size as a potential issue and thought it was a dud part but trying it again with another 64MBit part causes the exact same issue.

Anyone know why this might have been the issue, the art partition is still at the same offset on the large part.

Thanks.