Bug 373098 - ath5k failure with AR242x
Summary: ath5k failure with AR242x
Status: RESOLVED FIXED
: 373205 382578 384206 (view as bug list)
Alias: None
Product: openSUSE 11.0
Classification: openSUSE
Component: Kernel (show other bugs)
Version: Factory
Hardware: Other Other
: P5 - None : Normal with 13 votes (vote)
Target Milestone: ---
Assignee: Jiri Slaby
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-21 22:10 UTC by James Oakley
Modified: 2008-08-12 21:14 UTC (History)
11 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
dmesg after jiri's kernel (27.42 KB, text/plain)
2008-05-10 01:07 UTC, Luiz Fernando Ranghetti
Details
ath_info (59.57 KB, application/octet-stream)
2008-05-10 07:30 UTC, Jiri Slaby
Details
./bug-373098_ath_info 90100000 > ath_info (10.76 KB, text/plain)
2008-05-10 08:20 UTC, Felix Möller
Details
ath_info 54100000 (3.91 KB, text/plain)
2008-05-10 20:01 UTC, Luiz Fernando Ranghetti
Details
dmesg (32.79 KB, text/plain)
2008-08-11 21:49 UTC, Felix Möller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Oakley 2008-03-21 22:10:50 UTC
I have the following wireless card:

  Model: "Atheros AR242x 802.11abg Wireless PCI Express Adapter"
  Vendor: pci 0x168c "Atheros Communications, Inc."
  Device: pci 0x001c "AR242x 802.11abg Wireless PCI Express Adapter"
  SubVendor: pci 0x1468 "AMBIT Microsystem Corp."
  SubDevice: pci 0x0428

The ath5k module is automatically loaded, but the device does not initialise. The following is reported in dmesg:

ath5k_pci 0000:02:00.0: registered as 'phy0'
ath5k phy0: failed to wakeup the MAC Chip
ACPI: PCI interrupt for device 0000:02:00.0 disabled
ath5k_pci: probe of 0000:02:00.0 failed with error -5
Comment 1 Greg Kroah-Hartman 2008-05-07 20:30:04 UTC
Jiri, another atheros card that isn't supported yet by the kernel?
Comment 2 Jiri Slaby 2008-05-07 22:03:25 UTC
Yeah, should be fixed in .26-rc1 too. I'll build a kernel with the patches to confirm the fix. Thanks.
Comment 3 Jiri Slaby 2008-05-09 08:04:09 UTC
*** Bug 382578 has been marked as a duplicate of this bug. ***
Comment 4 Jiri Slaby 2008-05-09 14:46:24 UTC
Could you test one of kernels from:
http://labs.suse.cz/jslaby/bug-384206/
Comment 5 James Oakley 2008-05-09 15:18:34 UTC
Sorry, I replaced the card with an Intel 4965.

There are a couple of people watching this bug. Maybe one of them can try it.

If nobody seems willing, I'll try it later on this weekend or next week.
Comment 6 Felix Möller 2008-05-09 18:08:00 UTC
Jiri I just quickly tested your kernels on my macbook:

02:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01)

ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 17 (level, low) -> IRQ 17
PCI: Setting latency timer of device 0000:02:00.0 to 64
ath5k_pci 0000:02:00.0: registered as 'phy0'
phy0: Selected rate control algorithm 'pid'
ath5k phy0: Atheros AR5424 chip found (MAC: 0xa3, PHY: 0x61)
ADDRCONF(NETDEV_UP): wlan0: link is not ready
NET: Registered protocol family 17
ath5k phy0: unsupported channel mode: 0
ath5k phy0: ath5k_chan_set: unable to reset channel 36 (5180 Mhz)
wlan0: failed to set channel 36 (5180 MHz) for scan
ath5k phy0: unsupported channel mode: 0
ath5k phy0: ath5k_chan_set: unable to reset channel 40 (5200 Mhz)
wlan0: failed to set channel 40 (5200 MHz) for scan
ath5k phy0: unsupported channel mode: 0
ath5k phy0: ath5k_chan_set: unable to reset channel 44 (5220 Mhz)
wlan0: failed to set channel 44 (5220 MHz) for scan
ath5k phy0: unsupported channel mode: 0
ath5k phy0: ath5k_chan_set: unable to reset channel 48 (5240 Mhz)
wlan0: failed to set channel 48 (5240 MHz) for scan
ath5k phy0: unsupported channel mode: 0
ath5k phy0: ath5k_chan_set: unable to reset channel 52 (5260 Mhz)
wlan0: failed to set channel 52 (5260 MHz) for scan
wlan0: failed to set channel 56 (5280 MHz) for scan
wlan0: failed to set channel 60 (5300 MHz) for scan
wlan0: failed to set channel 64 (5320 MHz) for scan
wlan0: failed to set channel 149 (5745 MHz) for scan
wlan0: failed to set channel 153 (5765 MHz) for scan
wlan0: failed to set channel 157 (5785 MHz) for scan
wlan0: failed to set channel 161 (5805 MHz) for scan
wlan0: failed to set channel 165 (5825 MHz) for scan
printk: 16 messages suppressed.
ath5k phy0: unsupported channel mode: 0

madwifi works on this machine
Comment 7 Luiz Fernando Ranghetti 2008-05-10 01:07:00 UTC
Created attachment 214113 [details]
dmesg after jiri's kernel

hi Jiri...

here doesn't work too.... your kernel has the same behaviour as with the kernel from beta2...(dmesg attached)

regards,
Comment 8 Jiri Slaby 2008-05-10 07:29:47 UTC
Luiz: you get reasonable output instead of failures at least. Your chipset revision is not supported yet by the driver.

Felix: could you please run ath_info? Run lspci -v, see "Memory at" line of your card and pass it to ath_info, for example:
# lspci -vs 04:00.0
04:00.0 Ethernet controller: Atheros Communications Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01)
        Subsystem: Wistron NeWeb Corp. CM9 Wireless a/b/g MiniPCI Adapter
        Flags: bus master, medium devsel, latency 168, IRQ 21
-->     Memory at ff6f0000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [44] Power Management version 2
        Kernel driver in use: ath5k_pci
        Kernel modules: ath5k

# ./ath_info ff6f0000
[OUTPUT]

And attach the output.

I suspect the other changes done in 26-rc1 which I couldn't backport due to intrusive changes in whole net/ subtree. If you can, also could you check vanilla 2.6.26-rc1?
Comment 9 Jiri Slaby 2008-05-10 07:30:24 UTC
Created attachment 214122 [details]
ath_info

attaching ath_info binary
Comment 10 Jiri Slaby 2008-05-10 07:41:20 UTC
BTW Luiz, could you run the ath_info too?
Comment 11 Felix Möller 2008-05-10 08:20:36 UTC
Created attachment 214123 [details]
./bug-373098_ath_info 90100000 > ath_info

# lspci -vs 02:00.0
02:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
        Subsystem: Apple Computer Inc. Device 0086
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at 90100000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 2
        Capabilities: [50] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable-
        Capabilities: [60] Express Legacy Endpoint, MSI 00
        Capabilities: [90] MSI-X: Enable- Mask- TabSize=1
        Capabilities: [100] Advanced Error Reporting <?>
        Capabilities: [140] Virtual Channel <?>
        Kernel driver in use: ath_pci
        Kernel modules: ath5k, ath_pci
Comment 12 Felix Möller 2008-05-10 08:38:57 UTC
(In reply to comment #8 from Jiri Slaby)
> I suspect the other changes done in 26-rc1 which I couldn't backport due to
> intrusive changes in whole net/ subtree. If you can, also could you check
> vanilla 2.6.26-rc1?
Is there somewhere an rpm, or do you want me to compile one?
Comment 13 Luiz Fernando Ranghetti 2008-05-10 18:52:26 UTC
Jiri,

I can't use the "./ath_info" see above...

linux:~ # lspci -vs03:00.0
03:00.0 Ethernet controller: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev 01)
        Subsystem: AMBIT Microsystem Corp. Device 0428
        Flags: fast devsel, IRQ 17
        Memory at 54100000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 2
        Capabilities: [50] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable-
        Capabilities: [60] Express Legacy Endpoint, MSI 00
        Capabilities: [90] MSI-X: Enable- Mask- TabSize=1
        Capabilities: [100] Advanced Error Reporting <?>
        Capabilities: [140] Virtual Channel <?>
        Kernel modules: ath5k

linux:~ # ./ath_info 54100000
bash: ./ath_info: Arquivo ou diretório não encontrado
linux:~ # uname -r
2.6.25.2-2-default
linux:~ #

regards
Comment 14 Felix Möller 2008-05-10 19:03:32 UTC
(In reply to comment #13 from Luiz Fernando Ranghetti)
> linux:~ # ./ath_info 54100000
> bash: ./ath_info: Arquivo ou diretório não encontrado
I am correct translating this message with "file or directory not found"?

Just to be sure:
Did you download the ath_info attachment to this report? Then you have to make it excutable with chmod a+x bug-373098_ath_info. After that you can execute it with ./bug-373098_ath_info
Comment 15 Luiz Fernando Ranghetti 2008-05-10 20:01:35 UTC
Created attachment 214205 [details]
ath_info 54100000

Sorry folks!

I did not see the ath_info attachment before....Now the ouput of the program...

regards,
Comment 16 Jiri Slaby 2008-05-11 07:15:53 UTC
I've compiled 2.6.26-rc1 vanilla (no Suse patches) kernel as a rpm:
http://labs.suse.cz/jslaby/bug-373098/

Use at your own risk, it's not an official supported kernel by Suse, neither some functionalities such as AppArmor will work. However if anybody is willing to test it, it would be great.
Comment 17 Jiri Slaby 2008-05-11 07:22:22 UTC
Luiz: you have AR2425 chip, it's under development right now, please be patient. You may test the kernels from comment #16 too, some basic support is implemented there.

Frank: you have AR5424, its support wasn't included in the kernel I proposed earlier, the vanilla should support it.
Comment 18 Jiri Slaby 2008-05-11 07:23:10 UTC
I'm seeing ghosts. Sorry Felix, I meant you, not any Frank.
Comment 19 Jiri Slaby 2008-05-11 07:26:37 UTC
*** Bug 384206 has been marked as a duplicate of this bug. ***
Comment 20 Jiri Slaby 2008-05-11 07:29:30 UTC
*** Bug 373205 has been marked as a duplicate of this bug. ***
Comment 21 Felix Möller 2008-05-11 10:54:43 UTC
Jiri thanks for your kernel!

I get one oops on boot:
powernow: This module only works with AMD K7 CPUs
sysdev: class cpu: driver (c03d1e68) has already been registered to a class, something is wrong, but will forge on!
------------[ cut here ]------------
WARNING: at drivers/base/sys.c:183 sysdev_driver_register+0x59/0xf0()
Modules linked in: acpi_cpufreq(+) speedstep_lib binfmt_misc microcode firmware_class fuse loop dm_mod joydev appletouch arc4 ecb crypto_blkcipher iTCO_wdt snd_hda_intel usbhid ohci1394 sr_mod thermal iTCO_vendor_support i2c_i801 ath5k hid snd_pcm video sg cdrom ieee1394 intel_agp snd_timer output i2c_core mac80211 sky2 agpgart snd_page_alloc snd_hwdep button processor ac battery ff_memless cfg80211 rtc_cmos rtc_core snd rtc_lib soundcore sd_mod uhci_hcd ehci_hcd usbcore ext3 mbcache jbd ata_piix libata scsi_mod dock
Pid: 2006, comm: modprobe Not tainted 2.6.26-rc1-5-vanilla #1
 [<c0126349>] warn_on_slowpath+0x41/0x7b
 [<c012ad70>] ? irq_exit+0x53/0x6b
 [<c01113d0>] ? smp_apic_timer_interrupt+0x6e/0x7c
 [<c0105b28>] ? apic_timer_interrupt+0x28/0x30
 [<c0126e91>] ? vprintk+0x297/0x2c2
 [<c02105cb>] ? acpi_evaluate_object+0x240/0x24d
 [<c01d86c1>] ? __next_cpu+0x15/0x22
 [<c024330a>] sysdev_driver_register+0x59/0xf0
 [<c0265e8d>] cpufreq_register_driver+0x7f/0xfb
 [<f8c09034>] acpi_cpufreq_init+0x34/0x3a [acpi_cpufreq]
 [<c01451c8>] sys_init_module+0x18d5/0x1a82
 [<c0104a2f>] sysenter_past_esp+0x78/0xb9
 =======================
---[ end trace a7282e737e4e5e11 ]---
BIOS EDD facility v0.16 2004-Jun-25, 6 devices found

But sadly the wlan does not work:
dmesg looks like the following:
ath5k_pci 0000:02:00.0: registered as 'phy2'
phy2: Selected rate control algorithm 'pid'
ath5k phy2: Atheros AR5424 chip found (MAC: 0xa3, PHY: 0x61)
ADDRCONF(NETDEV_UP): wlan0: link is not ready

but doing iwlist wlan0 scanning tells me there are no accesspoints but there certainly are some.
Comment 22 Luiz Fernando Ranghetti 2008-05-11 21:24:24 UTC
Jiri,

with the vanilla kernel I can edit the Atheros card(without that nasty message)but not get connected, but it's ok since the modules from my card are in development.

regards,
Comment 23 Greg Kroah-Hartman 2008-05-12 03:10:24 UTC
That boot-time warning message with 2.6.26-rc1 is known and harmless at this time, it has been fixed already in Linus's tree by fixing the check that causes it, it really should not be spitting that message out.

So don't worry about that, focus on your wireless card instead :)
Comment 24 Hubert Figuiere 2008-05-22 01:51:04 UTC
I get the same error on my freshly installed beta3 ThinkPad Z60t

ath5k_pci 0000:13:00.0: registered as 'phy1'
ath5k phy1: failed to wakeup the MAC Chip
ACPI: PCI interrupt for device 0000:13:00.0 disabled
ath5k_pci: probe of 0000:13:00.0 failed with error -5


13:00.0 Ethernet controller: Atheros Communications Inc. AR5212 802.11abg NIC (rev 01)
or
13:00.0 0200: 168c:1014 (rev 01)

Comment 25 Jakub Hegenbart 2008-06-01 14:55:37 UTC
I am having the same problem on a Thinkpad X60.

uname -a:

Linux gondolin 2.6.25.4-8-default #1 SMP 2008-05-26 15:23:05 +0200 x86_64 x86_64 x86_64 GNU/Linux

lspci -v:

03:00.0 Ethernet controller: Atheros Communications Inc. AR5212 802.11abg NIC (rev 01)
        Subsystem: IBM ThinkPad 11a/b/g Wireless LAN Mini Express Adapter (AR5BXB6)
        Flags: fast devsel, IRQ 17
        Memory at edf00000 (64-bit, non-prefetchable) [disabled] [size=64K]
        Capabilities: [40] Power Management version 2
        Capabilities: [50] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable-
        Capabilities: [60] Express Legacy Endpoint, MSI 00
        Capabilities: [90] MSI-X: Enable- Mask- TabSize=1
        Capabilities: [100] Advanced Error Reporting <?>
        Capabilities: [140] Virtual Channel <?>
        Kernel modules: ath5k

dmesg | grep ath:

ath5k_pci 0000:03:00.0: registered as 'phy0'
ath5k phy0: failed to resume the MAC Chip
ath5k_pci: probe of 0000:03:00.0 failed with error -5

ath_info edf00000 says just "Unable to read EEPROM Magic value!" and the attached version says "MAC revision 0xffff is not supported!". I am not sure what [disabled] means here.

This (wireless HW and the drivers for it) is all Greek to me, so I just hope that my problem is related to this bug. For me, this is the only thing currently not working in RC1. (In Arch Linux, madwifi-ng worked for me, but I have not tried madwifi in openSUSE yet, and I have not tried ath5k in Arch before.)
Comment 26 Jiri Slaby 2008-06-01 15:30:56 UTC
I think you locked up the card's pci bridge (which usually happens when wrongly resetting pcie card). Try to run ath_info before loading the ath5k driver (e.g. blacklist it).
Comment 27 Jiri Slaby 2008-07-17 10:28:03 UTC
Could you try HEAD kernel to see whose card is still grabbed by the driver, but fails to init?

ftp://ftp.suse.com/pub/projects/kernel/kotd/HEAD/
Comment 28 kevin vandeventer 2008-07-17 22:41:46 UTC
I downloaded Jiri's kernel and my AR2413 chipset wifi card is now working with the ath5k module. 

Are these patches going to be in the 2.6.26 kernels in openSUSE_Factory repos? 
Comment 29 Luiz Fernando Ranghetti 2008-07-17 22:48:43 UTC
Mine didn't work too...

It was recognized, I can edit in YaST but cannot connect to anything...

regards,
Comment 30 Jiri Slaby 2008-07-29 16:02:34 UTC
(In reply to comment #28 from kevin vandeventer)
> I downloaded Jiri's kernel and my AR2413 chipset wifi card is now working with
> the ath5k module. 

Mine or the HEAD kernel (anyway both should work for you now)?

> Are these patches going to be in the 2.6.26 kernels in openSUSE_Factory repos? 

Yes, HEAD is a pre-release which is then used in opensuse repos. I think 2.6.26 based kernel will be in 11.1.
Comment 31 Jiri Slaby 2008-07-29 16:12:28 UTC
(In reply to comment #29 from Luiz Fernando Ranghetti)
> It was recognized, I can edit in YaST but cannot connect to anything...

Your device is still unsupported, but I have good news for you. Several patches from one of ath5k developers are sitting in my inbox and they contain rf2425 (your mac revision) support ;).
Comment 32 Luiz Fernando Ranghetti 2008-07-29 16:23:25 UTC
Hi,

these are great news! If you need some tests, just ask!

regards,
Comment 33 Jiri Slaby 2008-07-29 18:40:52 UTC
You may try kernel from:
http://labs.suse.cz/jslaby/bug-373098/
Comment 34 Luiz Fernando Ranghetti 2008-07-30 21:45:17 UTC
Hi Jiri...

No sucess this time either...

elchevive@linux-0q5s:~> su
Password:                    
linux-0q5s:/home/elchevive # dmesg | grep ath
 [<c0126349>] warn_on_slowpath+0x41/0x7b     
linux-0q5s:/home/elchevive # iwconfig 
lo        no wireless extensions.     

eth0      no wireless extensions.

linux-0q5s:/home/elchevive # uname -r
2.6.26-rc1-5-vanilla
linux-0q5s:/home/elchevive # dmesg | grep ath
 [<c0126349>] warn_on_slowpath+0x41/0x7b
ath5k_pci 0000:03:00.0: enabling device (0000 -> 0002)
ath5k_pci 0000:03:00.0: registered as 'phy0'
ath5k phy0: Support for RF2425 is under development.
ath5k phy0: Atheros AR2425 chip found (MAC: 0xe2, PHY: 0x70)
linux-0q5s:/home/elchevive # iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11  ESSID:"NSN1"
          Mode:Managed  Frequency:2.412 GHz  Access Point: Invalid
          Tx-Power=27 dBm
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B
          Encryption key:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

linux-0q5s:/home/elchevive #

Regards,
Comment 35 Jiri Slaby 2008-07-30 21:53:47 UTC
Could you do
ip link set wlan0 up
iwlist wlan0 scan
ip link set wlan0 down
iwconfig wlan0 mode monitor
ip link set wlan0 up
tcpdump -i wlan0
?

And post the output if anything appears?
Comment 36 Luiz Fernando Ranghetti 2008-07-31 13:39:41 UTC
sure...

but I think nothing interesting appeared. The output:

linux-0q5s:/home/elchevive # uname -r
2.6.26-rc1-5-vanilla                 
linux-0q5s:/home/elchevive # ip link set wlan0 up
linux-0q5s:/home/elchevive # iwlist wlan0 scan   
wlan0     No scan results                        

linux-0q5s:/home/elchevive # ip link set wlan0 down
linux-0q5s:/home/elchevive # iwconfig wlan0 mode monitor
linux-0q5s:/home/elchevive # ip link set wlan0 up
linux-0q5s:/home/elchevive # tcpdump -i wlan0                                
tcpdump: WARNING: wlan0: no IPv4 address assigned                            
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode   
listening on wlan0, link-type IEEE802_11_RADIO (802.11 plus BSD radio information header), capture size 96 bytes                                                                                        
^C                                                                                                  
0 packets captured                                                                                  
0 packets received by filter                                                                        
0 packets dropped by kernel                                                                         
linux-0q5s:/home/elchevive #

Comment 37 Jiri Slaby 2008-08-06 10:06:40 UTC
Hmm, I've forgotten to add one patch (msi disable; you have pcie adapter). Could you try 20080806 kernel from:
http://labs.suse.cz/jslaby/bug-373098/
Comment 38 Luiz Fernando Ranghetti 2008-08-06 22:06:59 UTC
Jiri,

With this kernel, the card works!!

Regards
Comment 39 Jiri Slaby 2008-08-11 21:13:54 UTC
Well, nobody else complains, closing this bug.

Please, if anybody else from interested parties finds his device unusable in the kernel from comment #37, reopen the bug.
Comment 40 Luiz Fernando Ranghetti 2008-08-11 21:22:35 UTC
for me its ok, nice job you guys who develop this module!

Any idea when this patches will be upstream in kernel?

regards,

Luiz
Comment 41 Felix Möller 2008-08-11 21:49:17 UTC
it does not work on my MacBook yet. But this is probably due to the low quality of my AP. But madwifi does work...

Will attach the log.
Comment 42 Felix Möller 2008-08-11 21:49:45 UTC
Created attachment 232821 [details]
dmesg
Comment 43 Hubert Figuiere 2008-08-11 21:59:16 UTC
works great on my Z60t
Comment 44 Jiri Slaby 2008-08-12 21:14:01 UTC
Felix: Is this b or g/a. Does anything change if you set some rate to a fixed value? We are currently in progress with improving transmition (HW supports more than now is implemented).

At least you can trasmit few frames for association and authentication, so it seems to basically work.