LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices



Reply
 
Search this Thread
Old 12-21-2010, 02:34 AM   #1
_spectrum_
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Rep: Reputation: 0
network issue


Hi all,

i have the following custom board:
Freescale ColdFire MCF5307
4MB Flash, with 2.6.36 main line kernel
16MB sdram
dm9000e ethernet chip.

I succesfully slightly modified the dm9000.c driver to work with this big endian cpu, ping (in and out) and telnet server are working fine now.
My issue now is that, once launched httpd with a simple index page, refreshing continuosly the page from a browser cause a kind of kernel trap error:

# BUG: recent printk recursion!
<7>dm9000 dm9000: entering dm9000_interrupt
BUG: spinlock recursion on CPU#0, httpd/29
lock: 00177648, .magic: dead4ead, .owner: httpd/29, .owner_cpu: 0
Stack from 00e559b4:
0014f790 000a7d6c 00169918 00177648 dead4ead 00e26594 0000001d 00000000
00177648 000288d4 0014f79e 000a7f2e 00177648 0016997e 00177648 00e55acc
0000001f 00000000 0000010a 0017760c 000288d4 0014f79e 00029d90 0014f7a8
00177648 000289ec 00177648 0000001f 00e55acc 0000001f 0017760c 000288d4
0014f79e 00029d90 0014f790 00000b96 0000001f 00177648 00dbe5b0 000032e2
0000001f 00e55a5c 00000001 00177648 00dbe5b0 0000001f 00000000 00e55000
Call Trace with CONFIG_FRAME_POINTER disabled:
[0014f790] [000a7d6c] [00169918] [000288d4] [0014f79e]
[000a7f2e] [0016997e] [000288d4] [0014f79e] [00029d90]
[0014f7a8] [000289ec] [000288d4] [0014f79e] [00029d90]
[0014f790] [00000b96] [000032e2] [00028a6a] [0014f790]
[0014f79e] [00000b96] [000032e2] [0014f790] [000a7fda]
[0014f790] [0014f79e] [0014f7a8] [00109d94] [000fceb0]
[00103a2c] [000a4510] [00117300] [00117a40] [00004000]
[0011757e] [00118538] [000005a8] [00001ad0] [0014ce8e]
[0012ce2a] [00007f67] [00001ad0] [0012dd82] [0012923c]
[000005a8] [000005a8] [00002d80] [00030200] [0012a4b8]
[0014f790] [00008b06] [00004124] [00128a4e] [0012abae]
[000005a8] [00128048] [000005a8] [0014de4a] [00004124]
[0012dca8] [0014de4a] [00004124] [0016fae3] [0014f79e]
[000ee208] [0011f72a] [00002860] [000005a8] [000005a8]
[00002860] [000005a8] [0013aad2] [00002860] [000eb4e4]
[00002860] [0004260a] [00002860] [0004293c] [00042df6]
[0001ffff] [00002860] [00002860] [000125fa] [00002860]
[00042a10] [00002860] [00042e36] [00002860] [0000318c]
[00002860]
BUG: spinlock lockup on CPU#0, httpd/29, 00177648
...

Seems some splinlock issue, issued from inside the dm9000_interrupt routine, the kernel then continue to work, the packet sending also seems to works still, but the network packet receiving is not working anymore. Looking with an oscilloscope, the interrupt signal receving packet is still issued from the dm9000 chip, the /proc/interrupts is showing that the interrupt count still increasing, but the kernel seems not handling it anymore.

I tried to get some help in the kernel mailing list, but there is too much patch/development jub there and i couldn't get any help.

many thanks
angelo
 
Old 12-21-2010, 03:49 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,060

Rep: Reputation: 88
Check following patch.
http://kerneltrap.org/mailarchive/li...0/5/16/6277343
 
Old 12-29-2010, 11:09 AM   #3
_spectrum_
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
hi,

thanks nini09,
unfortunately the patch was already included in my dm9000.c

I cannot understand the reason, but seems that the same owner is trying to own the spinlock, even if it is already locked.

This is a more complete stack trace:
[ 4.620000] eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[ 39.390000] BUG: spinlock recursion on CPU#0, httpd/29
[ 39.390000] lock: 00189c44, .magic: dead4ead, .owner: httpd/29, .owner_cpu: 0
[ 39.390000] Stack from 00d6a990:
[ 39.390000] 00d6a9bc 000a9710 0017cac7 00189c44 dead4ead 00de48f4 0000001d 00000000
[ 39.390000] 00189c44 0002a646 00145f70 00d6a9f0 000a98e2 00189c44 0017cb2d 00189c44
[ 39.390000] 00d6aad8 0000001f 00145f5c 001523f6 00189c08 0002a646 00145f70 0002bc52
[ 39.390000] 00d6a9fc 00145f7e 00189c44 00d6aa28 0002a75e 00189c44 0000001f 00d6aad8
[ 39.390000] 0000001f 00145f5c 00189c08 0002a646 00145f70 0002bc52 00d6aa3c 00000bb6
[ 39.390000] 0000001f 00189c44 00cfc780 00d6aa84 0000337a 0000001f 00d6aa4c 00000001
[ 39.390000] Call Trace:
[ 39.390000] [000a9710] spin_bug+0x86/0x11a
[ 39.390000] [000a98e2] do_raw_spin_lock+0x58/0x120
[ 39.390000] [00145f7e] _raw_spin_lock+0xe/0x14
[ 39.390000] [0002a75e] __do_IRQ+0x2c/0x108
[ 39.390000] [00000bb6] do_IRQ+0x48/0x62
[ 39.390000] [0000337a] inthandler+0x6a/0x74
[ 39.390000] [0002a82e] __do_IRQ+0xfc/0x108
[ 39.390000] [00000bb6] do_IRQ+0x48/0x62
[ 39.390000] [0000337a] inthandler+0x6a/0x74
[ 39.390000] [000ef0ce] skb_release_all+0x10/0x20
[ 39.390000] [000ee6bc] __kfree_skb+0x10/0x92
[ 39.390000] [000ee75e] consume_skb+0x20/0x34
[ 39.390000] [000e004e] dm9000_start_xmit+0xdc/0xec
[ 39.390000] [000f67a2] dev_hard_start_xmit+0x146/0x472
[ 39.390000] [00106506] sch_direct_xmit+0xc0/0x1bc
[ 39.390000] [000f9914] dev_queue_xmit+0x160/0x3e4
[ 39.390000] [00113b3e] ip_finish_output+0xee/0x318
[ 39.390000] [001142b4] ip_output+0x7c/0x88
[ 39.390000] [00113dc6] ip_local_out+0x26/0x30
[ 39.390000] [00114d9a] ip_queue_xmit+0x152/0x374
[ 39.390000] [00125c8c] tcp_transmit_skb+0x3f0/0x732
[ 39.390000] [00126f26] tcp_write_xmit+0x178/0x868
[ 39.390000] [00127644] __tcp_push_pending_frames+0x2e/0x9a
[ 39.390000] [0011c3d6] tcp_sendmsg+0x82e/0x98c
[ 39.390000] [00137544] inet_sendmsg+0x32/0x54
[ 39.390000] [000e79a6] sock_aio_write+0xc8/0x138
[ 39.390000] [00042590] do_sync_write+0x9e/0xfe
[ 39.390000] [00042668] vfs_write+0x78/0x84
[ 39.390000] [00042a92] sys_write+0x40/0x7a
[ 39.390000] [00003224] system_call+0x84/0xc2
[ 39.390000]


thanks,
angelo
 
Old 12-29-2010, 03:34 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,060

Rep: Reputation: 88
The ISR doesn't release the spin lock most likely.
 
Old 12-30-2010, 04:06 PM   #5
_spectrum_
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
solved

issue was that on MCF5307, IRQ7 line is a special interrupt line, and must not be used to connect the ethernet chip. Using IRQ1 line all works fine.

thanks
reagrds
 
Old 12-31-2010, 03:20 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,060

Rep: Reputation: 88
What's your meaning, IRQ7 is a special interrupt line? Is it for something else?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible Network Issue? XeNoMoRpH Linux - Newbie 14 09-03-2009 08:51 AM
Unable to connect to wifi network with network manager. Poss authorization issue openSauce Linux - Networking 14 12-13-2008 11:05 AM
Network Manager issue : Does not distinguish between wired and wireless network rohanak Linux - Laptop and Netbook 1 09-04-2008 05:49 PM
Network issue Conkie Linux - Networking 2 10-25-2004 12:39 AM
network issue abulafiar Linux - Software 1 08-07-2004 01:44 AM


All times are GMT -5. The time now is 06:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration