UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor
Contributor
15,191 Views
Registered: ‎09-18-2009

Linux Micrel Ethernet Not Working Properly

Jump to solution

Hello,

We have a custom Zynq board with Micrel KSZ9031RNX gigabit ethernet phy. It boots linux with Linaro rootfs. Our reference project is "http://www.zedboard.org/sites/default/files/design/Ubuntu_on_Zedboard_Tutorial_v14.4_02.pdf" and "http://wiki.analog.com/resources/tools-software/linux-drivers/platforms/zynq". Ethernet generally works but sometimes it does not working. If we wait without doing anything about 10 minutes, we get following error messages and linux crashes. Besides that, ethernet works sometimes 100Mbit mode.

Linux kernel source : https://github.com/analogdevicesinc/linux  tag: xcomm_zynq-2013-04-19 (with micrel driver update)
Device tree : zynq-zed-adv7511.dts in the linux kernel source with some modifications

Are there anyone in the forum who has idea about the problem?

Regards,
Ali

Error message:
xemacps e000b000.eth: transmit timeout 3000 ms, r.
                                                                                
=================================                                               
[ INFO: inconsistent lock state ]                                               
3.6.0-g54e27e6-dirty #3 Tainted: G        W                                     
---------------------------------                                               
inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.                            
swapper/1/0 [HC0[0]:SC1[1]:HE0:SE0] takes:                                      
 (cma_mutex){+.?...}, at: [<c01cd924>] dma_release_from_contiguous+0x74/0xb4    
{SOFTIRQ-ON-W} state was registered at:                                         
  [<c0059bd0>] __lock_acquire+0x7d8/0x1b80                                      
  [<c005b3d8>] lock_acquire+0x60/0x74                                           
  [<c0363638>] mutex_lock_nested+0x44/0x398                                     
  [<c01cd810>] dma_alloc_from_contiguous+0x64/0x104                             
  [<c00165fc>] __alloc_from_contiguous+0x28/0x58                                
  [<c04dad74>] atomic_pool_init+0x60/0x110                                      
  [<c0008544>] do_one_initcall+0x90/0x164                                       
  [<c04d68dc>] kernel_init+0xf8/0x1b8                                           
  [<c000e308>] kernel_thread_exit+0x0/0x8                                       
irq event stamp: 1349073                                                        
hardirqs last  enabled at (1349072): [<c000d3e8>] __irq_svc+0x68/0x78           
hardirqs last disabled at (1349073): [<c03655fc>] _raw_spin_lock_irqsave+0x18/04
softirqs last  enabled at (1349020): [<c00257e0>] irq_enter+0x4c/0x6c           
softirqs last disabled at (1349021): [<c0025858>] irq_exit+0x58/0x7c            
                                                                                
other info that might help us debug this:                                       
 Possible unsafe locking scenario:                                              
                                                                                
       CPU0                                                                     
       ----                                                                     
  lock(cma_mutex);                                                              
  <Interrupt>                                                                   
    lock(cma_mutex);                                                            
                                                                                
 *** DEADLOCK ***                                                               
                                                                                
3 locks held by swapper/1/0:                                                    
 #0:  (&dev->watchdog_timer){+.-...}, at: [<c002b140>] run_timer_softirq+0xfc/04
 #1:  (&(&dev->tx_global_lock)->rlock){+.-...}, at: [<c02e4150>] dev_watchdog+0c
 #2:  (&(&lp->lock)->rlock){..-...}, at: [<c020abdc>] xemacps_tx_timeout+0x68/08
                                                                                
stack backtrace:                                                                
[<c001331c>] (unwind_backtrace+0x0/0xe0) from [<c03604a0>] (print_usage_bug+0x2)
[<c03604a0>] (print_usage_bug+0x258/0x2c0) from [<c0059104>] (mark_lock+0x364/0)
[<c0059104>] (mark_lock+0x364/0x658) from [<c0059b4c>] (__lock_acquire+0x754/0x)
[<c0059b4c>] (__lock_acquire+0x754/0x1b80) from [<c005b3d8>] (lock_acquire+0x60)
[<c005b3d8>] (lock_acquire+0x60/0x74) from [<c0363638>] (mutex_lock_nested+0x44)
[<c0363638>] (mutex_lock_nested+0x44/0x398) from [<c01cd924>] (dma_release_from)
[<c01cd924>] (dma_release_from_contiguous+0x74/0xb4) from [<c020a738>] (xemacps)
[<c020a738>] (xemacps_descriptor_free+0x198/0x1ec) from [<c020ac24>] (xemacps_t)
[<c020ac24>] (xemacps_tx_timeout+0xb0/0x168) from [<c02e42ac>] (dev_watchdog+0x)
[<c02e42ac>] (dev_watchdog+0x174/0x26c) from [<c002b1d8>] (run_timer_softirq+0x)
[<c002b1d8>] (run_timer_softirq+0x194/0x264) from [<c0025280>] (__do_softirq+0x)
[<c0025280>] (__do_softirq+0xcc/0x19c) from [<c0025858>] (irq_exit+0x58/0x7c)   
[<c0025858>] (irq_exit+0x58/0x7c) from [<c000e0c0>] (handle_IRQ+0x7c/0xb8)      
[<c000e0c0>] (handle_IRQ+0x7c/0xb8) from [<c0008460>] (gic_handle_irq+0x38/0x5c)
[<c0008460>] (gic_handle_irq+0x38/0x5c) from [<c000d3c4>] (__irq_svc+0x44/0x78)
Exception stack(0xdcc77fa0 to 0xdcc77fe8)                                       
7fa0: dcc76000 00149598 dcc77fd8 dcc6e0c0 1cc6006a 00000015 10c0387d c054ec94   
7fc0: 0000406a 413fc090 00000000 00000000 00000000 dcc77fe8 dcc76018 c000e36c   
7fe0: 20000013 ffffffff                                                         
[<c000d3c4>] (__irq_svc+0x44/0x78) from [<c000e36c>] (default_idle+0x28/0x30)   
[<c000e36c>] (default_idle+0x28/0x30) from [<c000e558>] (cpu_idle+0x8c/0xe4)    
[<c000e558>] (cpu_idle+0x8c/0xe4) from [<0035c414>] (0x35c414)                  
------------[ cut here ]------------                                            
WARNING: at arch/arm/mm/dma-mapping.c:743 __arm_dma_free.isra.10+0xfc/0x178()   
Modules linked in:                                                              
[<c001331c>] (unwind_backtrace+0x0/0xe0) from [<c001de68>] (warn_slowpath_commo)
[<c001de68>] (warn_slowpath_common+0x4c/0x64) from [<c001de98>] (warn_slowpath_)
[<c001de98>] (warn_slowpath_null+0x18/0x1c) from [<c0016dac>] (__arm_dma_free.i)
[<c0016dac>] (__arm_dma_free.isra.10+0xfc/0x178) from [<c020a780>] (xemacps_des)
[<c020a780>] (xemacps_descriptor_free+0x1e0/0x1ec) from [<c020ac24>] (xemacps_t)
[<c020ac24>] (xemacps_tx_timeout+0xb0/0x168) from [<c02e42ac>] (dev_watchdog+0x)
[<c02e42ac>] (dev_watchdog+0x174/0x26c) from [<c002b1d8>] (run_timer_softirq+0x)
[<c002b1d8>] (run_timer_softirq+0x194/0x264) from [<c0025280>] (__do_softirq+0x)
[<c0025280>] (__do_softirq+0xcc/0x19c) from [<c0025858>] (irq_exit+0x58/0x7c)   
[<c0025858>] (irq_exit+0x58/0x7c) from [<c000e0c0>] (handle_IRQ+0x7c/0xb8)      
[<c000e0c0>] (handle_IRQ+0x7c/0xb8) from [<c0008460>] (gic_handle_irq+0x38/0x5c)
[<c0008460>] (gic_handle_irq+0x38/0x5c) from [<c000d3c4>] (__irq_svc+0x44/0x78)
Exception stack(0xdcc77fa0 to 0xdcc77fe8)                                       
7fa0: dcc76000 00149598 dcc77fd8 dcc6e0c0 1cc6006a 00000015 10c0387d c054ec94   
7fc0: 0000406a 413fc090 00000000 00000000 00000000 dcc77fe8 dcc76018 c000e36c   
7fe0: 20000013 ffffffff                                                         
[<c000d3c4>] (__irq_svc+0x44/0x78) from [<c000e36c>] (default_idle+0x28/0x30)   
[<c000e36c>] (default_idle+0x28/0x30) from [<c000e558>] (cpu_idle+0x8c/0xe4)    
[<c000e558>] (cpu_idle+0x8c/0xe4) from [<0035c414>] (0x35c414)                  
---[ end trace 062cd48f59c2670b ]---                                            
------------[ cut here ]------------                                            
WARNING: at kernel/smp.c:461 smp_call_function_many+0x98/0x25c()                
Modules linked in:                                                              
[<c001331c>] (unwind_backtrace+0x0/0xe0) from [<c001de68>] (warn_slowpath_commo)
[<c001de68>] (warn_slowpath_common+0x4c/0x64) from [<c001de98>] (warn_slowpath_)
[<c001de98>] (warn_slowpath_null+0x18/0x1c) from [<c0060b58>] (smp_call_functio)
[<c0060b58>] (smp_call_function_many+0x98/0x25c) from [<c0060d4c>] (on_each_cpu)
[<c0060d4c>] (on_each_cpu_mask+0x30/0x98) from [<c00a9840>] (set_migratetype_is)
[<c00a9840>] (set_migratetype_isolate+0xb0/0xbc) from [<c00a9964>] (start_isola)
[<c00a9964>] (start_isolate_page_range+0x48/0x98) from [<c0082bc4>] (alloc_cont)
[<c0082bc4>] (alloc_contig_range+0x40/0x360) from [<c01cd850>] (dma_alloc_from_)
[<c01cd850>] (dma_alloc_from_contiguous+0xa4/0x104) from [<c00165fc>] (__alloc_)
[<c00165fc>] (__alloc_from_contiguous+0x28/0x58) from [<c0017030>] (__dma_alloc)
[<c0017030>] (__dma_alloc.isra.13+0x1f0/0x264) from [<c00171b4>] (arm_dma_alloc)
[<c00171b4>] (arm_dma_alloc+0x80/0x8c) from [<c020a814>] (xemacps_descriptor_in)
[<c020a814>] (xemacps_descriptor_init+0x88/0x288) from [<c020ac3c>] (xemacps_tx)
[<c020ac3c>] (xemacps_tx_timeout+0xc8/0x168) from [<c02e42ac>] (dev_watchdog+0x)
[<c02e42ac>] (dev_watchdog+0x174/0x26c) from [<c002b1d8>] (run_timer_softirq+0x)
[<c002b1d8>] (run_timer_softirq+0x194/0x264) from [<c0025280>] (__do_softirq+0x)
[<c0025280>] (__do_softirq+0xcc/0x19c) from [<c0025858>] (irq_exit+0x58/0x7c)   
[<c0025858>] (irq_exit+0x58/0x7c) from [<c000e0c0>] (handle_IRQ+0x7c/0xb8)      
[<c000e0c0>] (handle_IRQ+0x7c/0xb8) from [<c0008460>] (gic_handle_irq+0x38/0x5c)
[<c0008460>] (gic_handle_irq+0x38/0x5c) from [<c000d3c4>] (__irq_svc+0x44/0x78)
Exception stack(0xdcc77fa0 to 0xdcc77fe8)                                       
7fa0: dcc76000 00149598 dcc77fd8 dcc6e0c0 1cc6006a 00000015 10c0387d c054ec94   
7fc0: 0000406a 413fc090 00000000 00000000 00000000 dcc77fe8 dcc76018 c000e36c   
7fe0: 20000013 ffffffff                                                         
[<c000d3c4>] (__irq_svc+0x44/0x78) from [<c000e36c>] (default_idle+0x28/0x30)   
[<c000e36c>] (default_idle+0x28/0x30) from [<c000e558>] (cpu_idle+0x8c/0xe4)    
[<c000e558>] (cpu_idle+0x8c/0xe4) from [<0035c414>] (0x35c414)                  
---[ end trace 062cd48f59c2670c ]---                                            
------------[ cut here ]------------                                            
WARNING: at kernel/smp.c:322 smp_call_function_single+0xa8/0x1d4()              
Modules linked in:                                                              
[<c001331c>] (unwind_backtrace+0x0/0xe0) from [<c001de68>] (warn_slowpath_commo)
[<c001de68>] (warn_slowpath_common+0x4c/0x64) from [<c001de98>] (warn_slowpath_)
[<c001de98>] (warn_slowpath_null+0x18/0x1c) from [<c0060994>] (smp_call_functio)
[<c0060994>] (smp_call_function_single+0xa8/0x1d4) from [<c0060d4c>] (on_each_c)
[<c0060d4c>] (on_each_cpu_mask+0x30/0x98) from [<c00a9840>] (set_migratetype_is)
[<c00a9840>] (set_migratetype_isolate+0xb0/0xbc) from [<c00a9964>] (start_isola)
[<c00a9964>] (start_isolate_page_range+0x48/0x98) from [<c0082bc4>] (alloc_cont)
[<c0082bc4>] (alloc_contig_range+0x40/0x360) from [<c01cd850>] (dma_alloc_from_)
[<c01cd850>] (dma_alloc_from_contiguous+0xa4/0x104) from [<c00165fc>] (__alloc_)
[<c00165fc>] (__alloc_from_contiguous+0x28/0x58) from [<c0017030>] (__dma_alloc)
[<c0017030>] (__dma_alloc.isra.13+0x1f0/0x264) from [<c00171b4>] (arm_dma_alloc)
[<c00171b4>] (arm_dma_alloc+0x80/0x8c) from [<c020a814>] (xemacps_descriptor_in)
[<c020a814>] (xemacps_descriptor_init+0x88/0x288) from [<c020ac3c>] (xemacps_tx)
[<c020ac3c>] (xemacps_tx_timeout+0xc8/0x168) from [<c02e42ac>] (dev_watchdog+0x)
[<c02e42ac>] (dev_watchdog+0x174/0x26c) from [<c002b1d8>] (run_timer_softirq+0x)
[<c002b1d8>] (run_timer_softirq+0x194/0x264) from [<c0025280>] (__do_softirq+0x)
[<c0025280>] (__do_softirq+0xcc/0x19c) from [<c0025858>] (irq_exit+0x58/0x7c)   
[<c0025858>] (irq_exit+0x58/0x7c) from [<c000e0c0>] (handle_IRQ+0x7c/0xb8)      
[<c000e0c0>] (handle_IRQ+0x7c/0xb8) from [<c0008460>] (gic_handle_irq+0x38/0x5c)
[<c0008460>] (gic_handle_irq+0x38/0x5c) from [<c000d3c4>] (__irq_svc+0x44/0x78)
Exception stack(0xdcc77fa0 to 0xdcc77fe8)                                       
7fa0: dcc76000 00149598 dcc77fd8 dcc6e0c0 1cc6006a 00000015 10c0387d c054ec94   
7fc0: 0000406a 413fc090 00000000 00000000 00000000 dcc77fe8 dcc76018 c000e36c   
7fe0: 20000013 ffffffff                                                         
[<c000d3c4>] (__irq_svc+0x44/0x78) from [<c000e36c>] (default_idle+0x28/0x30)   
[<c000e36c>] (default_idle+0x28/0x30) from [<c000e558>] (cpu_idle+0x8c/0xe4)    
[<c000e558>] (cpu_idle+0x8c/0xe4) from [<0035c414>] (0x35c414)                  
---[ end trace 062cd48f59c2670d ]---                                            
BUG: scheduling while atomic: swapper/1/0/0x40000105                            
INFO: lockdep is turned off.                                                    
Modules linked in:                                                              
[<c001331c>] (unwind_backtrace+0x0/0xe0) from [<c035f9e0>] (__schedule_bug+0x60)
[<c035f9e0>] (__schedule_bug+0x60/0x74) from [<c0364484>] (__schedule+0x68/0x65)
[<c0364484>] (__schedule+0x68/0x658) from [<c0044cac>] (__cond_resched+0x24/0x3)
[<c0044cac>] (__cond_resched+0x24/0x34) from [<c0364b00>] (_cond_resched+0x34/0)
[<c0364b00>] (_cond_resched+0x34/0x44) from [<c0092660>] (isolate_migratepages_)
[<c0092660>] (isolate_migratepages_range+0xb8/0x3f4) from [<c0082c74>] (alloc_c)
[<c0082c74>] (alloc_contig_range+0xf0/0x360) from [<c01cd850>] (dma_alloc_from_)
[<c01cd850>] (dma_alloc_from_contiguous+0xa4/0x104) from [<c00165fc>] (__alloc_)
[<c00165fc>] (__alloc_from_contiguous+0x28/0x58) from [<c0017030>] (__dma_alloc)
[<c0017030>] (__dma_alloc.isra.13+0x1f0/0x264) from [<c00171b4>] (arm_dma_alloc)
[<c00171b4>] (arm_dma_alloc+0x80/0x8c) from [<c020a814>] (xemacps_descriptor_in)
[<c020a814>] (xemacps_descriptor_init+0x88/0x288) from [<c020ac3c>] (xemacps_tx)
[<c020ac3c>] (xemacps_tx_timeout+0xc8/0x168) from [<c02e42ac>] (dev_watchdog+0x)
[<c02e42ac>] (dev_watchdog+0x174/0x26c) from [<c002b1d8>] (run_timer_softirq+0x)
[<c002b1d8>] (run_timer_softirq+0x194/0x264) from [<c0025280>] (__do_softirq+0x)
[<c0025280>] (__do_softirq+0xcc/0x19c) from [<c0025858>] (irq_exit+0x58/0x7c)   
[<c0025858>] (irq_exit+0x58/0x7c) from [<c000e0c0>] (handle_IRQ+0x7c/0xb8)      
[<c000e0c0>] (handle_IRQ+0x7c/0xb8) from [<c0008460>] (gic_handle_irq+0x38/0x5c)
[<c0008460>] (gic_handle_irq+0x38/0x5c) from [<c000d3c4>] (__irq_svc+0x44/0x78)
Exception stack(0xdcc77fa0 to 0xdcc77fe8)                                       
7fa0: dcc76000 00149598 dcc77fd8 dcc6e0c0 1cc6006a 00000015 10c0387d c054ec94   
7fc0: 0000406a 413fc090 00000000 00000000 00000000 dcc77fe8 dcc76018 c000e36c   
7fe0: 20000013 ffffffff                                                         
[<c000d3c4>] (__irq_svc+0x44/0x78) from [<c000e36c>] (default_idle+0x28/0x30)   
[<c000e36c>] (default_idle+0x28/0x30) from [<c000e558>] (cpu_idle+0x8c/0xe4)    
[<c000e558>] (cpu_idle+0x8c/0xe4) from [<0035c414>] (0x35c414)                  
BUG: spinlock lockup suspected on CPU#1, rs:main Q:Reg/922                      
 lock: 0xdcc925c4, .magic: dead4ead, .owner: swapper/1/0, .owner_cpu: 1         
[<c001331c>] (unwind_backtrace+0x0/0xe0) from [<c0171fb0>] (do_raw_spin_lock+0x)
[<c0171fb0>] (do_raw_spin_lock+0x124/0x148) from [<c036563c>] (_raw_spin_lock_i)
[<c036563c>] (_raw_spin_lock_irqsave+0x58/0x64) from [<c020b0a4>] (xemacps_gen_)
[<c020b0a4>] (xemacps_gen_purpose_timerhandler+0x18/0x84) from [<c002b1d8>] (ru)
[<c002b1d8>] (run_timer_softirq+0x194/0x264) from [<c0025280>] (__do_softirq+0x)
[<c0025280>] (__do_softirq+0xcc/0x19c) from [<c0025858>] (irq_exit+0x58/0x7c)   
[<c0025858>] (irq_exit+0x58/0x7c) from [<c0012684>] (handle_IPI+0x6c/0xb4)      
[<c0012684>] (handle_IPI+0x6c/0xb4) from [<c000847c>] (gic_handle_irq+0x54/0x5c)
[<c000847c>] (gic_handle_irq+0x54/0x5c) from [<c000d3c4>] (__irq_svc+0x44/0x78)
Exception stack(0xdc5c3c58 to 0xdc5c3ca0)                                       
3c40:                                                       00000000 c0b0f440   
3c60: 0000087d dc926a4c c0b0f440 dc926a4c 000000ab 00000000 000000ab 00000080   
3c80: dc926a4c dc5c3d60 00000000 dc5c3ca0 c007c308 c007c338 60000013 ffffffff   
[<c000d3c4>] (__irq_svc+0x44/0x78) from [<c007c338>] (find_lock_page+0x60/0x68)
[<c007c338>] (find_lock_page+0x60/0x68) from [<c007c840>] (grab_cache_page_writ)
[<c007c840>] (grab_cache_page_write_begin+0x38/0xb4) from [<c0107a1c>] (ext4_da)
[<c0107a1c>] (ext4_da_write_begin+0xb0/0x178) from [<c007b6b0>] (generic_file_b)
[<c007b6b0>] (generic_file_buffered_write+0xc8/0x24c) from [<c007d3d4>] (__gene)
[<c007d3d4>] (__generic_file_aio_write+0x358/0x398) from [<c007d484>] (generic_)
[<c007d484>] (generic_file_aio_write+0x70/0xd8) from [<c01022b8>] (ext4_file_wr)
[<c01022b8>] (ext4_file_write+0x528/0x568) from [<c00ab3ac>] (do_sync_write+0x8)
[<c00ab3ac>] (do_sync_write+0x84/0xc4) from [<c00abbf4>] (vfs_write+0xb0/0x128)
[<c00abbf4>] (vfs_write+0xb0/0x128) from [<c00abe34>] (sys_write+0x3c/0x68)     
[<c00abe34>] (sys_write+0x3c/0x68) from [<c000d800>] (ret_fast_syscall+0x0/0x3c)
INFO: rcu_preempt detected stalls on CPUs/tasks: { 1} (detected by 0, t=6502 ji)
[<c001331c>] (unwind_backtrace+0x0/0xe0) from [<c006f050>] (rcu_check_callbacks)
[<c006f050>] (rcu_check_callbacks+0x354/0x500) from [<c002b918>] (update_proces)
[<c002b918>] (update_process_times+0x38/0x68) from [<c00562f4>] (tick_sched_tim)
[<c00562f4>] (tick_sched_timer+0x198/0x1e0) from [<c003f7d8>] (__run_hrtimer.is)
[<c003f7d8>] (__run_hrtimer.isra.18+0x50/0xc8) from [<c003fe54>] (hrtimer_inter)
[<c003fe54>] (hrtimer_interrupt+0x11c/0x280) from [<c0012cf8>] (twd_handler+0x2)
[<c0012cf8>] (twd_handler+0x2c/0x40) from [<c006a680>] (handle_percpu_devid_irq)
[<c006a680>] (handle_percpu_devid_irq+0x80/0xa0) from [<c00673e8>] (generic_han)
[<c00673e8>] (generic_handle_irq+0x20/0x30) from [<c000e0bc>] (handle_IRQ+0x78/)
[<c000e0bc>] (handle_IRQ+0x78/0xb8) from [<c0008460>] (gic_handle_irq+0x38/0x5c)
[<c0008460>] (gic_handle_irq+0x38/0x5c) from [<c000d59c>] (__irq_usr+0x3c/0x60)
Exception stack(0xd4d05fb0 to 0xd4d05ff8)                                       
5fa0:                                     b6a27684 00000008 00000004 000003fd   
5fc0: b4d01190 b4d02848 b6a27a94 b4d03678 00000000 b4d01140 b4d02840 00000004   
5fe0: b6a7706c b56fe7c0 b69b553b b69ccad0 800f0030 ffffffff

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
22,397 Views
Registered: ‎03-13-2012

Re: Linux Micrel Ethernet Not Working Properly

Jump to solution

Please update your kernel. The xemacps driver was quite heavily worked on. I think the locking issues are fixed by now.

0 Kudos
9 Replies
Xilinx Employee
Xilinx Employee
22,398 Views
Registered: ‎03-13-2012

Re: Linux Micrel Ethernet Not Working Properly

Jump to solution

Please update your kernel. The xemacps driver was quite heavily worked on. I think the locking issues are fixed by now.

0 Kudos
Contributor
Contributor
15,161 Views
Registered: ‎09-18-2009

Re: Linux Micrel Ethernet Not Working Properly

Jump to solution

sorenb,

 

You are right. We updated kernel from "https://github.com/Xilinx/linux-xlnx" repository and tag "xilinx-v14.6". And now ethernet always works, at least for 75 tests. Thanks.

 

Last issue is speed changing. It works generally at 1Gbit but sometimes at 100Mbit. I think, it is hard to say something about this problem because it can be even a hardware issue. Would you suggest anything about the issue?

 

Regards,

Ali

0 Kudos
Contributor
Contributor
15,153 Views
Registered: ‎09-18-2009

Re: Linux Micrel Ethernet Not Working Properly

Jump to solution

Speed issue was related to our test environment. In our setup: board is connected to gigabit switch and gigabit switch is connected to 100Mbit router. Somehow ethernet gets different speeds in this setup.

 

We tested ethernet connection with cross cable on a pc. And it worked as expected.

 

Regards,

Ali

0 Kudos
Xilinx Employee
Xilinx Employee
15,145 Views
Registered: ‎03-13-2012

Re: Linux Micrel Ethernet Not Working Properly

Jump to solution

aweseome. Thanks for letting us know.

0 Kudos
Participant ierkiaga
Participant
15,009 Views
Registered: ‎11-13-2012

Re: Linux Micrel Ethernet Not Working Properly

Jump to solution

We have a custom board with Zynq 7030 and Micrel KSZ9031RNX Phy controller.

 

I updated linux sources to the last version (3.9) and I configured it enabling "CONFIG_MICREL_PHY=y" option. When linux boot ups, link enabled message appears, but connection si not workin properly (pings to host PC or from host PC).

 

Link Leds are working in ethernet connector.

 

Console output:

xemacps e000b000.eth: pdev->id -1, baseaddr 0xe000b000, irq 54
...........
xemacps e000b000.eth: Set clk to 124999998 Hz
xemacps e000b000.eth: link up (1000/FULL)

 

Devicetree:

eth@e000b000 {
141       compatible = "xlnx,ps7-ethernet-1.00.a";
142       reg = <0xe000b000 0x1000>;
143       interrupts = <0x0 0x16 0x4>;
144       interrupt-parent = <0x1>;
145       phy-handle = <0x3>;
146       phy-mode = "rgmii-id";
147       xlnx,ptp-enet-clock = <0x69f6bc7>;
148       xlnx,slcr-div0-1000Mbps = <0x8>;
149       xlnx,slcr-div0-100Mbps = <0x8>;
150       xlnx,slcr-div0-10Mbps = <0x8>;
151       xlnx,slcr-div1-1000Mbps = <0x1>;
152       xlnx,slcr-div1-100Mbps = <0x5>;
153       xlnx,slcr-div1-10Mbps = <0x32>;
154       #address-cells = <0x1>;
155       #size-cells = <0x0>;
156 
157       mdio {
158         #address-cells = <0x1>;
159         #size-cells = <0x0>;
160 
161         phy@7 {
162           compatible = "marvell,88e1116r";
163           device_type = "ethernet-phy";
164           reg = <0x7>;
165           linux,phandle = <0x3>;
166           phandle = <0x3>;
167         };
168       };
169     };

 

Anyone knows if I forget to configure something or where is the source of failures??



 

0 Kudos
Participant ierkiaga
Participant
14,999 Views
Registered: ‎11-13-2012

Re: Linux Micrel Ethernet Not Working Properly

Jump to solution

Looking properly the design I get into account that my phy addr is 011, so I change the devicetree:

 

          mdio {
158         #address-cells = <0x1>;
159         #size-cells = <0x0>;
160 
161         phy0: phy@3 {
162           compatible = "micrel,ksz9031";
163           device_type = "ethernet-phy";
164           reg = <0x3>;
165         };
166       };
167     };

 However ethernet is not working properly. I enabled debug console and I got following info about ethernet subsystem:

 

xemacps e000b000.eth: open
xemacps e000b000.eth: RX ring 2048 bytes at 0x2e841000 mapped ee841000
xemacps e000b000.eth: TX ring 2048 bytes at 0x2e842000 mapped ee842000
xemacps e000b000.eth: lp->tx_bd ee842000 lp->tx_bd_dma 2e842000 lp->tx_skb ee031000
xemacps e000b000.eth: lp->rx_bd ee841000 lp->rx_bd_dma 2e841000 lp->rx_skb ee28e000
xemacps e000b000.eth: MAC 0x00350a00, 0x00002201, 00:0a:35:00:01:22
xemacps e000b000.eth: GEM: phydev ee17c400, phydev->phy_id 0x0, phydev->addr 0x3
xemacps e000b000.eth: phy_addr 0x3, phy_id 0x00000000
xemacps e000b000.eth: attach [Generic PHY] phy driver

 It seems that phy_id is wrong and generic driver is taken instead of Micrel's one

0 Kudos
Visitor brmy
Visitor
14,695 Views
Registered: ‎11-14-2013

Re: Linux Micrel Ethernet Not Working Properly

Jump to solution

hi ,I just want to know, do you solve your problem ?how did you do it?

0 Kudos
Participant ierkiaga
Participant
11,422 Views
Registered: ‎11-13-2012

Re: Linux Micrel Ethernet Not Working Properly

Jump to solution

Hi everybody,

 

After some private messages asking for our Ethernet solution with Micrel's (KSZ9031), I'm going to post our schematic and the devicetree definition (14.7 release). It should help you in your designs!

 

If someone has any question about that please feel free to contact with me.

 

Captura.PNG

 

ps7-ethernet@e000b000 {
			#address-cells = <0x1>;
			#size-cells = <0x0>;
			clock-names = "ref_clk", "aper_clk";
			clocks = <0x3 0xd 0x3 0x1e>;
			compatible = "xlnx,ps7-ethernet-1.00.a";
			interrupt-parent = <0x2>;
			interrupts = <0x0 0x16 0x4>;
			local-mac-address = [00 0a 35 00 00 00];
			phy-handle = <0x4>;
			phy-mode = "rgmii-id";
			reg = <0xe000b000 0x1000>;
			xlnx,enet-reset = "MIO 47";
			xlnx,eth-mode = <0x1>;
			xlnx,has-mdio = <0x1>;
			xlnx,ptp-enet-clock = <0x69f6bcb>;

			mdio {
				#address-cells = <0x1>;
				#size-cells = <0x0>;

				phy@3 {
					compatible = "micrel,ksz9031";
					device_type = "ethernet-phy";
					reg = <0x3>;
					linux,phandle = <0x4>;
					phandle = <0x4>;
				};
			};
		};

 

0 Kudos
Visitor ghvr1521
Visitor
5,228 Views
Registered: ‎01-04-2017

Re: Linux Micrel Ethernet Not Working Properly

Jump to solution

Hi,

 

We are also facing same problme. PHY is getting detected. But PING is not happening. How did you solve your problem??

0 Kudos