Failed to init on TP-Link TL-WN861N
I've just loaded linux kernel 2.6.27 onto a box that I have that contains a TP-Link TLWN861N atheros minipci card. It identifes as a AR5416:
00:09.0 Network controller: Atheros Communications Inc. AR5416 802.11abgn Wireless PCI Adapter (rev 01)
Subsystem: Atheros Communications Inc. Device 2079
Flags: 66MHz, medium devsel, IRQ 17
Memory at fcfe0000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [40] #80 [0000]
Kernel modules: ath9k
When I try to load the ath9k module (with all debugging messages enabled) I get the following kernel messages:
ath9k: 0.1
ath9k 0000:00:09.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17ath_init: devid 0x23ath9k_hw_setpower: AWAKE -> AWAKE (set chip )ath9k_hw_do_attach: serialize_regmode is 0ath9k_hw_do_attach: This Mac Chip Rev 0x0d.2 isath9k_hw_chip_test: address test failed addr: 0x00008000 - wr:0x00ff00ff != rd:0x00ff00efath9k_hw_post_attach: hardware self-test failed
Detaching Aniath9k_hw_setpower: AWAKE -> FULL-SLEEP (set chip )ath_init: unable to attach hardware; HAL status 4294967277
ath9k 0000:00:09.0: PCI INT A disabled
Is this a known problem, or an unsupported card?
Quoted 14 lines · Cameron Hutchison
I've just loaded linux kernel 2.6.27 onto a box that I have that contains a TP-Link TLWN861N atheros minipci card. It identifes as a AR5416:
00:09.0 Network controller: Atheros Communications Inc. AR5416 802.11abgn Wireless PCI Adapter (rev 01)
Subsystem: Atheros Communications Inc. Device 2079
Flags: 66MHz, medium devsel, IRQ 17
Memory atfcfe0000(32-bit, non-prefetchable) [size=64K]
Capabilities: [40] #80 [0000]
Kernel modules: ath9kWhen I try to load the ath9k module (with all debugging messages enabled) I get the following kernel messages:
Quoted 7 lines
ath9k: 0.1
ath9k 0000:00:09.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17ath_init: devid0x23ath9k_hw_setpower: AWAKE -> AWAKE (set chip )ath9k_hw_do_attach:serialize_regmodeis 0ath9k_hw_do_attach: This Mac Chip Rev 0x0d.2 isath9k_hw_chip_test: address test failed addr:0x00008000- wr:0x00ff00ff != rd:0x00ff00ef
This is during ath9k_hw_chip_test(), which is a simple loop to test write/read on 2 registers to see if the written values can be read as the same values. The two registers are:
AR_STA_ID0 which is 0x8000AR_PHY_BASE + (8 << 2) which is 0x9800 + (8<<2) --> 0x9820
AR_STA_ID0 is used to store part of the MAC address and 0x9820 is just one of the PHY registers. So we test writing and reading a 256 times to each register some arbitrary value. We also try writing and reading some 4 specific patterns just to be sure.
Quoted 1 line
ath9k_hw_post_attach: hardware self-test failed
This means when it tried to write to a register it then tried reading the value on the register but didn't get what it was expecting. In your case we tried writing to register offset 0x8000 the value 0x00ff00ff but read 0x00ff00ef, this test will only continue if the value read was 0x00ff00ef so for some reason a bit was lost and the hardware was unable to write the 5th bit on that register.
If we continue this could lead to issues. It seems you may have a faulty wireless card, specifically bit #5 on register 0x8000. Maybe the card is loose? Have you seen it working before?
Luis
Quoted 4 lines · Luis R. Rodriguez
In
your case we tried writing to register offset0x8000the value0x00ff00ffbut read0x00ff00ef, this test will only continue if the value read was0x00ff00ef
I meant 0x00ff00ff of course.
Luis
Quoted 8 lines · Luis R. Rodriguez
Quoted 2 lines · Cameron Hutchison
[...]
ath9k_hw_chip_test: address test failed addr:0x00008000- wr:0x00ff00ff != rd:0x00ff00efThis is during
ath9k_hw_chip_test(), which is a simple loop to test write/read on 2 registers to see if the written values can be read as the same values. The two registers are:
Quoted 7 lines
AR_STA_ID0which is0x8000AR_PHY_BASE+ (8 << 2) which is0x9800+ (8<<2) -->0x9820
AR_STA_ID0is used to store part of the MAC address and0x9820is just one of the PHY registers. So we test writing and reading a 256 times to each register some arbitrary value. We also try writing and reading some 4 specific patterns just to be sure.
Which part of the MAC address would be at AR_STA_ID0? I'm stretching here, since the nibbles would be out of order, but could this card be forcing the multicast bit of the MAC address off?
Quoted 3 lines
If we continue this could lead to issues. It seems you may have a faulty wireless card, specifically bit #5 on register
0x8000. Maybe the card is loose? Have you seen it working before?
I haven't used the card before - recently purchased for this linux box. I've tried reseating the card but no luck.
I modified ath9k_hw_chip_test to continue testing on failure and I get
the same problem on the second test:ath9k_hw_chip_test: address test failed addr: 0x00008000 - wr:0x00ff00ff != rd:0x00ff00efath9k_hw_chip_test: address test failed addr: 0x00009820 - wr:0x00ff00ff != rd:0x00ff00ef
It does not always fail on these two addresses though - sometimes only on one (either one) and occasionally none. But then it goes on to fail the EEPROM checksum:
ath9k_hw_fill_eeprom: Reading from EEPROM, not flashath9k_hw_check_eeprom: Read Magic = 0xA55A need_swap = False.
Bad EEPROM checksum 0xff0f or revision 0x000e Detaching Ani
I guess the MAC multicast is not happening. I'll see if I can rustle up a windows laptop to try this out in and see if it works there.
Quoted 13 lines · Cameron Hutchison
Quoted 10 lines · Luis R. Rodriguez
Quoted 2 lines · Cameron Hutchison
[...]
ath9k_hw_chip_test: address test failed addr:0x00008000- wr:0x00ff00ff != rd:0x00ff00efThis is during
ath9k_hw_chip_test(), which is a simple loop to test write/read on 2 registers to see if the written values can be read as the same values. The two registers are:
AR_STA_ID0which is0x8000AR_PHY_BASE+ (8 << 2) which is0x9800+ (8<<2) -->0x9820
Quoted 8 lines
Quoted 4 lines
AR_STA_ID0is used to store part of the MAC address and0x9820is just one of the PHY registers. So we test writing and reading a 256 times to each register some arbitrary value. We also try writing and reading some 4 specific patterns just to be sure.Which part of the MAC address would be at
AR_STA_ID0? I'm stretching here, since the nibbles would be out of order, but could this card be forcing the multicast bit of the MAC address off?
Please check the usage of the AR_STA_ID0 register as that is what I'd look to answer to you.
Quoted 16 lines
Quoted 3 lines
If we continue this could lead to issues. It seems you may have a faulty wireless card, specifically bit #5 on register
0x8000. Maybe the card is loose? Have you seen it working before?I haven't used the card before - recently purchased for this linux box. I've tried reseating the card but no luck.
I modified
ath9k_hw_chip_testto continue testing on failure and I get
the same problem on the second test:ath9k_hw_chip_test: address test failed addr:0x00008000- wr:0x00ff00ff != rd:0x00ff00efath9k_hw_chip_test: address test failed addr:0x00009820- wr:0x00ff00ff != rd:0x00ff00efIt does not always fail on these two addresses though - sometimes only on one (either one) and occasionally none. But then it goes on to fail the EEPROM checksum:
Quoted 5 lines
ath9k_hw_fill_eeprom: Reading from EEPROM, not flashath9k_hw_check_eeprom: Read Magic =0xA55Aneed_swap= False.
Bad EEPROM checksum0xff0for revision0x000eDetaching Ani
Ouch, this is pretty negative.
Quoted 2 lines
I guess the MAC multicast is not happening. I'll see if I can rustle up a windows laptop to try this out in and see if it works there.
Let us know how it goes.
Luis