rtl8192du icon indicating copy to clipboard operation
rtl8192du copied to clipboard

Issues on openwrt on sun7i platform

Open jmarcet opened this issue 6 years ago • 23 comments

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:

root@keezel:/# rmmod 8192du                                                                                                                                                                                                                                                                                                    
[  247.955428] ------------[ cut here ]------------                                                                                                                                                                                                                                                                            
[  247.960059] kernel BUG at net/core/dev.c:7197!                                                                                                                                                                                                                                                                              
[  247.964498] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM                                                                                                                                                                                                                                                              
[  247.970324] Modules linked in: ath9k_htc ath9k_common rtl8192cu rtl8192c_common rtl_usb rt2800usb rt2800lib rt2500usb pppoe ppp_async cdc_mbim carl9170 brcmfmac ath9k_hw ath6kl_usb ath6kl_core ath 8192du(-) zd1211rw usb8xxx sr9700 smsc95xx sierra_net rtlwifi rtl8xxxu rtl8187 rt73usb rt2x00usb rt2x00lib rndis_host q
mi_wwan pppox ppp_generic plusb p54usb p54common nf_conntrack_ipv6 mt7601u mcs7830 mac80211 libertas kalmia iptable_nat ipt_REJECT ipt_MASQUERADE huawei_cdc_ncm dm9601 cfg80211 cdc_subset cdc_ncm cdc_ether cdc_eem ax88179_178a asix 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_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_DSCP xt_CT xt_CLASSIFY                                                                                                                                           
[  248.041602]  wireguard usbnet slhc rtl8150 r8712u r8152 pegasus 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 lib80211_crypt_wep lib80211_crypt_tkip lib80211_crypt_ccmp lib80211 kaweth iptable_mangle iptable_
filter ipt_ECN ipheth ip_tables hso crc_itu_t crc_ccitt compat cdc_wdm 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 cryptodev ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_table
s x_tables ifb ip6_udp_tunnel udp_tunnel tun eeprom_93cx6 authenc uas sd_mod gpio_button_hotplug button_hotplug                                                                                                                                                                                                                
[  248.106871] CPU: 0 PID: 3700 Comm: rmmod Not tainted 4.14.18 #0                                                                                                                                                                                                                                                             
[  248.112782] Hardware name: Allwinner sun7i (A20) Family                                                                                                                                                                                                                                                                     
[  248.118003] task: deb4ca80 task.stack: ddcb8000                                                                                                                                                                                                                                                                             
[  248.122539] PC is at rollback_registered_many+0xb0/0x3ec                                                                                                                                                                                                                                                                    
[  248.127845] LR is at rollback_registered_many+0x2c/0x3ec                                                                                                                                                                                                                                                                    
[  248.133151] pc : [<c0599f78>]    lr : [<c0599ef4>]    psr: 20000013                                                                                                                                                                                                                                                         
[  248.139408] sp : ddcb9e70  ip : 00000000  fp : 00000000                                                                                                                                                                                                                                                                     
[  248.144625] r10: 00000000  r9 : ddcb8000  r8 : 00000001                                                                                                                                                                                                                                                                     
[  248.149844] r7 : ddcb9e78  r6 : ddcb9e54  r5 : ddcb9e98  r4 : df6cb000                                                                                                                                                                                                                                                      
[  248.156363] r3 : 00000003  r2 : 00000000  r1 : 00000000  r0 : 00000001                                                                                                                                                                                                                                                      
[  248.162883] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user                                                                                                                                                                                                                                               
[  248.170009] Control: 30c5387d  Table: 5df63e40  DAC: fffffffd                                                                                                                                                                                                                                                               
[  248.175748] Process rmmod (pid: 3700, stack limit = 0xddcb8210)                                                                                                                                                                                                                                                             
[  248.181661] Stack: (0xddcb9e70 to 0xddcba000)                                                                                                                                                                                                                                                                               
[  248.186015] 9e60:                                     ddcb9e98 00000000 ddcb9e78 ddcb9e78                                                                                                                                                                                                                                   
[  248.194185] 9e80: df6cb000 00000000 def20800 def20800 bf5f78f4 c059a2d4 df6cb044 df6cb044                                                                                                                                                                                                                                   
[  248.202354] 9ea0: 00000000 c059b208 df6cb000 df6cb000 def20800 c059b264 e0d71000 bf5db744
[  248.210523] 9ec0: def20820 def2b470 def2b400 def20800 bf5f78f4 c04deed0 00000000 ffffffed
[  248.218692] 9ee0: 00000000 def20820 def2b470 bf5f78f4 def20854 def2b4a4 ddcb8000 00000000
[  248.226862] 9f00: 00000000 c0472c4c def20820 bf5f78f4 bf5f78e8 00000081 c0206fe4 c0472d60
[  248.235032] 9f20: bf5f78f4 bf5f78f4 bf5f78e8 c0471fe4 bf5f78c0 c04de408 bf5f8b40 c0c03c08
[  248.243202] 9f40: b6f27790 00000081 c0206fe4 bf5e7204 bf5f8b40 c027adf8 32393138 00007564
[  248.251371] 9f60: 00000000 ddfb5600 00000000 deb4ca80 ddfb5600 00000000 deb4ca80 deb4cef8
[  248.259541] 9f80: ddfb5600 c0232a38 c0206fe4 ddcb8000 00cb9fb0 01cafe86 00010034 1fbe3c7e
[  248.267710] 9fa0: 0002302c c0206e00 00010034 1fbe3c7e b6f27790 00000000 00000000 00000000
[  248.275878] 9fc0: 00010034 1fbe3c7e 0002302c 00000081 00000000 00000000 00000001 00000000
[  248.284047] 9fe0: beb96dc4 beb96da8 00010ec0 b6f58b20 a0000010 b6f27790 00000000 00000000
[  248.292232] [<c0599f78>] (rollback_registered_many) from [<c059a2d4>] (rollback_registered+0x20/0x34)
[  248.301446] [<c059a2d4>] (rollback_registered) from [<c059b208>] (unregister_netdevice_queue+0x68/0xac)
[  248.310834] [<c059b208>] (unregister_netdevice_queue) from [<c059b264>] (unregister_netdev+0x18/0x20)
[  248.320185] [<c059b264>] (unregister_netdev) from [<bf5db744>] (rtw_dev_remove+0xa0/0x138 [8192du])
[  248.329379] [<bf5db744>] (rtw_dev_remove [8192du]) from [<c04deed0>] (usb_unbind_interface+0x80/0x204)
[  248.338685] [<c04deed0>] (usb_unbind_interface) from [<c0472c4c>] (device_release_driver_internal+0x128/0x1d0)
[  248.348678] [<c0472c4c>] (device_release_driver_internal) from [<c0472d60>] (driver_detach+0x60/0x6c)
[  248.357888] [<c0472d60>] (driver_detach) from [<c0471fe4>] (bus_remove_driver+0x64/0x8c)
[  248.365973] [<c0471fe4>] (bus_remove_driver) from [<c04de408>] (usb_deregister+0x5c/0xb8)
[  248.374187] [<c04de408>] (usb_deregister) from [<bf5e7204>] (cleanup_module+0x58/0xe54 [8192du])
[  248.383039] [<bf5e7204>] (cleanup_module [8192du]) from [<c027adf8>] (SyS_delete_module+0x104/0x1d8)
[  248.392173] [<c027adf8>] (SyS_delete_module) from [<c0206e00>] (ret_fast_syscall+0x0/0x4c)
[  248.400432] Code: ea000003 e3530001 e5c48311 0a000000 (e7f001f2)
[  248.406530] ---[ end trace 3003e40c8aa5f8b9 ]---
[  248.411144] Kernel panic - not syncing: Fatal exception
[  248.416377] CPU1: stopping
[  248.419097] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D         4.14.18 #0
[  248.426308] Hardware name: Allwinner sun7i (A20) Family
[  248.431546] [<c020d1b0>] (unwind_backtrace) from [<c0209e3c>] (show_stack+0x10/0x14)
[  248.439287] [<c0209e3c>] (show_stack) from [<c068257c>] (dump_stack+0x7c/0x9c)
[  248.446507] [<c068257c>] (dump_stack) from [<c020c0ac>] (handle_IPI+0xc8/0x170)
[  248.453810] [<c020c0ac>] (handle_IPI) from [<c0201404>] (gic_handle_irq+0x7c/0x98)
[  248.461375] [<c0201404>] (gic_handle_irq) from [<c020a8b8>] (__irq_svc+0x58/0x8c)
[  248.468847] Exception stack(0xdf481f88 to 0xdf481fd0)
[  248.473895] 1f80:                   00000000 0000e700 1f18a000 c0212ba0 df480000 c0c03c24
[  248.482064] 1fa0: c0c03c70 c0c5b208 40007000 410fc074 00000000 00000000 1f18a000 df481fd8
[  248.490230] 1fc0: c0207900 c0207904 60000013 ffffffff
[  248.495281] [<c020a8b8>] (__irq_svc) from [<c0207904>] (arch_cpu_idle+0x2c/0x38)
[  248.502677] [<c0207904>] (arch_cpu_idle) from [<c0249f3c>] (do_idle+0xa4/0x108)
[  248.509983] [<c0249f3c>] (do_idle) from [<c024a1fc>] (cpu_startup_entry+0x18/0x1c)
[  248.517547] [<c024a1fc>] (cpu_startup_entry) from [<402016cc>] (0x402016cc)
[  248.524504] Rebooting in 3 seconds..

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:

