nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

RT61 on ARM-Linux embedded?

This is a discussion on RT61 on ARM-Linux embedded? within the Linux hardware forums, part of the Linux Getting Started category; Hi, I am a beginner of Linux and I have a problem while integrating a miniPCI WLAN module with RT2561 ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux hardware

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 05-28-2007, 04:44 PM
Junior Member
User
 
Join Date: May 2007
My distro: ARM-Linux
Posts: 3
Rep Power: 0
mighty is on a distinguished road
Default RT61 on ARM-Linux embedded?

Hi,
I am a beginner of Linux and I have a problem while integrating a miniPCI WLAN module with RT2561 chip with a ARM-Linux CPE device. The driver, version RT61 v1.1.0.0, is compiled as a dynamic module and loaded (cat /proc/modules: rt61 350488 0). I can find the PCI device (cat /proc/pci:
PCI devices found:
Bus 0, device 0, function 0:
Class 0000: PCI device 159b:4321 (rev 0).
Bus 0, device 9, function 0:
Class 0000: PCI device 1814:0301 (rev 0).
IRQ 155.
Non-prefetchable 32 bit memory at 0xa0000000 [0xa0007fff].)
But the firmware loading process is failed! The DBG shows "NICLoadFirmware: MCU is not ready".
Does anyone have idea if I made any mistake?

Thanks a lot,
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-28-2007, 09:49 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,036
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Hi,

You need to install firmware files in /etc/Wireless/RT61STA directory. You can download all .bin files from the drivers site or it may be there in source code itself. Don't forget you need to configure rt61sta.dat file and put in same directory. Here listing from my system:
Code:
ls /etc/Wireless/RT61STA
rt2561.bin rt2561s.bin rt2661.bin rt61sta.dat
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #3 (permalink)  
Old 05-29-2007, 08:10 AM
Junior Member
User
 
Join Date: May 2007
My distro: ARM-Linux
Posts: 3
Rep Power: 0
mighty is on a distinguished road
Default

Hi,

Thanks for your reply.
Yes, I have these files in the directory. However, it seems the BIN file is not written into the memory correctly. The DBG log is as the following:

*RT61*<7>===> RT61_init_one
PCI: enabling device 00:09.0 (0000 -> 0002)
*RT61*<7>Driver version-1.1.0.0
RT61: Vendor = 0x1814, Product = 0x0301
*RT61*<7>ra0: at 0xa0000000, VA 0xc2e1e000, IRQ 155.
*RT61*<7><=== RT61_init_one
*RT61*<7>--> RTMPAllocAdapterBlock
*RT61*<7><-- RTMPAllocAdapterBlock
*RT61*<7>--> RTMPAllocDMAMemory
*RT61*<7>TxRing[0]: total 64 entry allocated
*RT61*<7>TxRing[1]: total 64 entry allocated
*RT61*<7>TxRing[2]: total 64 entry allocated
*RT61*<7>TxRing[3]: total 64 entry allocated
*RT61*<7>TxRing[4]: total 64 entry allocated
*RT61*<7>MGMT Ring: total 32 entry allocated
*RT61*<7>Rx Ring: total 64 entry allocated
*RT61*<7><-- RTMPAllocDMAMemory
*RT61*<7><--> NICInitTxRxRingAndBacklogQueue
*RT61*<7>--> PortCfgInit
*RT61*<7><-- PortCfgInit
*RT61*<7>===> NICLoadFirmware
*RT61*<7>NICLoadFirmware OK: CRC = 0xbb60 ver=0.8
*RT61*<7>FileLength = 8192
*RT61*<7>NICLoadFirmware: MCU is not ready


*RT61*<7><=== NICLoadFirmware (src=/etc/Wireless/RT61STA/rt2561s.bin, status=1)
*RT61*<7>==> MlmeHalt
*RT61*<7>SW interrupt MCU (cmd=0x50, token=0xff, arg1,arg0=0x00,0x00)
*RT61*<7>--->Disable TSF synchronization
*RT61*<7><== MlmeHalt
*RT61*<7>--> RTMPFreeDMAMemory
*RT61*<7><-- RTMPFreeDMAMemory
*RT61*<7>--> RTMPAllocAdapterBlock
*RT61*<7><-- RTMPAllocAdapterBlock
*RT61*<7>--> RTMPAllocDMAMemory
*RT61*<7>TxRing[0]: total 64 entry allocated
*RT61*<7>TxRing[1]: total 64 entry allocated
*RT61*<7>TxRing[2]: total 64 entry allocated
*RT61*<7>TxRing[3]: total 64 entry allocated
*RT61*<7>TxRing[4]: total 64 entry allocated
*RT61*<7>MGMT Ring: total 32 entry allocated
*RT61*<7>Rx Ring: total 64 entry allocated
*RT61*<7><-- RTMPAllocDMAMemory
*RT61*<7><--> NICInitTxRxRingAndBacklogQueue
*RT61*<7>--> PortCfgInit
*RT61*<7><-- PortCfgInit
*RT61*<7>===> NICLoadFirmware
*RT61*<7>NICLoadFirmware OK: CRC = 0xbb60 ver=0.8
*RT61*<7>FileLength = 8192
*RT61*<7>NICLoadFirmware: MCU is not ready


*RT61*<7><=== NICLoadFirmware (src=/etc/Wireless/RT61STA/rt2561s.bin, status=1)
*RT61*<7>==> MlmeHalt
*RT61*<7>SW interrupt MCU (cmd=0x50, token=0xff, arg1,arg0=0x00,0x00)
*RT61*<7>--->Disable TSF synchronization
*RT61*<7><== MlmeHalt
*RT61*<7>--> RTMPFreeDMAMemory
*RT61*<7><-- RTMPFreeDMAMemory

Thanks,
Reply With Quote
  #4 (permalink)  
Old 05-29-2007, 09:10 AM
Junior Member
User
 
Join Date: May 2007
My distro: ARM-Linux
Posts: 3
Rep Power: 0
mighty is on a distinguished road
Default

BTW, my Linux kernel version is 2.4.19. Is this an issue?
Reply With Quote
  #5 (permalink)  
Old 05-29-2007, 01:27 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,036
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

I'm using 2.6.xx version and it is working fine my driver version is 1.1.0.0. Try to write fresh copy of BIN file. According to doc it should work with 2.4.xx kernel too. Did you configued rt61sta.dat file? You must edit this file as binary file and not as a text file. I've noticed that correct configuration is required in this file.
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #6 (permalink)  
Old 05-30-2007, 04:16 PM
zlh zlh is offline
Junior Member
User
 
Join Date: May 2007
My distro: Debian
Posts: 2
Rep Power: 0
zlh is on a distinguished road
Default

Quote:
Originally Posted by nixcraft View Post
I'm using 2.6.xx version and it is working fine my driver version is 1.1.0.0. Try to write fresh copy of BIN file. According to doc it should work with 2.4.xx kernel too. Did you configued rt61sta.dat file? You must edit this file as binary file and not as a text file. I've noticed that correct configuration is required in this file.
Hi,
I have a stupid question. How do you edit a file as binary ?

thanks.
Reply With Quote
  #7 (permalink)  
Old 05-30-2007, 04:30 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,036
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Quote:
Originally Posted by zlh View Post
Hi,
I have a stupid question. How do you edit a file as binary ?

thanks.
Code:
vi -b file-name
vi -b rt61sta.dat
-b is binary mode options, which will be set that makes it possible to edit a binary or executable file.
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #8 (permalink)  
Old 05-30-2007, 06:10 PM
zlh zlh is offline
Junior Member
User
 
Join Date: May 2007
My distro: Debian
Posts: 2
Rep Power: 0
zlh is on a distinguished road
Question

Quote:
Originally Posted by nixcraft View Post
Code:
vi -b file-name
vi -b rt61sta.dat
-b is binary mode options, which will be set that makes it possible to edit a binary or executable file.
Thank you. The network interface of ra0 is up now, but the driver can't get any interrupts of tx or rx.
The dump from my console:

/etc/Wireless/RT61STA # ifconfig ra0
ra0 Link encap:Ethernet HWaddr 00:14:85:112:E2
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:222 overruns:222 frame:222
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:155 Base address:0x5000


/etc/Wireless/RT61STA # cat /proc/interrupts
2: 1 FI2S dma/error
10: 4522 serial
13: 0 gpio
15: 780 FIQ dispatcher
17: 0 rtc Alrm
19: 5000 timer
22: 980 capture
35: 779 eth0
37: 1 FTC_FOTG2XX
155: 0 ra0
160: 0 FI2S dma/error
161: 147 FI2S dma/error
Err: 0
/etc/Wireless/RT61STA #



It seems the card receives packets, but it drops them for some reason and therefore there's no rx interrupt. How could this happen?
I am using linux 2.4.19 with rt61 driver v1.1.0.0 on ARM platform.
Reply With Quote
  #9 (permalink)  
Old 05-31-2007, 11:51 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,036
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

May be you are sharing interrupts see if you can setup something in BIOS
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #10 (permalink)  
Old 08-24-2007, 12:59 PM
Junior Member
User
 
Join Date: Aug 2007
My distro: Debian
Posts: 1
Rep Power: 0
nymous is on a distinguished road
Default

Happen to me also, for my case it because of pci master is failing, hence all packet is dropped. Check the "buffer address" given to the card for pci master access.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +5.5. The time now is 09:54 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36