You are not logged in.

#1 2012-11-14 22:19:09

hkon
Member
Registered: 2011-02-15
Posts: 17

ASUS PCE-N53 Kernel Panic

Hello there.

I just bought a PCIe wireless network card for my x86_64 AMD Arch Linux box.
It uses Ralink drivers that are supplied from the CD that companied the card, but are also to be found on ASUS' website
According to the aforementioned webpage, the driver only support 2.6. That may very well be, because I tried to build it without too much of luck. That is, building it seems to go rather fine. The compilation succeeds and the network card works like a charm for a few minutes, I am able to connect to the Internet and all that before I get kernel panic with the error: Fatal exception in interrupt. Also, when I do a ifconfig, it says under ra0: "device interrupt 47". Not completely sure what this has to say about my problem, though.

I am willing to share any log, information, error and debug line that can help to find the root of this problem. I hope we will find a solution to this, because it is a neat and cheap card that has worked very well for me under Windows, at least compared to my D-Link USB adapter.

Thank you.

Offline

#2 2012-11-30 03:19:03

merc68k
Member
Registered: 2011-08-07
Posts: 11

Re: ASUS PCE-N53 Kernel Panic

Hi hkon,

  I'm afraid I don't have an answer for you but FYI I am in the same boat (see my similar thread https://bbs.archlinux.org/viewtopic.php?id=145356).
I never saw a kernel panic, my system just locks up, so that's useful information you found (Fatal exception in interrupt), do you have any more details from the panic that might be helpful?

Offline

#3 2013-01-27 08:15:50

jcrews
Member
Registered: 2013-01-27
Posts: 11

Re: ASUS PCE-N53 Kernel Panic

I just got one of these cards too. At first, I was miffed that the throughput was brilliant (100Mbps) but my kernel (3.7.4 ARCH) would oops on my x86_64.

Root cause:
rt_linux.c in the Ralink driver incorrectly assumes the tail and end of its socket buffers are pointers. They no longer are, and as a consequence, some operations corrupt the skbs by writing a pointer type where an int32 offset belongs. Attached is a patch that will fix this on your 3.x x86_64 box (and x86), so you can enjoy this nice network card without getting angry.

The supplied driver can be improved but ideally this chip should just be added to the mainline maintained rt2800pci driver.

http://gridlox.net/diff/rt5592sta_fix_64bit_3.8.patch

Last edited by jcrews (2013-03-21 02:39:22)

Offline

#4 2013-01-27 13:21:17

merc68k
Member
Registered: 2011-08-07
Posts: 11

Re: ASUS PCE-N53 Kernel Panic

Excellent, this solved the problem for me -- thanks for the patch jcrews!

Offline

#5 2013-01-29 04:33:04

kmacpher
Member
Registered: 2013-01-29
Posts: 1

Re: ASUS PCE-N53 Kernel Panic

Thank you for the patch. I've been struggling with this problem for awhile now (both the Kernel Panic and the freezing). I'm new to Linux though so could you tell me the commands to patch the driver? I ran "patch -p0 < rt5592sta_fix_64bit.patch" in the folder containing the folder DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326. It seemed to work fine but didn't fix my issues.

How do I use the patch to fix the maintained rt2800pci driver?

Offline

#6 2013-02-01 01:55:33

merc68k
Member
Registered: 2011-08-07
Posts: 11

Re: ASUS PCE-N53 Kernel Panic

@kmacpher, did you recompile the driver after patching?

I did:

make clean
make
make install

Then "modprobe rt5592sta".

Offline

#7 2013-02-03 06:17:45

bhoemen
Member
Registered: 2013-02-03
Posts: 1

Re: ASUS PCE-N53 Kernel Panic

Hey, just a thank you for the patch it worked well on Ubuntu 12.10.

I tried it on my 13.04 install however which is running Linux Kernel 3.8, I was just wondering if anybody has been able to get it work on the 3.8 kernel.

Thanks for any help.

Offline

#8 2013-02-03 06:51:45

amodmulay
Member
Registered: 2012-03-07
Posts: 1

Re: ASUS PCE-N53 Kernel Panic

The patch did solve the module loading errors for me. However the interface is still not able to detect the wireless networks. If i run
<code>iw ra0 scan</code> manually i get nl80211 not found error. Can you please help me with this. ( As a work around for "nl80211 not found" i did try to make the file /etc/network.d/interfaces/ra0 with the content WPA_DRIVER='wext' .... but i still cant scan for networks)

Last edited by amodmulay (2013-02-03 06:53:26)

Offline

#9 2013-02-19 00:50:24

mazato
Member
Registered: 2013-02-19
Posts: 1

Re: ASUS PCE-N53 Kernel Panic

Hello everyone. I amhaving the same errors and also some kernel panics in my system. The only difference is that I am on Ubuntu, sorry guys but there is nothing on Ubuntuś forums yet about this card. The only trouble I have found to resolve my errors is  that I don't know yet how to patch that rt_linux.c file that jcrews mentioned. Can someone point me how to patch such file please?!!

thanks a lot.
my kernel is: 3.2.0-37-generic x86_64

Last edited by mazato (2013-02-19 00:51:37)

Offline

#10 2013-02-20 09:12:03

redguardtoo
Member
From: China, Shanghai
Registered: 2007-11-28
Posts: 43
Website

Re: ASUS PCE-N53 Kernel Panic

anybody solve this problem? I'm using gentoo kernel 3.7.8. driver already patched but the device cannot be found

Last edited by redguardtoo (2013-02-20 09:12:38)


Help me, Help you
Intel(R) Core(TM) i3 + 3G + GeForce GST 250
Archlinux+musca+tint2+netcfg

Offline

#11 2013-02-20 12:01:28

redguardtoo
Member
From: China, Shanghai
Registered: 2007-11-28
Posts: 43
Website

Re: ASUS PCE-N53 Kernel Panic

OK, I solved it. I'm too stupid. but I guess some guys may make same mistake as me (driver compiled and installed, but no device can be found). In the driver's source directory, open README_STA_pic and READ IT!

Basically it says you need "ifconfig ra0" to start the device.

It's not "ifconfig wlan0"!

Last edited by redguardtoo (2013-02-20 12:03:51)


Help me, Help you
Intel(R) Core(TM) i3 + 3G + GeForce GST 250
Archlinux+musca+tint2+netcfg

Offline

#12 2013-02-21 04:37:04

jcrews
Member
Registered: 2013-01-27
Posts: 11

Re: ASUS PCE-N53 Kernel Panic

I will take a look at Linux 3.8 when it's in arch/stable. I didn't see anything glaring in the release notes, but a dmesg output (please reboot first) would help until such time that I bother to install 3.8 (the card is in a production machine).

Offline

#13 2013-02-21 04:41:51

jcrews
Member
Registered: 2013-01-27
Posts: 11

Re: ASUS PCE-N53 Kernel Panic

mazato wrote:

Hello everyone. I amhaving the same errors and also some kernel panics in my system. The only difference is that I am on Ubuntu, sorry guys but there is nothing on Ubuntuś forums yet about this card. The only trouble I have found to resolve my errors is  that I don't know yet how to patch that rt_linux.c file that jcrews mentioned. Can someone point me how to patch such file please?!!

thanks a lot.
my kernel is: 3.2.0-37-generic x86_64


1. save the patch and unpack the source.
2. cd to the source's root (cd DPO<etc>)
3. patch -p1 < ../rt5592sta_fix_64bit.patch
4. ???
5. Profit!

Then just make and install as usual.

Last edited by jcrews (2013-02-21 04:42:31)

Offline

#14 2013-02-22 13:26:39

johnny_boy
Member
Registered: 2013-02-22
Posts: 9

Re: ASUS PCE-N53 Kernel Panic

jcrews, thanks very much for the patch! It fixed the kernel panic I got in Kubuntu 12.10. I would send the patch to Asus so they can roll it into an updated driver.

Offline

#15 2013-02-22 14:39:04

jcrews
Member
Registered: 2013-01-27
Posts: 11

Re: ASUS PCE-N53 Kernel Panic

I sent it in, but it only confused support. That contact point is worthless for such feedback; Mediatech has no good contact info on their website, and I don't recall seeing any email addresses in the source (there is a mailing address).

Last edited by jcrews (2013-02-22 14:39:25)

Offline

#16 2013-03-15 18:57:21

johnny_boy
Member
Registered: 2013-02-22
Posts: 9

Re: ASUS PCE-N53 Kernel Panic

That's disappointing. On the bright side, the few of us here got ours working thanks to you.

Offline

#17 2013-03-19 04:20:35

jcrews
Member
Registered: 2013-01-27
Posts: 11

Re: ASUS PCE-N53 Kernel Panic

I've updated the driver to compile on 3.8:

http://gridlox.net/diff/rt5592sta_fix_64bit_3.8.patch

Note: this applies cleanly to the 2.6.00 distribution. patch -R if you've applied the previous modification to fix panicking, or simply delete and re-extract the original package.

Last edited by jcrews (2013-03-19 04:35:06)

Offline

#18 2013-03-20 19:27:10

treeve
Member
Registered: 2013-03-20
Posts: 1

Re: ASUS PCE-N53 Kernel Panic

I tried building against a vanilla linux-3.8.3 and got the following errors;

make[1]: Entering directory `/var/git/linux'
  CC [M]  /var/git/RT5592STA/os/linux/../../common/rtmp_mcu.o
/var/git/RT5592STA/os/linux/../../common/rtmp_mcu.c: In function 'RtmpAsicSendCommandToMcu':
/var/git/RT5592STA/os/linux/../../common/rtmp_mcu.c:558:4: warning: passing argument 3 of 'pci_read_config_word' from incompatible pointer type [enabled by default]
In file included from /var/git/RT5592STA/include/os/rt_linux.h:41:0,
                 from /var/git/RT5592STA/include/rtmp_os.h:44,
                 from /var/git/RT5592STA/include/rtmp_comm.h:69,
                 from /var/git/RT5592STA/include/rt_config.h:33,
                 from /var/git/RT5592STA/os/linux/../../common/rtmp_mcu.c:28:
include/linux/pci.h:794:90: note: expected 'u16 *' but argument is of type 'ULONG *'
/var/git/RT5592STA/os/linux/../../common/rtmp_mcu.c:564:4: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'ULONG' [-Wformat]
/var/git/RT5592STA/os/linux/../../common/rtmp_mcu.c:564:4: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'ULONG' [-Wformat]
/var/git/RT5592STA/os/linux/../../common/rtmp_mcu.c:578:4: warning: passing argument 3 of 'pci_read_config_word' from incompatible pointer type [enabled by default]
In file included from /var/git/RT5592STA/include/os/rt_linux.h:41:0,
                 from /var/git/RT5592STA/include/rtmp_os.h:44,
                 from /var/git/RT5592STA/include/rtmp_comm.h:69,
                 from /var/git/RT5592STA/include/rt_config.h:33,
                 from /var/git/RT5592STA/os/linux/../../common/rtmp_mcu.c:28:
include/linux/pci.h:794:90: note: expected 'u16 *' but argument is of type 'ULONG *'
/var/git/RT5592STA/os/linux/../../common/rtmp_mcu.c:587:4: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'ULONG' [-Wformat]
/var/git/RT5592STA/os/linux/../../common/rtmp_mcu.c:587:4: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'ULONG' [-Wformat]
  CC [M]  /var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.o
/var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.c:46:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rt2860_remove_one'
/var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.c:47:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rt2860_probe'
/var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.c:71:46: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__devinitdata'
/var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.c:97:15: error: 'rt2860_pci_tbl' undeclared here (not in a function)
/var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.c:98:12: error: 'rt2860_probe' undeclared here (not in a function)
/var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.c:101:5: error: implicit declaration of function '__devexit_p' [-Werror=implicit-function-declaration]
/var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.c:101:25: error: 'rt2860_remove_one' undeclared here (not in a function)
/var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.c:309:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rt2860_probe'
/var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.c:483:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rt2860_remove_one'
/var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.c:83:35: error: '__mod_pci_device_table' aliased to undefined symbol 'rt2860_pci_tbl'
cc1: some warnings being treated as errors
make[2]: *** [/var/git/RT5592STA/os/linux/../../os/linux/pci_main_dev.o] Error 1
make[1]: *** [_module_/var/git/RT5592STA/os/linux] Error 2
make[1]: Leaving directory `/var/git/linux'
make: *** [LINUX] Error 2


looking at the line numbers in the error message, it appears that it has not detected the correct kernel version, as
pci_main_dev.c:46 is in some non 3.8.x code
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
static VOID rt2860_remove_one(struct pci_dev *pci_dev);
static INT rt2860_probe(struct pci_dev *pci_dev, const struct pci_device_id  *ent);
#else
static VOID _devexit rt2860_remove_one(struct pci_dev *pci_dev);
static INT __devinit rt2860_probe(struct pci_dev *pci_dev, const struct pci_device_id  *ent);
#endif

Offline

#19 2013-03-20 19:35:25

jcrews
Member
Registered: 2013-01-27
Posts: 11

Re: ASUS PCE-N53 Kernel Panic

It looks like you're not running 3.8. (what's your uname -a?) That error looks like a typo where _devinit should be __devinit. (in backward compat) I'll check that later.