--- orig/Makefile       2017-12-07 19:14:51.000000000 +0100
+++ new/Makefile        2018-02-02 11:10:34.640372794 +0100
@@ -99,8 +102,8 @@ endif
 SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc/powerpc/)
 ARCH ?= $(SUBARCH)
 CROSS_COMPILE ?=
-KVER  := $(shell uname -r)
-KSRC := /lib/modules/$(KVER)/build
+KVER  ?= $(shell uname -r)
+KSRC ?= /lib/modules/$(KVER)/build
 MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
 INSTALL_PREFIX :=
 

--- ./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);

If I want to enable concurrent mode, I also need:

+++ ./include/autoconf.h        2018-02-09 15:23:39.321570789 +0100
@@ -60,7 +60,7 @@
 /* define CONFIG_SET_SCAN_DENY_TIMER */
 #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable,*/
 
-//#define CONFIG_CONCURRENT_MODE 1
+#define CONFIG_CONCURRENT_MODE 1
 #ifdef CONFIG_CONCURRENT_MODE
        #define CONFIG_TSF_RESET_OFFLOAD 1                      /*  For 2 PORT TSF SYNC. */
 #endif /*  CONFIG_CONCURRENT_MODE */
+++ ./hal/rtl8192d_rf6052.c     2018-02-08 10:59:06.755296179 +0100
@@ -782,7 +782,7 @@ PHY_RF6052_Config8192D(
 #ifdef CONFIG_DUALMAC_CONCURRENT
        if (pHalData->bSlaveOfDMSP)
        {
-               DBG_871X(("PHY_RF6052_Config() skip configuration RF\n"));
+               DBG_8192D("PHY_RF6052_Config() skip configuration RF\n");
                return rtStatus;
        }
 #endif

Last, to build with concurrent and dual mac modes enabled:

+++ ./include/autoconf.h        2018-02-09 15:23:39.321570789 +0100
@@ -60,7 +60,8 @@
 /* define CONFIG_SET_SCAN_DENY_TIMER */
 #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable,*/
 
-//#define CONFIG_CONCURRENT_MODE 1
+#define CONFIG_CONCURRENT_MODE 1
+#define CONFIG_DUALMAC_CONCURRENT 1
 #ifdef CONFIG_CONCURRENT_MODE
        #define CONFIG_TSF_RESET_OFFLOAD 1                      /*  For 2 PORT TSF SYNC. */
 #endif /*  CONFIG_CONCURRENT_MODE */
+++ ./core/rtw_mlme_ext.c       2018-02-08 10:42:40.475567219 +0100
@@ -7198,7 +7198,7 @@ void dc_SetBWMode(struct rtw_adapter *ad
        _enter_critical_mutex(&
                              (adapter_to_dvobj(ptarget_adapter)->setbw_mutex));
 
-       rtw_hal_set_bwmode(ptarget_adapter, (HT_CHANNEL_WIDTH) bwmode,
+       rtw_hal_set_bwmode(ptarget_adapter, (enum HT_CHANNEL_WIDTH) bwmode,
                           channel_offset);
 
        _exit_critical_mutex(&(adapter_to_dvobj(ptarget_adapter)->setbw_mutex));
+++ ./hal/rtl8192d_dm.c 2018-02-08 11:29:04.755120908 +0100
@@ -877,7 +877,7 @@ static void dm_CCK_PacketDetectionThresh
                if (pdmpriv->bChangeCCKPDStateForAnotherMacOfDMSP)
                {
                        DBG_8192D("dm_CCK_PacketDetectionThresh_DMSP(): mac 0 set for mac1\n");
-                       if (pdmpriv->curcckpdstateForAnotherMacOfDMSP == CCK_PD_STAGE_LOWRSSI)
+                       if (pdmpriv->CurCCKPDStateForAnotherMacOfDMSP == CCK_PD_STAGE_LOWRSSI)
                        {
                                PHY_SetBBReg(adapter, rCCK0_CCA, maskbyte2, 0x83);
                        }
@@ -920,7 +920,7 @@ static void dm_CCK_PacketDetectionThresh
                        Buddydmpriv = &GET_HAL_DATA(Buddyadapter)->dmpriv;
                        DBG_8192D("dm_CCK_PacketDetectionThresh_DMSP(): bslave case\n");
                        Buddydmpriv->bChangeCCKPDStateForAnotherMacOfDMSP = true;
-                       Buddydmpriv->curcckpdstateForAnotherMacOfDMSP = dm_digtable->curcckpdstate;
+                       Buddydmpriv->CurCCKPDStateForAnotherMacOfDMSP = dm_digtable->curcckpdstate;
                }
                else
                {

For reference, this is the openwrt Makefile I'm using to build the module:

# Copyright (C) 2006-2018 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=rtl8192du
PKG_VERSION:=2017-12-07
PKG_RELEASE:=$(PKG_SOURCE_VERSION)

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/lwfinger/rtl8192du
PKG_SOURCE_VERSION:=84d1edb3e738ec25dbab1c2ddcb931832e61e802
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MAINTAINER:=Javier Marcet <[email protected]>
PKG_LICENSE:=GPLv2

STAMP_CONFIGURED_DEPENDS := $(STAGING_DIR)/usr/include/mac80211-backport/backport/autoconf.h

include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk

NOSTDINC_FLAGS = \
        -I$(PKG_BUILD_DIR)/include \
        -I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
        -I$(STAGING_DIR)/usr/include/mac80211-backport \
        -I$(STAGING_DIR)/usr/include/mac80211/uapi \
        -I$(STAGING_DIR)/usr/include/mac80211 \
        -include backport/autoconf.h \
        -include backport/backport.h

define KernelPackage/rtl8192du
  SUBMENU:=Wireless Drivers
  TITLE:=Realtek RTL8192DU wireless USB 802.11n driver
  DEPENDS:=@USB_SUPPORT +kmod-cfg80211 +kmod-mac80211 +kmod-usb-core +wireless-tools
  FILES:= $(PKG_BUILD_DIR)/8192du.$(LINUX_KMOD_SUFFIX)
# AUTOLOAD:=$(call AutoProbe,8192du)
endef

define KernelPackage/rtl8192du/description
  Kernel modules for the Realtek 8192DU USB 802.11n wireless USB adapters
endef

define Build/Compile
        +$(MAKE) $(PKG_JOBS) -C $(LINUX_DIR) \
                $(KERNEL_MAKE_FLAGS) \
                SUBDIRS="$(PKG_BUILD_DIR)" \
                CONFIG_RTL8192DU=m \
                NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
                M="$(PKG_BUILD_DIR)" \
                src="$(PKG_BUILD_DIR)" \
                TopDIR="$(PKG_BUILD_DIR)" \
                modules
endef

define Build/Configure
endef

define KernelPackage/rtl8192du/install
        $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtl8192dufw.bin $(1)/lib/firmware/rtlwifi/
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/rtl8192dufw_wol.bin $(1)/lib/firmware/rtlwifi/
endef

$(eval $(call KernelPackage,rtl8192du))

jmarcet avatar Feb 17 '18 17:02 jmarcet

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.

lwfinger avatar Feb 17 '18 21:02 lwfinger

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.

jmarcet avatar Feb 18 '18 12:02 jmarcet

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.

lwfinger avatar Feb 18 '18 17:02 lwfinger

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 ›   }

jmarcet avatar Feb 18 '18 17:02 jmarcet

Where can I get those commits? This repo hasn't been updated since Dec. 7th

jmarcet avatar Feb 18 '18 17:02 jmarcet

I was working in the rtl8723bu, not rtl78192du. It will take a while to learn another source.

lwfinger avatar Feb 18 '18 17:02 lwfinger

The patches should be there now.

lwfinger avatar Feb 18 '18 17:02 lwfinger

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);

jmarcet avatar Feb 19 '18 13:02 jmarcet

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

jmarcet avatar Feb 19 '18 14:02 jmarcet

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?

lwfinger avatar Feb 19 '18 18:02 lwfinger

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.

jmarcet avatar Feb 20 '18 08:02 jmarcet

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.

jmarcet avatar Feb 20 '18 15:02 jmarcet

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.

lwfinger avatar Feb 20 '18 18:02 lwfinger

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.

jmarcet avatar Feb 21 '18 10:02 jmarcet

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.

lwfinger avatar Feb 21 '18 17:02 lwfinger

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

jmarcet avatar Feb 22 '18 15:02 jmarcet

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.

lwfinger avatar Feb 22 '18 17:02 lwfinger

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.

lwfinger avatar Feb 23 '18 06:02 lwfinger

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.

jmarcet avatar Feb 23 '18 10:02 jmarcet

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.

lwfinger avatar Feb 23 '18 15:02 lwfinger

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.

lwfinger avatar Feb 23 '18 18:02 lwfinger

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.

lwfinger avatar Feb 25 '18 17:02 lwfinger

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..

jmarcet avatar Feb 26 '18 13:02 jmarcet