Open jmarcet opened 6 years ago
I am getting a "Page nor Found" error 404 for all you pastbin.com links.
On my kernel 4.16-rc1 on openSUSE Tumbleweed, I get some warnings when I enable concurrent mode bur I do not see any kernel BUG. In my source, there is no BUG statement at net/core/dev.c:7197. Could you please post the code from your version around that line? I think the BUG happens because the static variable "dev_boot_phase" is still set to one. I have no idea why that might be the case.
I see, I uploaded them to my dropbox:
https://www.dropbox.com/s/69vjsxoslu8d3xp/master.log?dl=0 https://www.dropbox.com/s/egas3xuxkaawlzf/master-concurrent.log?dl=0 https://www.dropbox.com/s/r2xmkvw5vkx45xv/master-concurrent-dualmac.log?dl=0 https://www.dropbox.com/s/g04tbpze6zktw01/master-concurrent-dualmac%2B.log?dl=0
I am getting on a plane in a couple hours, I'll check it tonight or tomorrow morning.
For some reason, I could not click on the links above, but by cut and paste I could download them. If you wish, you can remove them from your dropbox.
I looked first at master.log. When you bring wlan0 up, the initial errors are
daemon.notice netifd: radio0 (3475): command failed: Not supported (-95) daemon.notice netifd: radio0 (3475): command failed: No such device (-19) daemon.notice netifd: radio0 (3475): Device setup failed: INTERFACE_CREATION_FAILED daemon.notice netifd: radio0 (3475): WARNING: Variable 'interfaces' does not exist or is not an array/object daemon.notice netifd: radio0 (3475): Cannot find device "wlan0"
The error of -95 means there was an ioctl call that the driver does not implement. The error of -19 means no such device, but it probably is triggered by the first one.
I have just committed patches that will tell us which routine is returning that -95 error. That should help narrow the search for the bug.
7175 static void rollback_registered_many(struct list_head *head)
7176 {
7177 › struct net_device *dev, *tmp;
7178 › LIST_HEAD(close_head);
7179
7180 › BUG_ON(dev_boot_phase);
7181 › ASSERT_RTNL();
7182
7183 › list_for_each_entry_safe(dev, tmp, head, unreg_list) {
7184 › › /* Some devices call without registering
7185 › › * for initialization unwind. Remove those
7186 › › * devices and proceed with the remaining.
7187 › › */
7188 › › if (dev->reg_state == NETREG_UNINITIALIZED) {
7189 › › › pr_debug("unregister_netdevice: device %s/%p never was registered\n",
7190 › › › › dev->name, dev);
7191
7192 › › › WARN_ON(1);
7193 › › › list_del(&dev->unreg_list);
7194 › › › continue;
7195 › › }
7196 › › dev->dismantle = true;
7197 › › BUG_ON(dev->reg_state != NETREG_REGISTERED);
7198 › }
Where can I get those commits? This repo hasn't been updated since Dec. 7th
I was working in the rtl8723bu, not rtl78192du. It will take a while to learn another source.
The patches should be there now.
There is a small error in the first of your commits, the double brackets have to go:
diff --git a/hal/rtl8192d_rf6052.c b/hal/rtl8192d_rf6052.c
index a224e00..f1821c5 100644
--- a/hal/rtl8192d_rf6052.c
+++ b/hal/rtl8192d_rf6052.c
@@ -782,7 +782,7 @@ PHY_RF6052_Config8192D(
#ifdef CONFIG_DUALMAC_CONCURRENT
if (pHalData->bSlaveOfDMSP)
{
- DBG_8192D(("PHY_RF6052_Config() skip configuration RF\n"));
+ DBG_8192D("PHY_RF6052_Config() skip configuration RF\n");
return rtStatus;
}
#endif
Also, I still need this:
--- ./core/rtw_pwrctrl.c-orig 2017-12-07 19:14:51.000000000 +0100
+++ ./core/rtw_pwrctrl.c 2018-02-12 11:53:01.921181311 +0100
@@ -200,7 +200,7 @@ static void pwr_state_check_handler(void
from_timer(padapter, t,
pwrctrlpriv.pwr_state_check_timer);
#else
- struct rtw_adapter *padapter = (struct adapter *)FunctionContext;
+ struct rtw_adapter *padapter = (struct rtw_adapter *)FunctionContext;
#endif
rtw_ps_cmd(padapter);
I just tested a new build with your latest commits but I don't see any new output in the logs, still the same error codes -95 and -19
I fixed the two errors, and made your changes in Makefile.
I rechecked all the places that the driver returns -EOPNOTSUPP. All have a pr_info() associated with them, thus there would be an extra line in the log if it came from those places.
One thing that bothers me is that I do not see the firmware load message logged. Is it possible that my new message was logged before your 'logread -f' command, and thus never output?
Great.
Yeah, I expected them too, but there was none. I'll check again with a new build.
The external firmware is not used, is it? In the sources it's configured to use an embedded firmware. I tried to force loading the external firmware and there was another build error on the loading function I do not remember right now. I'd have to do it again.
As for the logread
, no, I pasted all the output since the boot finished, i.e., the first thing I typed was the logread -f
and sent it to the background, then copy/pasted everything when I foregrounded it back.
I got some more info. I have been running the new build, I still don't see any debugging output.
I located the script which sets up wireless mac80211 connections https://github.com/openwrt/openwrt/blob/master/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
I added some debugging output and got this:
# fg
logread -f
Tue Feb 13 17:15:52 2018 user.notice root: list_phy_interfaces phy=phy0
Tue Feb 13 17:15:52 2018 user.notice root: list_phy_interfaces phy=phy0
Tue Feb 13 17:17:14 2018 user.notice root: get_freq phy=phy0 chan=11
Tue Feb 13 17:15:52 2018 daemon.notice netifd: radio1 (3152): command failed: No such device (-19)
Tue Feb 13 17:15:52 2018 daemon.notice netifd: radio0 (3151): command failed: Not supported (-95)
Tue Feb 13 17:15:52 2018 daemon.notice netifd: radio1 (3152): command failed: No such device (-19)
Tue Feb 13 17:17:14 2018 user.notice root: get_freq phy=phy0 chan=11
Tue Feb 13 17:15:52 2018 user.notice root: mac80211_iw_interface_add
Tue Feb 13 17:15:52 2018 user.notice root: iw phy phy0 interface add wlan0 type __ap
Tue Feb 13 17:15:52 2018 daemon.notice netifd: radio0 (3151): command failed: No such device (-19)
Tue Feb 13 17:15:52 2018 daemon.notice netifd: radio0 (3151): Device setup failed: INTERFACE_CREATION_FAILED
Tue Feb 13 17:15:52 2018 daemon.notice netifd: radio0 (3151): WARNING: Variable 'interfaces' does not exist or is not an array/object
Tue Feb 13 17:15:52 2018 daemon.notice netifd: radio1 (3152): command failed: Not supported (-95)
Tue Feb 13 17:15:52 2018 user.notice root: mac80211_iw_interface_add
Tue Feb 13 17:15:52 2018 user.notice root: iw phy phy0 interface add wlan0 type __ap
Tue Feb 13 17:15:52 2018 daemon.notice netifd: radio1 (3152): command failed: No such device (-19)
Tue Feb 13 17:15:52 2018 daemon.notice netifd: radio1 (3152): Device setup failed: INTERFACE_CREATION_FAILED
Tue Feb 13 17:15:52 2018 daemon.notice netifd: radio1 (3152): WARNING: Variable 'interfaces' does not exist or is not an array/object
Also, now I can rmmod the driver if the interfaces are still down and there is no kernel BUG, if they are up, then the BUG is triggered.
It seems clear that the -95 is not coming from the driver, but somewhere upstream of it. It is going to take a while to try to understand this material.
One further thing. Your device is a SINGLEPHY-SINGLEMAC. Mine is a double-double. I don't think that will affect the results, but we have to keep it in mind.
Sigh. I am still trying to trace back both errors.
In kernel 4.14 my device is recognized as a singlephy-singlemac, even when you do get two phys and two macs per device. In kernel 3.18 it doesn't say anything in the logs, but the device shows up with two phys and two macs too, and both work relatively well at the same time.
One thing I noticed earlier is that your log shows
[ 10.418066] r8192du: EEPROM type is E-FUSE, Unknown CUT chip [ 10.798801] r8192du: MacPhyMode: SINGLEMAC_SINGLEPHY [ 10.803926] Chip Version ID: VERSION_NORMAL_CHIP_92D_D_CUT_SINGLEPHY.
I just committed a patch to help debug why that first statement says that the CUT is unknown while the third line says it is a D CUT. That may not be significant; however, there is one place where the code branches depending on the CUT. BTW, my chip is an E CUT.
I just built and run it:
[ 16.919473] r8192du: EEPROM type is E-FUSE, Unknown CUT chip, ChipValue 0x33cc
[ 17.284064] r8192du: MacPhyMode: SINGLEMAC_SINGLEPHY
[ 17.284192] Chip Version ID: VERSION_NORMAL_CHIP_92D_D_CUT_SINGLEPHY.
[ 17.299313] usbcore: registered new interface driver rtl8192du
[ 17.336213] r8192du: MacPhyMode: SINGLEMAC_SINGLEPHY
[ 19.749335] pdmpriv->TxPowerTrackControl = 1
Interesting. The value of 0x33cc is byte swapped with the value for E-cut. That made me wonder if we have a big-endian problem, even though I thought the sun7i is little endian. I tried the driver on my PowerBook G4 with a PPC processor. It is big endian. It reads the chip version, reports a dual mac, dual phy with E cut just like x86_64, and then hangs. The CPU is not locked as I can open a second terminal and do anything as long as I do not touch the network system.
Obviously, there is a lot more work that needs to be done on this driver. I am also trying to find why there is a warning caused by the wrong interface type.
Interesting. The value of 0x33cc is byte swapped with the value for E-cut. That made me wonder if we have a big-endian problem, even though I thought the sun7i is little endian. I tried the driver on my PowerBook G4 with a PPC processor. It is big endian. It reads the chip version, reports a dual mac, dual phy with E cut just like x86_64, and then hangs. The CPU is not locked as I can open a second terminal and do anything as long as I do not touch the network system.
Obviously, there is a lot more work that needs to be done on this driver. I am also trying to find why there is a warning caused by the wrong interface type.
I just saw the new branch you pushed. I built it and am running it, I see lots of debugging output, but nothing noteworthy https://www.dropbox.com/s/35rj6vsl3ljdsfz/20180223-4.4.18-boot.log
Really interesting your findings. With kernel 3.18 it definitely behaves like a dual phy dual mac chip, it is not clear since the logs do not have any info about it, but we use both wlanX interfaces and they have different MACs.
I created that branch to be able to transfer debugging changes to my PowerBook. The vi in the PPC version of Ubuntu is positively brain dead, and editing on that machine is painful. Any improvements that I make in that branch will be applied to master. The driver works the same on PPC as it does on x86_64.
I suspect that both 0x33CC and 0xCC33 represent an E-CUT. That makes me wonder if the detection of the MAC and PHY is also screwed up. The latest commit will log that value for comparison with my device.
I finally made some progress. The warnings from _cfg80211_disconnected() were due to the shutdown routine setting iftype to MONITOR before the cfg80211 job queue could run.
For the moment, I have disabled CONFIG_CONCURRENT_MODE. After fixing some build errors, the driver works when CONFIG_DUALMAC_CONCURRENT is set.
I see that udevd is consuming 100% of a CPU when CONFIG_CONCURRENT_MODE is set. Now to discover why.
I made some progress. I fixed the warnings that happened because the interface type was wrong. I also fixed the NULL dereference bug on shutdown.
At the moment, I have disabled CONFIG_DUALMAC_CONCURRENT, but enabled CONFIG_CONCURRENT_MODE. On my double MAC, double PHY device, the driver creates 4 wifi devices, 2 in the 2.4 GHz band, and 2 in 5 GHz. All 4 are fully functional as stations. I have not tested them as APs. Unfortunately, the driver works this way only part of the time. Most loads result in the condition where udevd is using 100% of a CPU.
I suspected that something is not being initialized. To test this, I changed all kmalloc() calls to kzalloc(). I also eliminated a large array on the stack that was not preset to zero. None of these have helped. The other possibility is that I have a race condition. If that is the case, then changing the processor speed should change the condition a lot. As I do not have a faster x86_64 platform, I will try on the PowerBook, which is a lot slower.
Please try again on the sun7i. In addition, if you find any place where the initialization is not complete, please let me know.
Hi,
I've just tried all your changes in master, and unfortunately I don't see any positive difference.
I built it with CONFIG_CONCURRENT_MODE enabled and CONFIG_DUALMAC_CONCURRENT disabled.
It is still detected as single phy single mac chip, it triggers the same BUG on rmmoding, the interfaces still vanish and the reported errors -19 and -95 remain unchanged.
I also tried the tip of the test branch, and identified as an E_CUT model, it behaved exactly the same way.
[ 9.617866] r8192du [0x00000800,6]
[ 9.617880] +init_net_dev
[ 9.625291] **** In rtl8192d_ReadChipVersion: line 560
[ 9.630956] **** In rtl8192d_ReadChipVersion: line 580
[ 9.636119] **** In rtw_hal_read_chip_version: line 40
[ 9.641899] r8192du: EEPROM type is E-FUSE, E-CUT chip
[ 10.006393] r8192du: MacPhyMode: SINGLEMAC_SINGLEPHY
[ 10.011523] Chip Version ID: VERSION_NORMAL_CHIP_92D_E_CUT_SINGLEPHY.
[ 10.024440] **** In rtl8192d_ReadChipVersion: line 560
[ 10.030358] **** In rtl8192d_ReadChipVersion: line 580
[ 10.035530] **** In rtw_hal_read_chip_version: line 40
[ 10.044378] **** In rtw_drv_if2_init: line 1842
[ 10.051196] **** In rtw_drv_if2_init: line 1846
[ 10.057373] **** In rtw_drv_if2_init: line 1856
[ 10.062692] **** In rtw_drv_if2_init: line 1858
[ 10.067384] **** In rtw_drv_if2_init: line 1884
[ 10.071984] **** In rtw_drv_if2_init: line 1886
[ 10.080429] **** In rtw_drv_if2_init: line 1902
root@keezel:/# ifconfig -a
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:36 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2504 (2.4 KiB) TX bytes:2504 (2.4 KiB)
wlan0 Link encap:Ethernet HWaddr E0:B9:4D:75:04:42
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan1 Link encap:Ethernet HWaddr E2:B9:4D:75:04:42
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
root@keezel:/# logread -f
^Z[2]+ Stopped logread -f
root@keezel:/# /etc/init.d/network reload
root@keezel:/# fg
logread -f
Tue Feb 13 17:08:13 2018 daemon.notice netifd: Interface 'lan' is enabled
Tue Feb 13 17:08:13 2018 daemon.notice netifd: Interface 'lan' is setting up now
Tue Feb 13 17:08:13 2018 daemon.notice netifd: Interface 'lan' is now up
Tue Feb 13 17:08:13 2018 kern.info kernel: [ 117.202503] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
Tue Feb 13 17:08:13 2018 user.notice firewall: Reloading firewall due to ifup of lan (br-lan)
Tue Feb 13 17:08:13 2018 daemon.notice netifd: radio0 (3251): command failed: No such device (-19)
Tue Feb 13 17:08:13 2018 daemon.notice netifd: radio0 (3251): command failed: No such device (-19)
Tue Feb 13 17:08:13 2018 daemon.notice netifd: radio1 (3252): command failed: Not supported (-95)
Tue Feb 13 17:08:13 2018 daemon.notice netifd: radio0 (3251): command failed: Not supported (-95)
Tue Feb 13 17:08:13 2018 daemon.notice netifd: radio1 (3252): command failed: No such device (-19)
Tue Feb 13 17:08:13 2018 daemon.notice netifd: radio1 (3252): Device setup failed: INTERFACE_CREATION_FAILED
Tue Feb 13 17:08:13 2018 daemon.notice netifd: radio1 (3252): WARNING: Variable 'interfaces' does not exist or is not an array/object
Tue Feb 13 17:08:13 2018 daemon.notice netifd: radio0 (3251): command failed: No such device (-19)
Tue Feb 13 17:08:13 2018 daemon.notice netifd: radio0 (3251): Device setup failed: INTERFACE_CREATION_FAILED
Tue Feb 13 17:08:13 2018 daemon.notice netifd: radio0 (3251): WARNING: Variable 'interfaces' does not exist or is not an array/object
^Z[2]+ Stopped logread -f
root@keezel:/# ifconfig -a
br-lan Link encap:Ethernet HWaddr 4E:CA:82:AE:E8:4E
inet addr:192.168.11.1 Bcast:192.168.11.255 Mask:255.255.255.0
inet6 addr: fd09:a563:dda6::1/60 Scope:Global
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:184 errors:0 dropped:0 overruns:0 frame:0
TX packets:184 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12568 (12.2 KiB) TX bytes:12568 (12.2 KiB)
root@keezel:/# rmmod 8192du
[ 210.917667] ------------[ cut here ]------------
[ 210.922295] kernel BUG at net/core/dev.c:7197!
[ 210.926736] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[ 210.932561] Modules linked in: ath9k_htc ath9k_common rtl8192cu rtl8192c_common rtl_usb rt2800usb rt2800lib rt2500usb pppoe ppp_async carl9170 brcmfmac ath9k_hw ath6kl_usb ath6kl_core ath 8192du(-) zd1211rw usb8xxx rtlwifi rtl8xxxu rtl8187 rt73usb rt2x00usb rt2x00lib pppox ppp_generic p54usb p54common nf_conntrack_ipv6 mt7601u mac80211 libertas iptable_nat ipt_REJECT ipt_MASQUE
RADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TPROXY xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_DSCP xt_CT xt_CLASSIFY wireguard slhc r8712u nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ip
v4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_defrag_ipv6
[ 211.003478] nf_defrag_ipv4 nf_conntrack_rtcache lib80211_crypt_wep lib80211_crypt_tkip lib80211_crypt_ccmp lib80211 iptable_mangle iptable_filter ipt_ECN ip_tables crc_itu_t crc_ccitt compat brcmutil sch_cake nf_conntrack act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw sch_tbf sch_htb sch_hfsc sch_ingress xt_set ip_set_list_set ip_set_hash_netiface
ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables ifb ip6_udp_tun
nel udp_tunnel tun eeprom_93cx6
[ 211.072896] CPU: 0 PID: 3571 Comm: rmmod Not tainted 4.14.18 #0
[ 211.078810] Hardware name: Allwinner sun7i (A20) Family
[ 211.084030] task: df55a4c0 task.stack: de4f2000
[ 211.088566] PC is at rollback_registered_many+0xb0/0x3ec
[ 211.093874] LR is at rollback_registered_many+0x2c/0x3ec
[ 211.099180] pc : [<c05a2058>] lr : [<c05a1fd4>] psr: 20000013
[ 211.105438] sp : de4f3e70 ip : 00000000 fp : 00000000
[ 211.110656] r10: 00000000 r9 : de4f2000 r8 : 00000001
[ 211.115875] r7 : de4f3e78 r6 : de4f3e54 r5 : de4f3e98 r4 : de7cc800
[ 211.122394] r3 : 00000003 r2 : 00000000 r1 : 00000000 r0 : 00000001
[ 211.128915] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 211.136040] Control: 30c5387d Table: 5e28f6c0 DAC: fffffffd
[ 211.141778] Process rmmod (pid: 3571, stack limit = 0xde4f2210)
[ 211.147691] Stack: (0xde4f3e70 to 0xde4f4000)
[ 211.152045] 3e60: de4f3e98 00000000 de4f3e78 de4f3e78
[ 211.160214] 3e80: de7cc800 00000000 dec77a00 dec77a00 bf5a48f4 c05a23b4 de7cc844 de7cc844
[ 211.168384] 3ea0: 00000000 c05a32e8 de7cc800 de881600 dec77a00 c05a3344 e0d97000 bf5887c8
[ 211.176554] 3ec0: e0d4c000 bf588d4c dec77a20 dec60870 dec60800 c04e6fa8 00000000 ffffffed
[ 211.184723] 3ee0: 00000000 dec77a20 dec60870 bf5a48f4 dec77a54 dec608a4 de4f2000 00000000
[ 211.192892] 3f00: 00000000 c047ad24 dec77a20 bf5a48f4 bf5a48e8 00000081 c0206fe4 c047ae38
[ 211.201062] 3f20: bf5a48f4 bf5a48f4 bf5a48e8 c047a0bc bf5a48c0 c04e64e0 bf5a5b40 c0c03c08
[ 211.209232] 3f40: b6e97710 00000081 c0206fe4 bf594bc0 bf5a5b40 c027ae58 32393138 00007564
[ 211.217401] 3f60: 00000000 de18ecc0 00000000 df55a4c0 de18ecc0 00000000 df55a4c0 df55a938
[ 211.225571] 3f80: de18ecc0 c0232a64 c0206fe4 de4f2000 004f3fb0 01cafe86 00010034 1fbe3c7e
[ 211.233740] 3fa0: 0002302c c0206e00 00010034 1fbe3c7e b6e97710 00000000 00000000 00000000
[ 211.241908] 3fc0: 00010034 1fbe3c7e 0002302c 00000081 00000000 00000000 00000001 00000000
[ 211.250077] 3fe0: be9a1dc4 be9a1da8 00010ec0 b6ec8b20 a0000010 b6e97710 00000000 00000000
[ 211.258263] [<c05a2058>] (rollback_registered_many) from [<c05a23b4>] (rollback_registered+0x20/0x34)
[ 211.267478] [<c05a23b4>] (rollback_registered) from [<c05a32e8>] (unregister_netdevice_queue+0x68/0xac)
[ 211.276862] [<c05a32e8>] (unregister_netdevice_queue) from [<c05a3344>] (unregister_netdev+0x18/0x20)
[ 211.286209] [<c05a3344>] (unregister_netdev) from [<bf5887c8>] (rtw_drv_if2_stop+0x24/0xa4 [8192du])
[ 211.295508] [<bf5887c8>] (rtw_drv_if2_stop [8192du]) from [<bf588d4c>] (rtw_dev_remove+0x64/0xbc [8192du])
[ 211.305197] [<bf588d4c>] (rtw_dev_remove [8192du]) from [<c04e6fa8>] (usb_unbind_interface+0x80/0x204)
[ 211.314504] [<c04e6fa8>] (usb_unbind_interface) from [<c047ad24>] (device_release_driver_internal+0x128/0x1d0)
[ 211.324498] [<c047ad24>] (device_release_driver_internal) from [<c047ae38>] (driver_detach+0x60/0x6c)
[ 211.333710] [<c047ae38>] (driver_detach) from [<c047a0bc>] (bus_remove_driver+0x64/0x8c)
[ 211.341796] [<c047a0bc>] (bus_remove_driver) from [<c04e64e0>] (usb_deregister+0x5c/0xb8)
[ 211.350010] [<c04e64e0>] (usb_deregister) from [<bf594bc0>] (cleanup_module+0x58/0x498 [8192du])
[ 211.358874] [<bf594bc0>] (cleanup_module [8192du]) from [<c027ae58>] (SyS_delete_module+0x104/0x1d8)
[ 211.368008] [<c027ae58>] (SyS_delete_module) from [<c0206e00>] (ret_fast_syscall+0x0/0x4c)
[ 211.376268] Code: ea000003 e3530001 e5c48311 0a000000 (e7f001f2)
[ 211.382366] ---[ end trace 6d48c5c71140b1c2 ]---
[ 211.386979] Kernel panic - not syncing: Fatal exception
[ 211.392209] CPU1: stopping
[ 211.394927] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 4.14.18 #0
[ 211.402138] Hardware name: Allwinner sun7i (A20) Family
[ 211.407377] [<c020d1b0>] (unwind_backtrace) from [<c0209e3c>] (show_stack+0x10/0x14)
[ 211.415121] [<c0209e3c>] (show_stack) from [<c068a69c>] (dump_stack+0x7c/0x9c)
[ 211.422340] [<c068a69c>] (dump_stack) from [<c020c0ac>] (handle_IPI+0xc8/0x170)
[ 211.429643] [<c020c0ac>] (handle_IPI) from [<c0201404>] (gic_handle_irq+0x7c/0x98)
[ 211.437207] [<c0201404>] (gic_handle_irq) from [<c020a8b8>] (__irq_svc+0x58/0x8c)
[ 211.444678] Exception stack(0xdf481f88 to 0xdf481fd0)
[ 211.449727] 1f80: 00000000 00005ff4 1f18a000 c0212ba0 df480000 c0c03c24
[ 211.457897] 1fa0: c0c03c70 c0c5b2c8 40007000 410fc074 00000000 00000000 1f18a000 df481fd8
[ 211.466062] 1fc0: c0207900 c0207904 60000013 ffffffff
[ 211.471114] [<c020a8b8>] (__irq_svc) from [<c0207904>] (arch_cpu_idle+0x2c/0x38)
[ 211.478510] [<c0207904>] (arch_cpu_idle) from [<c0249f64>] (do_idle+0xa4/0x108)
[ 211.485817] [<c0249f64>] (do_idle) from [<c024a224>] (cpu_startup_entry+0x18/0x1c)
[ 211.493380] [<c024a224>] (cpu_startup_entry) from [<402016cc>] (0x402016cc)
[ 211.500338] Rebooting in 3 seconds..
I'm working on a sun7i (A20) device with a rtl8192du integrated usb dongle, 0bda:8193 Realtek Semiconductor Corp. RTL8192DU 802.11an WLAN Adapter.
The current working code uses kernel 3.18, where the rtl8192du works relatively well, with an older version of the driver in this repo.
On current openwrt master, with kernel 4.14.18, and mac80211 from backports-2017-11-01, first I need a few fixes in order to get it to compile. Once it builds and loads, the wlanX devices vanish whenever you try to down/up them. If you try to rmmod 8192du, you get an oops on net/core/dev.c:7197:
You can see logs from a fresh boot on openwrt master with the rtl8192du with the fixes to make it build: https://pastebin.com/6fnb1j1q
With concurrent mode enabled: https://pastebin.com/s7zrJRax
With concurrent mode and dualmac mode enabled: https://pastebin.com/Yur9jKZr https://pastebin.com/5X3CH1Se
The changes I do in order to build it on openwrt are:
If I want to enable concurrent mode, I also need:
Last, to build with concurrent and dual mac modes enabled:
For reference, this is the openwrt Makefile I'm using to build the module: