cvs snapshot: rt2x00lib_probe_dev: Error - Failed to initial

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4028

oliviersessink

08-07-2007 10:52:32

Hi all,

I'm using a Sweex usb wireless adaptor. On default Ubuntu Feisty the device is correctly identified, and scanning networks works, but associating with a accesspoint never works.

So I compiled vanilla linux-2.6.22-rc7, compiled the rt2x00 cvs snapshot tarball, but that didn't help

[codelk6y5p39]usb 1-4: new high speed USB device using ehci_hcd and address 3
usb 1-4: configuration #1 chosen from 1 choice
phy1 -> rt73usb_alloc_eeprom: EEPROM recovery - NIC: 0xffef
phy1 -> rt73usb_alloc_eeprom: EEPROM recovery - Led: 0xe000
phy1 -> rt73usb_alloc_eeprom: EEPROM recovery - RSSI OFFSET BG: 0x0000
phy1 -> rt2x00_set_chip: Info - Chipset detected - rt: 1300, rf: 0002, rev: 0002573a.
wmaster0: Selected rate control algorithm 'simple'
wmaster0: Failed to initialize wep
phy1 -> rt2x00lib_probe_dev: Error - Failed to initialize hw.
rt73usb: probe of 1-4:1.0 failed with error -12
[/codelk6y5p39]

What did I do wrong that causes the hardware not to be initialized?

the device is (lsusb -v)
[codelk6y5p39]
Bus 001 Device 003: ID 148f:2573 Ralink Technology, Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x148f Ralink Technology, Corp.
idProduct 0x2573
bcdDevice 0.01
iManufacturer 1 Ralink
iProduct 2 54M.USB.......
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 300mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
[/codelk6y5p39]

thanks for your help!

IvD

08-07-2007 10:53:47

Make sure you load the arc4 module before loading mac80211.ko

oliviersessink

08-07-2007 19:16:50

Make sure you load the arc4 module before loading mac80211.ko[/quote3n1gvbiw]

thanks for the help. However, it doesn't work... exactly the same output if I make sure that arc4 is loaded before mac80211 (

oliviersessink

08-07-2007 19:33:22

How can I check if the firmware is loaded correctly? Or would that give me a different error?

IvD

08-07-2007 21:26:06

When the firmware fails to load the error messages will indicate that.
So far everybody who reported an error message containing "wmaster0 Failed to initialize wep" reported success after loading the arc4 module, so I am unsure what the problem could be now...

oliviersessink

08-07-2007 21:32:50

When the firmware fails to load the error messages will indicate that.[/quote27yw9oy7]

ok, so this is not the problem

So far everybody who reported an error message containing "wmaster0 Failed to initialize wep" reported success after loading the arc4 module, so I am unsure what the problem could be now...[/quote27yw9oy7]

what other modules need to be loaded for wep? is it possible to test the driver without wep?

thanks for the help

IvD

08-07-2007 21:44:26

Only arc4 is required.
And unfortunatelely it isn't possible to disable WEP.

Could retest and really make sure the following modules are unloaded

mac80211.ko
rt2x00lib.ko
rt2x00usb.ko
rt73usb.ko

And then load arc4 followed by the above mentioned modules?

oliviersessink

09-07-2007 18:45:20

Only arc4 is required.
And unfortunatelely it isn't possible to disable WEP.

Could retest and really make sure the following modules are unloaded

mac80211.ko
rt2x00lib.ko
rt2x00usb.ko
rt73usb.ko

And then load arc4 followed by the above mentioned modules?[/quote36r8sh2m]

ok, did that, I modprobe'd arc4
[code36r8sh2m]# lsmod|egrep '(arc4|.*802.*|rt.*)'
arc4 2048 0
#
[/code36r8sh2m]
and then I inserted the stick

[code36r8sh2m]# lsmod|egrep '(arc4|.*802.*|rt.*)'
rc80211_simple 5504 0
rt73usb 24448 0
rt2x00usb 10368 1 rt73usb
rt2x00lib 17152 2 rt73usb,rt2x00usb
mac80211 147464 3 rc80211_simple,rt2x00usb,rt2x00lib
cfg80211 6152 1 mac80211
crc_itu_t 2176 1 rt2x00lib
arc4 2048 0
crypto_algapi 13696 1 arc4
usbcore 116376 5 rt73usb,rt2x00usb,ehci_hcd,uhci_hcd[/code36r8sh2m]

but I got the same error

[code36r8sh2m]
wmaster0: Selected rate control algorithm 'simple'
wmaster0: Failed to initialize wep
phy1 -> rt2x00lib_probe_dev: Error - Failed to initialize hw.
rt73usb: probe of 4-4:1.0 failed with error -12
[/code36r8sh2m]

I will try todays snapshot and see if the same thing happens..

oliviersessink

09-07-2007 18:57:16


I will try todays snapshot and see if the same thing happens..[/quote1hzxhads]

