Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #994 (closed defect: fixed)

Opened 13 years ago

Last modified 11 years ago

Crash after 'ifconfig ath0 up' on a mips1-be

Reported by: georgez@e-zy.net Assigned to:
Priority: major Milestone: version 0.9.5
Component: madwifi: HAL Version: v0.9.2
Keywords: Cc:
Patch is attached: 0 Pending:

Description

The kernel oops after issuing 'ifconfig ath0 up' on a mips1 based platform. This is the message:

# ifconfig ath0 up
Reserved instruction in kernel code in traps.c::do_ri, line 674:
$0 : 00000000 a0000000 80102450 802d6010 80cf0000 a0cef000 00000c20 00000000
$8 : 00000000 fffffffb ffffffff 00000000 fffffffc 2ab4471c 00000000 002a002c
$16: a0cef000 80cde070 80cf8160 80cb3800 80cf0000 00000000 00000000 00000000
$24: 00000000 2ab730d0                   802bc000 802bdd20 7fff7cd8 800deed4
Hi : 00000000
Lo : 0802d601
epc   : 80102454    Not tainted
Status: 1000ff04
Cause : 00000028
PrId  : 0000c601
Process ifconfig (pid: 16, stackpage=802bc000)
Stack:    00000000 80105f70 80cdd160 80cf0000 80cb3800 80cf8160 80cf0000
 80cf8000 00000000 800e4a94 00000003 00000002 80cf8160 80cf0000 00000028
 00000028 80cf8160 80cf0000 80cf8e18 80cf8000 800d8690 800d867c 80046824
 00000001 810423e4 00000000 802bdd90 00000001 00000000 80019dc8 80cf8000
 00000000 80cdd000 80cf8000 00000000 80128078 80c59fe0 8001a4d0 802bddb8
 802bddb8 ...
Call Trace:   [<80105f70>] [<800e4a94>] [<800d8690>] [<800d867c>] [<80046824>]
 [<80019dc8>] [<80128078>] [<8001a4d0>] [<801d13bc>] [<80028a50>] [<8002238c>]
 [<80015a90>] [<801d14d0>] [<80022680>] [<80128078>] [<8012cd3c>] [<80003354>]
 [<8012a284>] [<80184074>] [<801870d0>] [<8011f158>] [<8004fadc>] [<8011f76c>]
 [<80009764>]

Code: 03e00008  27bd0020  a8a00008 <b8a0000b> 30c60fff  a8a6000c  b8a6000f  30e70020  10e00007 
Segmentation fault
# 

I have tested it with many versions after r1716 and always gives the above.

The processor is a mips1 big endiannes, based on Lexra's LX5280 and runs a 2.4.28 kernel.

Attachments

oops1_dec (4.2 kB) - added by georgez@e-zy.net on 11/03/06 11:02:06.

Change History

11/03/06 06:40:53 changed by mrenzmann

  • version set to v0.9.2.

Please check DevDocs/KernelOops to learn how the oops is "decoded". The version above contains opqaue values that are of no use to anyone who has not direct access to your system.

You mention that you've tested r1716 and later, did you also try earlier versions? If so, did it work there? Which is the last revision that works for you?

11/03/06 11:02:06 changed by georgez@e-zy.net

  • attachment oops1_dec added.

11/03/06 11:03:28 changed by georgez@e-zy.net

For version r1716 and before it wouldn't load at all, giving a HAL status 13 'Hardware revision not supported'.

Does the attached oops decode help?

11/03/06 14:27:25 changed by georgez@e-zy.net

Since it is not clear in the decode the crash happens in ath_hal_setuprxdesc macro, so it is in ah->ah_setupRxDesc.

11/07/06 19:53:22 changed by georgez@e-zy.net

I managed to pin point the difference in _OS_REG_WRITE and _OS_REG_READ and the byte swaping. So if I add byte swaping I get a HAL status 13 'Hardware revision not supported' in all versions, while if I remove it I get a crash when I issue 'ifconfig ath0 up'.

This looks similar to ticket #914, which also refers to big endian but on an IXP425.

12/03/06 11:08:54 changed by georgez@e-zy.net

I managed to move some steps ahead by replacing some functions with the relative ones from OPENHAL. That is I replaced the following: ath_hal_setuprxdesc ath_hal_setuptxdesc ath_hal_filltxdesc ath_hal_txstart

This allowd for the interface to come up and the device to send some packets. But then the device hangs without any oops message.

I know that the above is not a valid solution but I had to try something out. Could someone provide some help?

(follow-ups: ↓ 8 ↓ 11 ) 06/21/07 22:40:21 changed by mtaylor

  • status changed from new to closed.
  • resolution set to fixed.

This should be fixed in trunk. If not, please advise.

06/27/07 12:14:11 changed by mrenzmann

  • milestone set to version 0.9.4.

(in reply to: ↑ 6 ; follow-ups: ↓ 9 ↓ 10 ) 09/06/07 05:44:20 changed by anonymous

Replying to mtaylor:

This should be fixed in trunk. If not, please advise.

I believe the problem here is that the LX5280 is a Lexra clone of the MIPS core. It's not a 100% clone. There are 4 instructions (lwl,lwr,swl,swr) that are not implemented because of MIPS patent issues. The mips1-be-elf.o has those 4 instructions in it, and when you cross-compile with it, they end up in the ath_hal.ko module. When the CPU reaches one of those instructions in the driver, you get a seg-fault. I know because I have the same problem with the LX4189 core in my CPU. Is there any way someone can create a HAL for me? I can supply the toolchain.

(in reply to: ↑ 8 ) 09/06/07 05:45:26 changed by chrisyoung@cox.net

Sorry, I forgot to add my e-mail address.

(in reply to: ↑ 8 ; follow-up: ↓ 12 ) 09/06/07 06:44:07 changed by mrenzmann

Replying to anonymous:

Is there any way someone can create a HAL for me?

We are supplied with the HAL by Sam Leffler, so he is the one you need to talk to about that.

(in reply to: ↑ 6 ) 09/11/07 19:38:49 changed by georgez@e-zy.net

Replying to mtaylor:

This should be fixed in trunk. If not, please advise.

I tried it and got the same result, when I issued 'ifconfig ath0 up' it crashed.

(in reply to: ↑ 10 ; follow-up: ↓ 13 ) 09/12/07 23:15:21 changed by georgez@e-zy.net

Replying to mrenzmann:

Replying to anonymous:

Is there any way someone can create a HAL for me?

We are supplied with the HAL by Sam Leffler, so he is the one you need to talk to about that.

Is it OK if we contact him directly? How should we contact him?

(in reply to: ↑ 12 ) 09/13/07 06:32:49 changed by mrenzmann

Replying to georgez@e-zy.net:

Is it OK if we contact him directly? How should we contact him?

You should be able to locate his e-mail address by searching with Google. Or search the mailing list archives, the address he used in the early days of MadWifi is still valid.

02/11/08 06:13:23 changed by mrenzmann

  • milestone changed from version 0.9.4 to version 0.9.5.