For now, just boot kernel 3.8, then build.  I'll make an adjustment to Makefile so that it's smarter about build targeting.

Last edited by jcrews (2013-03-20 20:05:25)

Offline

#20 2013-03-21 01:43:47

cybertus
Member
Registered: 2013-03-19
Posts: 14

Re: ASUS PCE-N53 Kernel Panic

Hi, I succesfully patched the first patch, but I can't patch latest.

$ uname -r
3.8.3-2-ARCH

$ patch -p0 < /home/alberto/rt5592sta_fix_64bit_3.8.patch 
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/include/os/rt_linux.h b/include/os/rt_linux.h
|index 8fe2b16..042b465 100644
|--- a/include/os/rt_linux.h
|+++ b/include/os/rt_linux.h
--------------------------
File to patch: ./Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux/rt_linux.c
patching file ./Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux/rt_linux.c
Hunk #2 FAILED at 996.
1 out of 2 hunks FAILED -- saving rejects to file ./Linux/DPO_GPL_RT5592STA_LinuxSTA_v2.6.0.0_20120326/os/linux/rt_linux.c.rej
can't find file to patch at input line 37
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/os/linux/pci_main_dev.c b/os/linux/pci_main_dev.c
|index ebd3e57..728a5bd 100644
|--- a/os/linux/pci_main_dev.c
|+++ b/os/linux/pci_main_dev.c
--------------------------
File to patch: 

Something wrong on my instruction?

Last edited by cybertus (2013-03-21 01:46:07)

Offline

#21 2013-03-21 02:35:57

jcrews
Member
Registered: 2013-01-27
Posts: 11

Re: ASUS PCE-N53 Kernel Panic

Do not use the first patch. cd DPO... then patch -p1 < ../rt5592...

If you patched before, reverse the original with the patch -R option, or start from a fresh directory.

I've removed the reference to the old patch, since the new one will work with older kernels as well.

Last edited by jcrews (2013-03-21 02:40:26)

Offline

#22 2013-03-21 08:34:17

cybertus
Member
Registered: 2013-03-19
Posts: 14

Re: ASUS PCE-N53 Kernel Panic

thanks for response. I tried with -R option but didnt works. I delete completely and it patched correctly smile

It seems that works now. Thanks for patches and for helping, jcrews!

Last edited by cybertus (2013-03-21 20:26:53)

Offline

#23 2013-03-28 01:30:54

ethan
Member
Registered: 2013-03-27
Posts: 2

Re: ASUS PCE-N53 Kernel Panic

Trying to compile on 3.7.9-2. The older patch (3.7.X, not 3.8.X) applied cleanly. I'm getting this:
   make: *** /lib/modules/3.7.9-2-ARCH /build: No such file or directory. Stop.
   make: *** [LINUX] Error 2

Out put of 'uname -rv':

   3.7.9-2-ARCH #1 SMP PREEMPT Mon Feb 25 12:04:25 CET 2013

To be honest, I made the stupid mistake of not checking the PCE-N53 against any HCLs in the process of building a rig from scratch. The only time I've ever used make is getting this card to work with Mint before replacing with Arch, so I'm not knowledgable on how to troubleshoot when anything goes wrong. I've got about six months total experience with Arch, four years Linux. I'm guessing I'm missing the kernel source?? Shot in the dark... Any help is much appreciated.

Edit:
Noticing now that both links provide the same patch. Still having build problems.

Last edited by ethan (2013-03-28 02:14:24)


p=h/λ

Offline

#24 2013-03-28 02:15:46

jcrews
Member
Registered: 2013-01-27
Posts: 11

Re: ASUS PCE-N53 Kernel Panic

You need to get linux-headers for your running kernel.

Offline

#25 2013-03-28 02:57:36

ethan
Member
Registered: 2013-03-27
Posts: 2

Re: ASUS PCE-N53 Kernel Panic

*Headers.* Yes. I'm recalling encountering this in Sabyon.
Thanks a million. Up and running.

By the by, would it be feasible or useful to put this in the AUR?


p=h/λ

Offline

Board footer

Powered by FluxBB