when trying todays snapshot I didn't edit the "config" file, so all drivers were installed. I noticed that the error is the same with the rt2500usb as the rt73usb.
[code1hzxhads]usb 2-4: new high speed USB device using ehci_hcd and address 2
usb 2-4: configuration #1 chosen from 1 choice
phy0 -> rt2500usb_alloc_eeprom: EEPROM recovery - Antenna: 0x0002
phy0 -> rt2500usb_alloc_eeprom: EEPROM recovery - NIC: 0xfff0
phy0 -> rt2500usb_alloc_eeprom: EEPROM recovery - BBPtune: 0xff2d
phy0 -> rt2500usb_alloc_eeprom: EEPROM recovery - BBPtune vgc: 0xff40
phy0 -> rt2500usb_alloc_eeprom: EEPROM recovery - BBPtune r24: 0x8040
phy0 -> rt2500usb_alloc_eeprom: EEPROM recovery - BBPtune r25: 0x5040
phy0 -> rt2500usb_alloc_eeprom: EEPROM recovery - BBPtune r61: 0x6d60
phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 1201, rf: 0000, rev: 00000000.
wmaster0: Selected rate control algorithm 'simple'
wmaster0: Failed to initialize wep
phy0 -> rt2x00lib_probe_dev: Error - Failed to initialize hw.
rt2500usb: probe of 2-4:1.0 failed with error -12
usbcore: registered new interface driver rt2500usb
phy1 -> rt73usb_alloc_eeprom: EEPROM recovery - NIC: 0xffef
phy1 -> rt73usb_alloc_eeprom: EEPROM recovery - Led: 0xe000
phy1 -> rt73usb_alloc_eeprom: EEPROM recovery - RSSI OFFSET BG: 0x0000
phy1 -> rt2x00_set_chip: Info - Chipset detected - rt: 1300, rf: 0002, rev: 0002573a.
wmaster0: Selected rate control algorithm 'simple'
wmaster0: Failed to initialize wep
phy1 -> rt2x00lib_probe_dev: Error - Failed to initialize hw.
rt73usb: probe of 2-4:1.0 failed with error -12
usbcore: registered new interface driver rt73usb
[/code1hzxhads]

update the device does work properly using the improved-legacy driver rt73

dgi

28-07-2007 17:19:00

I have an AirLink101 AR525W router, and I'm trying to get the new driver working under OpenWRT on it. I am running into this exact problem. I thought I'd take a look at the forum to see how common it might be, and I found this thread. I saw that you suggested loading the arc4 module before anything else, so I decided to compile it directly into the kernel. That had no effect on the problem. Here is the output[code3qmygzlv]Loading module: rt61pci - 2.0.1 by http://rt2x00.serialmonkey.com.
phy1 -> rt61pci_alloc_eeprom: EEPROM recovery - Led: 0xe0ff
phy1 -> rt2x00_set_chip: Info - Chipset detected - rt: 0401, rf: 0004, rev: 0002661d.
wmaster0: Selected rate control algorithm 'simple'
wmaster0: Failed to initialize wep
phy1 -> rt2x00lib_probe_dev: Error - Failed to initialize hw.
rt61pci: probe of 0000:00:01.0 failed with error -12[/code3qmygzlv]Clearly, something else is wrong with the WEP initialization failure, but I think that before that can be examined, one needs to take care of the "error -12" above. That is happening when kzalloc() is failing to allocate for the EEPROM. The same thing can be seen in what oliviersessink pasted. I don't know what to do about this.[/quote3qmygzlv]You have not loaded the arc4 module...[/quote3qmygzlv]It is no longer a module. It is now compiled directly into the kernel.

dgi

01-08-2007 08:33:54

Does this mean that compiling arc4 into the kernel cannot work?

dgi

03-08-2007 12:05:08

Updated to a later CVS snapshot, from 2007-07-25. Can't go later yet due to mac80211 API changes. The output is a little different
[code18c9yqox]phy1 -> rt61pci_alloc_eeprom: EEPROM recovery - Led: 0xe0ff
phy1 -> rt61pci_alloc_eeprom: EEPROM recovery - RSSI OFFSET BG: 0x0000
phy1 -> rt61pci_alloc_eeprom: EEPROM recovery - RSSI OFFSET BG: 0x0000
phy1 -> rt2x00_set_chip: Info - Chipset detected - rt: 0401, rf: 0004, rev: 0002661d.
wmaster0: Selected rate control algorithm 'simple'
wmaster0: Failed to initialize wep
phy1 -> rt2x00lib_probe_dev: Error - Failed to initialize hw.
rt61pci: probe of 0000:00:01.0 failed with error -12 [/code18c9yqox]

dgi

04-08-2007 15:34:49

[bf2pkhgyb]SOLVED![/bf2pkhgyb][/sizef2pkhgyb]
The missing module was ecb.ko, not arc4.ko; with both compiled into the kernel, it loads. The possibility of compiling arc4 into the kernel when ecb is a module is a really stupid Kconfig bug. Many thanks for pointing me in the right direction.

mki0

27-04-2008 11:40:54

I also had to load cryptomgr before it would work
So, load arc4, ecb and cryptomgr before the rt module(s), or build them into the kernel

Micah

22-05-2008 00:32:47

I rebuilt my kernel (2.6.25.4) and ran into this problem. I found this thread, which provided a solution, so thanks everyone! However, I thought it was odd that the modules were not loaded automatically. On further investigation, I discovered that automatic kernel module loading (CONFIG_KMOD) was not enabled. I turned it on, recompiled, and everything loaded up automatically.