• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Firmware CRC load error when loading upa or wlan firmware  (Read 4714 times)
puterboy
Newbie
*

Karma: 0
Posts: 14


View Profile
« on: December 29, 2010, 02:32:35 PM »

I have been encountering some frequent, but intermittent wireless *firmware* loading bugs on the Ionics Stratus Zigby plug when I load/unload or switch between the access point (uap0) and wlan (mlan0) modules which are the Marvel firmware modules uap8xxx and sd8xxx, respectively.

For example, when loading the wlan module by doing:
    rmmod uap8xxx sd8xxx
    rm /lib/firmware/mrvl/*
    cp -a /fw/wlan/* /lib/firmware/mrvl
    insmod /root/modules/wlan/sd8688.ko

The module loads, but doesnt' work (e.g., ifconfig fails) and dmesg shows the following errors about the wlan firmware not loading correctly:
      wlan_sdio mmc0:0001:1: firmware: requesting mrvl/helper_sd.bin
      wlan_sdio mmc0:0001:1: firmware: requesting mrvl/sd8688.bin
      FW CRC error indicated by the helper: len = 0x0011, txlen = 17
      FW CRC error indicated by the helper: len = 0x0011, txlen = 17
      FW download failure @ 0, over max retry count
      Firmware Init Failed
      wlan_probe: wlan_add_callback failed
      wlan_sdio: probe of mmc0:0001:1 failed with error -1



Similarly, when loading the access point module by doing:
    rmmod uap8xxx sd8xxx
    rm /lib/firmware/mrvl/*
    cp -a /fw/uap/* /lib/firmware/mrvl
    insmod /root/modules/uap/sd8688.ko

The module loads, but doesnt' work (e.g., ifconfig fails) and dmesg shows the following errors about the uap firmware not loading correctly:
      uap_probe: vendor=0x02DF device=0x9104 class=0 function=1
      uap_sdio mmc0:0001:1: firmware: requesting mrvl/helper_sd.bin
      uap_sdio mmc0:0001:1: firmware: requesting mrvl/sd8688_ap.bin
      FW CRC error indicated by the helper: len = 0x0011, txlen = 17
      FW CRC error indicated by the helper: len = 0x0011, txlen = 17
      FW download failure @ 0, over max retry count
      UAP FW download failed!
      Firmware Init Failed
      uap_probe: uap_add_callback failed
      uap_sdio: probe of mmc0:0001:1 failed with error -1

Sometimes it happens on the first load or switch, sometimes on later ones. Sometimes rebooting helps, sometimes it doesn't. Unplugging often but doesn't seem to always help. This *appears* to be a firmware issue but could of course be cause by the hardware not loading the firmware properly.

Note, the error seems to be generated in the following kernel module code (relative to kernel source root):
        ./drivers/net/wireless/libertas_uap/uap_sdio_mmc.c

Note I don't think the problem is due to corruption of the code being loaded (as copied from /fw/uap and /fw/wlan or from /root/modules) since the code has not been changed and indeed it does load properly sometimes.

Any thoughts on what might be causing this issue and how to fix it?

Thanks,
Jeff


Logged

Zortrium
Newbie
*

Karma: 0
Posts: 31


View Profile
« Reply #1 on: January 10, 2011, 12:05:03 AM »

I too am running into this problem when trying to run my GuruPlug as a Wifi client.  I'm using kernel 2.6.33.7 and the newer 'stable' drivers as outlined at http://plugcomputer.org/plugwiki/index.php/Setting_GuruPlug_to_be_a_stable_WiFi_Client.
Logged

Zortrium
Newbie
*

Karma: 0
Posts: 31


View Profile
« Reply #2 on: January 10, 2011, 12:23:46 AM »

Nevermind -- it looks like puterboy already came up with a workaround, but posted it in another thread (http://plugcomputer.org/plugforum/index.php?topic=4330.0).  In my case, the underlying issue was that I left the two relevant firmware files (helper_sd.bin and sd8688.bin) in /lib/firmware/mrvl, and when the plug reboots, it automatically tries to access them during bootup and the wifi gets screwed up.

My ugly but apparently functional solution is to put the firmware files into /lib/firmware/mrvl, switch from AP to client mode, then immediately DELETE the files out of /lib/firmware/mrvl so they're not there on the next reboot.  For completeness, here's the boot-time wifi setup script I'm using:

Code:
#!/bin/sh

# GuruPlug wireless client setup script

# Copy the firmware files to where they're expected
cp /root/firmware/helper_sd.bin /lib/firmware/mrvl/
cp /root/firmware/sd8688.bin /lib/firmware/mrvl/

# Deactivate access point functionality
rmmod uap8xxx

# Activate the wireless modules
insmod /root/wifi/mcypt.ko
insmod /root/wifi/sd8xxx.ko

# Delete the firmware files - wifi get screwed up if
# they're there when the plug reboots
rm /lib/firmware/mrvl/helper_sd.bin
rm /lib/firmware/mrvl/sd8688.bin

# Activate the wifi client
wpa_supplicant -i mlan0 -c /root/wifi.conf -B

# Bring up the interface
ifconfig mlan0 up

# For a dynamic IP
dhclient mlan0

# For a static IP
#ifconfig mlan0 192.168.1.150 netmask 255.255.255.0 up
#route add -net 192.168.1.0 netmask 255.255.255.0 mlan0
#route add default gw 192.168.1.1 mlan0

# Set LEDs for client mode
echo 0 > `eval ls /sys/class/leds/*plug*\:green\:wmode/brightness`
echo 1 > `eval ls /sys/class/leds/*plug*\:red\:wmode/brightness`
Logged

puterboy
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #3 on: January 10, 2011, 02:20:06 AM »

Your aproach is necessary but not sufficient in that it won't let you go back from wifi mode to ap mode without rebooting unless you use my method from the other thread (that you helpfully site) to reset the wifi portion -- Note: I think I probably forgot about this thread when I posted my solution.

In any case, I came up with what I think is a pretty elegant solution that allows you to switch back-and-forth repeatedly between wifi and uap mode plus/minus a wired eth0 port.

I do it using a /etc/network/interfaces script plus 2 helper scripts for wifi and uap mode. These helper scripts are separate both so that you can hide the respective access point and wifi passwords (and ssids) and also since they have several user-defined parameters that you might want to play with.

Basically you have the following options:
1. Wired ethernet only  (eth0)
            ifup eth0; ifdown uap0
2. Wired ethernet plus access point (eth0 + uap0)
            ifup eth0; ifup uap0
3. Access point only (not very useful since you can't connect to the
   rest of the world)
            ifup uap0; ifdown eth0
4. Wireless ethernet only (mlan0)
            ifup mlan0

It requires the following 3 files (that should be untarred within /etc/network/)
/etc/network/interfaces
/etc/network/wpa_supplicant.conf.jjk_
/etc/network/uap-post.jjk_

The 'interfaces' file should be edited to choose between dhcp and static ip and if using static ip to set your ip address. Also, you need to set the AP IP address. The last two files need to be edited to add the appropriate SSID's and WPA passphrases. Finally, the last two files should be mode 600 and 700, respectively.

To set everything up properly, you probably should also add the following lines to the end of your etc/rc.local file (also feel free to add the appropriate ifup/ifdown combinations to start up in the mode that you prefer)

rmmod libertas_sdio libertas btmrvl_sdio btmrvl bluetooth 2>/dev/null
#IP masquerading to forward internal packets to external network
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
#iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A INPUT -i uap0 -p tcp -m tcp --dport 80 -j ACCEPT

echo 1 > /proc/sys/net/ipv4/ip_forward

exit 0






* networking-jjk.tgz (1.79 KB - downloaded 105 times.)
Logged

bad_gui
Jr. Member
**

Karma: 0
Posts: 50


View Profile
« Reply #4 on: January 16, 2011, 07:12:54 PM »

I want to only use my plug as a wireless client so I followed the instructions http://www.openplug.org/plugwiki/index.php/Setting_GuruPlug_to_be_a_stable_WiFi_Client to flash the fixed 2.6.33.7 kernel and install the 2.6.33.7 modules and the
wireless files.

I am unable to get the wireless client module to work. 

When I try to do this

 
Quote
   
* Next, you can install the new drivers in the following order:

insmod /root/mcypt.ko
insmod /root/sd8xxx.ko

You should get the following output:

mcypt: module license 'Marvell Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
wlan_sdio mmc0:0001:1: firmware: requesting mrvl/helper_sd.bin
wlan_sdio mmc0:0001:1: firmware: requesting mrvl/sd8688.bin
WLAN FW is active

Instead I get this
Quote
guruplug:~# insmod /root/wifi/mcypt.ko
guruplug:~# insmod /root/wifi/sd8xxx.ko
wlan_sdio mmc0:0001:1: firmware: requesting mrvl/helper_sd.bin
wlan_sdio mmc0:0001:1: firmware: requesting mrvl/sd8688.bin
wlan_sdio: probe of mmc0:0001:1 failed with error -1

Any ideas?  Why is there no tainted kernel warning? 
Logged

puterboy
Newbie
*

Karma: 0
Posts: 14


View Profile
« Reply #5 on: January 16, 2011, 09:23:51 PM »

Any reason you don't *read* the thread that you are posting in?
I directly explain and address the specific problem you are having.
The kernel tainting is a red herring btw I believe.
Logged

bad_gui
Jr. Member
**

Karma: 0
Posts: 50


View Profile
« Reply #6 on: January 17, 2011, 08:08:31 PM »

I did *read* all of the posts.

Yours clearly states that you want to go back and forth from AP and client mode and you are using an Ionics Stratus Zigby
rather than a Guruplug. 

I only want client mode on a guruplug.  I'm not a software engineer either. 

I did try the command to reset uap8xxx but it gave a file not found error.  Now I see that this has to happen in the startup scripts before the module is unloaded.  I was working from commandline.

I am trying to be methodical and reproduce the steps others took to fix the problem.  Now my startup scripts are a jumbled mess from all of the wifi client fixes I tried to implement.

Could someone update the wifi client fix wiki page?  The default patchfiles (provided from an older kernel version build) aren't compatible with a clean 2.6.33.7 kernel (I got missing macro definition errors) and none of this reseting stuff is in there.  It may save someone else from wasting a lot of time.
Logged

radael
Jr. Member
**

Karma: 1
Posts: 57


View Profile
« Reply #7 on: January 18, 2011, 12:18:50 AM »

There really isn't anyone working full-time, or even a-lot-of-the-time on the the wiki at present.  (I am still hoping to do more, but Life happens).  So, it is unlikely that someone will immediately respond to your request to "fix the page."

You may not feel that you want to invest the time to re-write that page.  But, if you would be so kind, to put a small note on top of the page (not just on the discussion -- go ahead and jump in there).  That way others can have a stronger warning and avoid the problems you encountered.

For that matter, what you could probably help with is a wiki page describing the problem you encountered, and what you did to correct the problem.  Of course, if you were not keeping records, you might not feel as if you can describe it accurately.

Thanks for trying to help.
Logged

Pages: [1]
Print
Jump to: