D-Link DWL G122 on MIPS (little endian)

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

gwillem

23-02-2009 22:43:23

I would very much like to get the rt73 driver to work on my PCH A110[/url3bb38e3m] running Linux. I crosscompiled the driver with debug enabled, from latest cvs snapshot, using gcc 4.0.4

[code3bb38e3m]# uname -a
Linux PCH-A110 2.6.15-sigma #2370 PREEMPT Mon Nov 24 19:47:20 MYT 2008 mips unknown
# find / -name rt73.bin
/lib/firmware/rt73.bin
/lib/firmware/2.6.15-sigma/rt73.bin
/usr/lib/hotplug/firmware/rt73.bin
# insmod rt73.ko debug=31
# zcat /proc/config.gz | grep FW
CONFIG_FW_LOADER=y
# dmesg
[...snip....]
rt73: init
rt73: --> usb_rtusb_probe (2.6)
rt73: idVendor = 0x7d1, idProduct = 0x3c03
rt73: usb device name wlan0
rt73: BulkOutMaxPacketSize 512
rt73: rt73_get_ether_stats --->
rt73: --> LoadFirmware
rt73: rt73: Failed to request_firmware. Check your firmware file location
rt73: Failed to request_firmware. Check your firmware file location
rt73: <-- LoadFirmware (status: -2, loaded: 0)
rt73: - common_probe: Failed to load Firmware.
rt73: Failed to load Firmware.
rt73: <-- common_probe: Status = -2
rt73: <-- usb_rtusb_probe: res=-2
rt73: probe of 1-2:1.0 failed with error -2
usbcore: registered new driver rt73
Unhandled kernel unaligned access[#1]:
Cpu 0
$ 0 : 00000000 00000000 90354464 36312e32
$ 4 : 94369c00 7f5ff2a0 000001c0 7f5ff2a0
$ 8 : 00000001 00000000 00000000 00000000
$12 : 00000002 91283df4 00000000 7301a8c0
$16 : 7f5ff2a0 94369c00 000001c0 00000040
$20 : 00000200 9075a628 90420000 7f5ff228
$24 : 00000000 90356578
$28 : 91282000 91283de0 7f5ff238 90302d58
Hi : 00000280
Lo : 00000230
epc : 90354490 Tainted: PF
ra : 90302d58 Status: 10001c03 KERNEL EXL IE
Cause : 40808010
BadVA : 36312e3e
PrId : 00019069
Modules linked in: rt73 snd_usb_audio snd_usb_lib snd_pcm_oss snd_mixer_oss snd_rawmidi snd_pcm snd_timer snd_hwdep snd_page_alloc snd soundcore em8xxx arusb_lnx af_packet ide_generic ide_disk tangox_bmide ide_core llad
Process upnpapp (pid: 993, threadinfo=91282000, task=938ba010)
Stack : ffffffff 00000000 00000000 00000000 30687465 00000000 00000000 00000000
00000002 7301a8c0 00000000 00000000 9075a5b0 94369c00 7f5ff260 00000040
00000200 90302d58 7f5ff4b8 938ba010 9006aa10 91283e34 00000200 7f5ff260
91283ebc ffffffff 91283d88 00000000 92d2f1d0 902f3b60 0000000a ffffffff
ffffffff 00000000 91283ecc 945dbc20 00000008 93b1f638 00008912 7f5ff228
...
Call Trace: [<90302d58>] [<9006aa10>] [<902f3b60>] [<900bc920>] [<902f4094>] [<902f2c34>] [<902f2aa0>] [<900bca28>] [<900bce04>] [<900bcde0>] [<902f4434>] [<9002f900>] [<9002f900>]

Code: 00a08021 10600032 00c09021 <8c71000c> 1220002f 0000a021 27b30010 27a40010 00002821
usbcore: deregistering driver rt73
rt73: exit
# lsmod
Module Size Used by Tainted: PF
rt73 356064 0
snd_usb_audio 58384 1
snd_usb_lib 12480 1 snd_usb_audio
snd_pcm_oss 56208 1
snd_mixer_oss 16496 1 snd_pcm_oss
snd_rawmidi 21264 1 snd_usb_lib
snd_pcm 75360 2 snd_usb_audio,snd_pcm_oss
snd_timer 22576 1 snd_pcm
snd_hwdep 7952 1 snd_usb_audio
snd_page_alloc 7264 1 snd_pcm
snd 39920 7 snd_usb_audio,snd_pcm_oss,snd_mixer_oss,snd_rawmidi,snd_pcm,snd_timer,snd_hwdep
soundcore 5376 2 snd
em8xxx 786352 2
arusb_lnx 354224 0
af_packet 19168 0
ide_generic 496 0
ide_disk 16368 4
tangox_bmide 9520 0
ide_core 98896 3 ide_generic,ide_disk,tangox_bmide
llad 95648 3 em8xxx[/code3bb38e3m]

I tried to compile natively, but this yields the same errors (firmware loading & memory access, not sure if they are related). Any ideas? I'm unfortunately less than proficient with these build tools.

Thanks for making this software available!

Vern

24-02-2009 16:32:25

Hi gwillem,

I guess there's two things you may look at.

First, make sure your firmware file is in the correct location. The error number (-2) means the driver can't find the file.

Second, find out why your kernel isn't handling unaligned accesses. My understanding is that they should trap and be "thunked" to do the right thing.

Thanks,