4

I am not a linux kernel expert, but I got this new laptop and it's WiFi(RT3290LE) is not working. I tried solutions from various sources and they are not working. So it is upto me to solve it, and I have never debugged kernel code before. So here it goes.

I run Arch linux and the kernel in use is 4.3.3-2-ARCH. When I load the module (which I got from the AUR or from askUbuntu), these are the first lines that appear in the dmesg:

[   40.077355] rt3290sta: module license 'unspecified' taints kernel.
[   40.077359] Disabling lock debugging due to kernel taint
[   40.079739] register rt2860

The first two lines are just a warning, but I wonder why it is "register"ing rt2860. The next few lines:

[   40.079912] 

               === pAd = ffffc90001c61000, size = 583104 ===

[   40.079922] <-- RTMPAllocTxRxRingMemory, Status=0
[   40.079958] <-- RTMPAllocAdapterBlock, Status=0

indicate that the module rt2860 is being loaded because the functions RTMPAllocTxRxRingMemory and RTMPAllocAdapterBlock are defined for this module. I am guessing that this module handles my 3290LE chip as well because there is a directory called chips in the src directory with the file rt3290.c. From there everything looks ok until:

[   40.079960] pAd->CSRBaseAddress =0xffffc90001400000, csr_addr=0xffffc90001400000!
[   40.079963] device_id =0x3290
[   40.079970] CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0x0
[   40.079978] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000522
[   40.079979] ==> RTMPWlan 1, bPCIclkOff = 0, WlanFunCtrl.word = 0xff000521
[   40.080127] <== RTMPWlan 1  bPCIclkOff = 0 pAd->WlanFunCtrl.word = 0xff000523
[   40.080138] NVM is EFUSE
[   40.082604] rt2860 0000:09:00.0 enp9s0f0: renamed from ra0
[   40.103558] NetworkManager[332]: segfault at 8 ip 00000000004ca126 sp 00007ffca7ec45c8 error 4 in NetworkManager[400000+1c5000]

as segfault reported by NetworkManager. From then on, nothing seems right:

[   62.254256] IPv6: ADDRCONF(NETDEV_UP): enp9s0f0: link is not ready
[   62.254302] MACVersion=0x32900015
[   62.254304] CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000523
[   62.254306] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000523
[   62.254307] ==> RTMPWlan 1, bPCIclkOff = 0, WlanFunCtrl.word = 0xff000521
[   62.254315] <== RTMPWlan 1  bPCIclkOff = 0 pAd->WlanFunCtrl.word = 0xff000523
[   62.254322] PllCtrl:0x26c5555
[   62.255651] RX DESC ffff880085128000  size = 2048
[   62.255818] RTMP_TimerListAdd: add timer obj ffffc90001182d60!
[   62.255819] RTMP_TimerListAdd: add timer obj ffffc90001182dd0!
[   62.255820] RTMP_TimerListAdd: add timer obj ffffc90001182e40!
[   62.255821] RTMP_TimerListAdd: add timer obj ffffc90001182cf0!
[   62.255822] RTMP_TimerListAdd: add timer obj ffffc90001182ba0!
[   62.255823] RTMP_TimerListAdd: add timer obj ffffc90001182c10!
[   62.255824] RTMP_TimerListAdd: add timer obj ffffc9000114cd20!
[   62.255825] RTMP_TimerListAdd: add timer obj ffffc9000114cd90!
[   62.255826] RTMP_TimerListAdd: add timer obj ffffc9000114cc38!
[   62.255827] RTMP_TimerListAdd: add timer obj ffffc9000113bb30!
[   62.255828] RTMP_TimerListAdd: add timer obj ffffc9000113bba8!
[   62.255829] RTMP_TimerListAdd: add timer obj ffffc9000114cb58!
[   62.255830] RTMP_TimerListAdd: add timer obj ffffc9000114ce20!
[   62.257657] BBP_R105: BBPR105.field.EnableSIGRemodulation = 1, BBPR105.field.MLDFor2Stream = 0
[   62.260034] no file read method
[   62.260037] Read file "/etc/Wireless/RT2860STA/RT2860STA.dat" failed(errCode=-1)!
[   62.260039] 1. Phy Mode = 0
[   62.260040] 2. Phy Mode = 0
[   62.260044] NVM is Efuse and its size =1e[1e0-1fd] 
[   62.261283] 3. Phy Mode = 0
[   62.261484] AntCfgInit: primary/secondary ant 0/1
               CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000523
[   62.300528] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000533
[   62.300529] <== RTMPWlan bPCIclkOff = 0, Exit because WLAN EN is already ON 
[   62.303602] RTMPSetPhyMode: channel is out of range, use first channel=1 
[   62.303604] MCS Set = 00 00 00 00 00
[   62.303608] <==== rt28xx_init, Status=0
[   62.303663] 0x1300 = 00073200
[   62.303664] RTMPrt3xSetPCIePowerLinkCtrl.===> 1e
[   62.348650] CacheVal-OnOff:0, bPCIclkOff:1, WlanFunCtrl:0xff000533
[   62.348653] ==> RTMPWlan 0, bPCIclkOff = 1, pAd->WlanFunCtrl.word = 0xff000523
[   62.348654] Set INT_MASK_CSR = 0
[   62.348658] ==> RTMPWlan 0, bPCIclkOff = 1, WlanFunCtrl.word = 0xff000520
[   62.348661] <== RTMPWlan 0  bPCIclkOff = 1 pAd->WlanFunCtrl.word = 0xff000520
[   62.355767] CacheVal-OnOff:0, bPCIclkOff:1, WlanFunCtrl:0xff000520
[   62.355775] ==> RTMPWlan 0, bPCIclkOff = 1, pAd->WlanFunCtrl.word = 0xff000520
[   62.355775] Set INT_MASK_CSR = 0
[   62.355804] ==> RTMPWlan 0, bPCIclkOff = 1, WlanFunCtrl.word = 0xff000520
[   62.355806] <== RTMPWlan 0  bPCIclkOff = 1 pAd->WlanFunCtrl.word = 0xff000520
[   62.358438] MACVersion=0x32900015
[   62.358441] CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000520
[   62.358447] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000520
[   62.358448] ==> RTMPWlan 1, bPCIclkOff = 0, WlanFunCtrl.word = 0xff000521
[   62.358585] <== RTMPWlan 1  bPCIclkOff = 0 pAd->WlanFunCtrl.word = 0xff000523
[   62.358592] PllCtrl:0x2695555
[   62.359939] RX DESC ffff880085128000  size = 2048
[   62.360119] RTMP_TimerListAdd: add timer obj ffffc90001182d60!
[   62.360120] RTMP_TimerListAdd: add timer obj ffffc90001182dd0!
[   62.360121] RTMP_TimerListAdd: add timer obj ffffc90001182e40!
[   62.360122] RTMP_TimerListAdd: add timer obj ffffc90001182cf0!
[   62.360123] RTMP_TimerListAdd: add timer obj ffffc90001182ba0!
[   62.360124] RTMP_TimerListAdd: add timer obj ffffc90001182c10!
[   62.360125] RTMP_TimerListAdd: add timer obj ffffc9000114cd20!
[   62.360126] RTMP_TimerListAdd: add timer obj ffffc9000114cd90!
[   62.360126] RTMP_TimerListAdd: add timer obj ffffc9000114cc38!
[   62.360127] RTMP_TimerListAdd: add timer obj ffffc9000113bb30!
[   62.360128] RTMP_TimerListAdd: add timer obj ffffc9000113bba8!
[   62.360129] RTMP_TimerListAdd: add timer obj ffffc9000114cb58!
[   62.360131] RTMP_TimerListAdd: add timer obj ffffc9000114ce20!
[   62.361957] BBP_R105: BBPR105.field.EnableSIGRemodulation = 1, BBPR105.field.MLDFor2Stream = 0
[   62.362678] no file read method
[   62.362679] Read file "/etc/Wireless/RT2860STA/RT2860STA.dat" failed(errCode=-1)!
[   62.362680] 1. Phy Mode = 0
[   62.362680] 2. Phy Mode = 0
[   62.362684] NVM is Efuse and its size =1e[1e0-1fd] 
[   62.363940] 3. Phy Mode = 0
[   62.364137] AntCfgInit: primary/secondary ant 0/1
               CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000523
[   62.382877] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000533
[   62.382878] <== RTMPWlan bPCIclkOff = 0, Exit because WLAN EN is already ON 
[   62.385928] MCS Set = 00 00 00 00 00
[   62.385932] <==== rt28xx_init, Status=0
[   62.385987] 0x1300 = 00073200
[   62.385988] RTMPrt3xSetPCIePowerLinkCtrl.===> 1e
[   62.430888] CacheVal-OnOff:0, bPCIclkOff:1, WlanFunCtrl:0xff000533
[   62.430891] ==> RTMPWlan 0, bPCIclkOff = 1, pAd->WlanFunCtrl.word = 0xff000523
[   62.430892] Set INT_MASK_CSR = 0
[   62.430896] ==> RTMPWlan 0, bPCIclkOff = 1, WlanFunCtrl.word = 0xff000520
[   62.430899] <== RTMPWlan 0  bPCIclkOff = 1 pAd->WlanFunCtrl.word = 0xff000520
[   62.437938] CacheVal-OnOff:0, bPCIclkOff:1, WlanFunCtrl:0xff000520
[   62.437944] ==> RTMPWlan 0, bPCIclkOff = 1, pAd->WlanFunCtrl.word = 0xff000520
[   62.437945] Set INT_MASK_CSR = 0
[   62.437972] ==> RTMPWlan 0, bPCIclkOff = 1, WlanFunCtrl.word = 0xff000520
[   62.437975] <== RTMPWlan 0  bPCIclkOff = 1 pAd->WlanFunCtrl.word = 0xff000520
[   62.440460] MACVersion=0x32900015
[   62.440463] CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000520
[   62.440470] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000520
[   62.440471] ==> RTMPWlan 1, bPCIclkOff = 0, WlanFunCtrl.word = 0xff000521
[   62.440606] <== RTMPWlan 1  bPCIclkOff = 0 pAd->WlanFunCtrl.word = 0xff000523
[   62.440614] PllCtrl:0x2695555
[   62.441942] RX DESC ffff880085128000  size = 2048
[   62.442166] RTMP_TimerListAdd: add timer obj ffffc90001182d60!
[   62.442168] RTMP_TimerListAdd: add timer obj ffffc90001182dd0!
[   62.442169] RTMP_TimerListAdd: add timer obj ffffc90001182e40!
[   62.442170] RTMP_TimerListAdd: add timer obj ffffc90001182cf0!
[   62.442171] RTMP_TimerListAdd: add timer obj ffffc90001182ba0!
[   62.442172] RTMP_TimerListAdd: add timer obj ffffc90001182c10!
[   62.442173] RTMP_TimerListAdd: add timer obj ffffc9000114cd20!
[   62.442174] RTMP_TimerListAdd: add timer obj ffffc9000114cd90!
[   62.442175] RTMP_TimerListAdd: add timer obj ffffc9000114cc38!
[   62.442176] RTMP_TimerListAdd: add timer obj ffffc9000113bb30!
[   62.442177] RTMP_TimerListAdd: add timer obj ffffc9000113bba8!
[   62.442178] RTMP_TimerListAdd: add timer obj ffffc9000114cb58!
[   62.442179] RTMP_TimerListAdd: add timer obj ffffc9000114ce20!
[   62.444027] BBP_R105: BBPR105.field.EnableSIGRemodulation = 1, BBPR105.field.MLDFor2Stream = 0
[   62.444745] no file read method
[   62.444746] Read file "/etc/Wireless/RT2860STA/RT2860STA.dat" failed(errCode=-1)!
[   62.444747] 1. Phy Mode = 0
[   62.444748] 2. Phy Mode = 0
[   62.444752] NVM is Efuse and its size =1e[1e0-1fd] 
[   62.445990] 3. Phy Mode = 0
[   62.446190] AntCfgInit: primary/secondary ant 0/1
               CacheVal-OnOff:1, bPCIclkOff:0, WlanFunCtrl:0xff000523
[   62.464934] ==> RTMPWlan 1, bPCIclkOff = 0, pAd->WlanFunCtrl.word = 0xff000533
[   62.464935] <== RTMPWlan bPCIclkOff = 0, Exit because WLAN EN is already ON 
[   62.467992] MCS Set = 00 00 00 00 00
[   62.467996] <==== rt28xx_init, Status=0
[   62.468051] 0x1300 = 00073200
[   62.468052] RTMPrt3xSetPCIePowerLinkCtrl.===> 1e
[   62.514023] IPv6: ADDRCONF(NETDEV_UP): enp8s0: link is not ready
[   62.524133] BUG: unable to handle kernel paging request at 00007ffcc2728510
[   62.524182] IP: [<ffffffffa07dd1d0>] rt_ioctl_siwpmksa+0x90/0x150 [rt3290sta]
[   62.524236] PGD 95a1a067 PUD 959a5067 PMD 95a20067 PTE 800000008e8c3067
[   62.524282] Oops: 0001 [#1] PREEMPT SMP 
[   62.524311] Modules linked in: cfg80211 rt3290sta(PO) fuse snd_hda_codec_hdmi joydev mousedev intel_rapl iosf_mbi x86_pkg_temp_thermal nls_iso8859_1 intel_powerclamp nls_cp437 coretemp hp_wmi sparse_keymap uvcvideo rfkill videobuf2_vmalloc vfat videobuf2_memops fat videobuf2_core iTCO_wdt iTCO_vendor_support kvm v4l2_common evdev input_leds videodev psmouse mac_hid media serio_raw pcspkr i915 rtsx_pci_ms r8169 memstick mii drm_kms_helper snd_hda_codec_realtek snd_soc_rt286 fan thermal wmi snd_soc_rl6347a i2c_hid drm snd_hda_codec_generic snd_soc_core snd_compress snd_pcm_dmaengine battery ac dw_dmac snd_soc_sst_acpi snd_hda_intel hid dw_dmac_core ac97_bus video gpio_lynxpoint intel_gtt snd_hda_codec i2c_designware_platform 8250_dw spi_pxa2xx_platform syscopyarea mei_me sysfillrect i2c_designware_core
[   62.524820]  snd_hda_core sysimgblt hp_wireless snd_hwdep fjes acpi_pad snd_pcm fb_sys_fops snd_timer button i2c_algo_bit snd lpc_ich mei soundcore i2c_i801 shpchp intel_pch_thermal processor sch_fq_codel ip_tables x_tables ext4 crc16 mbcache jbd2 jitterentropy_rng sha256_ssse3 sha256_generic hmac drbg ansi_cprng algif_skcipher af_alg dm_crypt dm_mod sd_mod rtsx_pci_sdmmc atkbd libps2 crct10dif_pclmul crc32_pclmul crc32c_intel ahci libahci aesni_intel rtsx_pci aes_x86_64 lrw gf128mul glue_helper libata ablk_helper cryptd xhci_pci ehci_pci ehci_hcd xhci_hcd usbcore scsi_mod usb_common i8042 serio sdhci_acpi sdhci led_class mmc_core
[   62.525219] CPU: 0 PID: 807 Comm: wpa_supplicant Tainted: P           O    4.3.3-2-ARCH #1
[   62.525267] Hardware name: Hewlett-Packard HP 240 G3 Notebook PC/2334, BIOS F.36 12/18/2014
[   62.525315] task: ffff8801ca4ca940 ti: ffff8800959fc000 task.ti: ffff8800959fc000
[   62.525353] RIP: 0010:[<ffffffffa07dd1d0>]  [<ffffffffa07dd1d0>] rt_ioctl_siwpmksa+0x90/0x150 [rt3290sta]
[   62.525416] RSP: 0018:ffff8800959ffc58  EFLAGS: 00010297
[   62.525447] RAX: 0000000000000000 RBX: 00007ffcc2728510 RCX: 0000000000000000
[   62.525488] RDX: 0000000000005009 RSI: 0000000000000000 RDI: ffffc90001131000
[   62.525528] RBP: ffff8800959ffca0 R08: ffff8801d51e6600 R09: 0000000000000000
[   62.525568] R10: 0000000000000036 R11: ffffffffa07dd140 R12: 0000000000000000
[   62.527329] R13: ffffc90001131000 R14: ffff8801bad07000 R15: ffffffffa07dd140
[   62.528767] FS:  00007f1a34ef57c0(0000) GS:ffff8801dec00000(0000) knlGS:0000000000000000
[   62.530182] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   62.531316] CR2: 00007ffcc2728510 CR3: 0000000098bdc000 CR4: 00000000003406f0
[   62.532354] Stack:
[   62.533356]  ffff8801d809bb80 ffffffff811ba7a2 ffff880095b1be00 ffffffff8156de65
[   62.534585]  00000000226f393b ffff8801bd92d480 0000000000000000 ffffffff81676e48
[   62.535754]  ffff8800959ffe20 ffff8800959ffd28 ffffffff8156de93 0000000000000000
[   62.536924] Call Trace:
[   62.537973]  [<ffffffff811ba7a2>] ? __kmalloc+0x212/0x270
[   62.539176]  [<ffffffff8156de65>] ? ioctl_standard_iw_point+0x105/0x340
[   62.540337]  [<ffffffff8156de93>] ioctl_standard_iw_point+0x133/0x340
[   62.541475]  [<ffffffff811f8304>] ? mntput+0x24/0x40
[   62.542573]  [<ffffffff8156e2eb>] ioctl_standard_call+0x8b/0xe0
[   62.543565]  [<ffffffff8127a0c8>] ? security_capable+0x48/0x60
[   62.544666]  [<ffffffff8156ef60>] ? iw_handler_get_private+0x60/0x60
[   62.545775]  [<ffffffff8156e260>] ? call_commit_handler.part.3+0x30/0x30
[   62.546818]  [<ffffffff8156e1f4>] wireless_process_ioctl+0x154/0x190
[   62.547797]  [<ffffffff8156e548>] wext_handle_ioctl+0x78/0xd0
[   62.548858]  [<ffffffff8149a4d9>] dev_ioctl+0x2a9/0x590
[   62.550045]  [<ffffffff81463906>] sock_ioctl+0x126/0x290
[   62.551139]  [<ffffffff8127b3fe>] ? security_file_permission+0xae/0xc0
[   62.552223]  [<ffffffff811eb5f5>] do_vfs_ioctl+0x295/0x480
[   62.553516]  [<ffffffff811d98f3>] ? vfs_read+0x83/0x120
[   62.554877]  [<ffffffff811eb859>] SyS_ioctl+0x79/0x90
[   62.556196]  [<ffffffff81583d2e>] entry_SYSCALL_64_fastpath+0x12/0x71
[   62.557486] Code: bc 9c ff ff ff eb 75 48 85 db 0f 84 9d 00 00 00 48 83 3d 33 e0 06 00 02 41 89 c4 76 0e 48 83 3d 26 f9 06 00 00 0f 84 a3 00 00 00 <8b> 03 83 f8 03 74 69 83 f8 02 74 6d 83 f8 01 0f 94 c0 0f b6 c0 
[   62.560455] RIP  [<ffffffffa07dd1d0>] rt_ioctl_siwpmksa+0x90/0x150 [rt3290sta]
[   62.562150]  RSP <ffff8800959ffc58>
[   62.563890] CR2: 00007ffcc2728510
[   62.572067] ---[ end trace 174c5d19ef38ee89 ]---
[   70.478202] RT3290_AsicTxAlcGetAutoAgcOffset: Incorrect desired TSSI or current TSSI
[   74.482274] RT3290_AsicTxAlcGetAutoAgcOffset: Incorrect desired TSSI or current TSSI
[   78.486201] RT3290_AsicTxAlcGetAutoAgcOffset: Incorrect desired TSSI or current TSSI
[   82.491242] RT3290_AsicTxAlcGetAutoAgcOffset: Incorrect desired TSSI or current TSSI

I notice that this two lines appear thrice before the call trace:

[   62.260034] no file read method
[   62.260037] Read file "/etc/Wireless/RT2860STA/RT2860STA.dat" failed(errCode=-1)!

They are printed by below given code in RTMPReadParametersHook() (line 96 of src/os/linux/rt_profile.c):

retval =RtmpOSFileRead(srcf, buffer, MAX_INI_BUFFER_SIZE);
if (retval > 0)
{
    RTMPSetProfileParameters(pAd, buffer);
    retval = NDIS_STATUS_SUCCESS;
}
else
    DBGPRINT(RT_DEBUG_ERROR, ("Read file \"%s\" failed(errCode=%d)!\n", src, retval));

because the below given function returns -1:

1049int RtmpOSFileRead(RTMP_OS_sFD osfd, char *pDataPtr, int readLen)
1050{
1051        // The object must have a read method
1052        if (osfd->f_op && osfd->f_op->read)
1053        {
1054                return osfd->f_op->read(osfd,  pDataPtr, readLen, &osfd->f_pos);
1055        }
1056        else
1057        {
1058                DBGPRINT(RT_DEBUG_ERROR, ("no file read method\n"));
1059                return -1;
1060        }
1061}

The end result of loading the module is that the whole system becomes unstable. I get no networking, no command involving sudo works, I can't stop those commands by Ctrl-C/Z, and the DE crashing. Also the shutdown of the system takes forever.

How do I solve this and get the WiFi working?

Apologies for the looong question but any help appreciated. I cant't live without WiFi! :-(

Update: Doing a bit more research about the call trace, the below two lines:

[   40.905333] BUG: unable to handle kernel paging request at 00007ffe7426fb20
[   40.905385] IP: [<ffffffffa09ac1d0>] rt_ioctl_siwpmksa+0x90/0x150 [rt3290sta]

upon googling about, brings up this closed obsolete bug report.

Update 2: I filed a bug report on the NetworkManager crash here. As suggested there,I reinstalled NetworkManager with debug symbols and attempted to get a trace. So they fixed the bug in NM, but in the meantime, I had a chat with the developers. According to them, the ralink vendor driver is not correctly supporting nl80211, nor does it suppport WEXT range, the latter leading to NM crash. According to them, they had examined the driver code, and they say the driver is beyond help and that the code literally looks horrible. He also added that I could try to get nm to ignore the driver, and try to statically configure it with iw or iwconfig.

End result: NM is ignoring the driver after the bug fix, so there is no crash immediately when I load the driver. But when I run wifi-menu, i get the same crash.

  • > Read file "/etc/Wireless/RT2860STA/RT2860STA.dat" failed(errCode=-1): Might this be referring to some piece of firmware or proprietary binary driver for another OS or something? You almost certainly cannot expect things to work without this piece being loaded properly. The kernel code might not be even well tested for the situation that this is missing, hence all the instability. – Kaz Jan 4 '16 at 20:11
  • @Kaz I examined the code and I confirmed that the read failed because "the object is not having a read method". But then the network manager crashed before this. Do you think solving this will solve that too? – daltonfury42 Jan 5 '16 at 7:25
  • Take a look at this maybe ? – moonbutt74 Jan 9 '16 at 6:29
0

sp is a nonsense value.

[   40.103558] NetworkManager[332]: segfault at 8 ip 00000000004ca126 sp 00007ffca7ec45c8 error 4 in NetworkManager[400000+1c5000]

So, the stupid way may be to objdump the NetworkManager and read the source of it to find why [ip = 00000000004ca126] triggers a segmentfault.

  • Thanks for pointing it out. I got a stack trace, and it is in the NM bur report linked in the question. – daltonfury42 Jan 11 '16 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.