D-Link DWA-547 completely freezes system
Dear all,
I recently purchased a wireless-n card, namely the D-link DWA-547. It has an atheros chipset and is nicely detected by the ath9k driver. I have been trying to get this card working with the Ubuntu 9.10 kernel (which is based on 2.6.31), as well as linux 2.6.32. I have also tried Ubuntu 9.10 backport wireless modules.
lspci reports:
07:02.0 Network controller [0280]: Atheros Communications Inc. AR922X Wireless Network Adapter [168c:0029] (rev 01)
Subsystem: D-Link System Inc Device [1186:3a78]
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 12 Memory at fbae0000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [44] Power Management version 2
Kernel modules: ath9k
The problem is that after a few minutes - sometimes seconds - the system halts to a complete freeze where the reset button is the only way out. Sometimes this happens before X has started, sometimes it happens right after a connection is established. There is no way for me to gather any information after the freeze and I haven't found anything in the logs. So, unfortunately, at the moment I have no clue as of how to provide this list with more information (and that's why this ended up being an email to the list, rather than a bug report).
The only thing that helped was to modprobe -r ath9k as soon as the system booted up (the module is now blacklisted).
I also happened to have a windows 7 license, so I decided to try the card under Windows 7 for comparison. Interestingly, the system behaved in precisely the same way: Complete freeze. Later, I noticed that the problem wasn't uncommon [1]. The retailer, however, insists that the card I have worked flawlessly under Windows XP for them (I purchased a demo ex for a discounted price), and that there simply are no Windows 7 drivers. About linux support, they had nothing to say.
So, is this a known issue? And more importantly, how can I even start trouble shooting?
Best regards,
Khashayar
[1] http://www.google.se/search?sourceid=chrome&ie=UTF-8&q=d-link+dwa-547+complete+freeze
Quoted 30 lines
lspci reports:
07:02.0 Network controller [0280]: Atheros Communications Inc. AR922X Wireless Network Adapter [168c:0029] (rev 01)
? ?Subsystem: D-Link System Inc Device [1186:3a78]
? ?Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 12 ? ?Memory atfbae0000(32-bit, non-prefetchable) [size=64K] ? ?Capabilities: [44] Power Management version 2
? ?Kernel modules: ath9kThe problem is that after a few minutes - sometimes seconds - the system halts to a complete freeze where the reset button is the only way out. Sometimes this happens before X has started, sometimes it happens right after a connection is established. There is no way for me to gather any information after the freeze and I haven't found anything in the logs. So, unfortunately, at the moment I have no clue as of how to provide this list with more information (and that's why this ended up being an email to the list, rather than a bug report).
The only thing that helped was to modprobe -r ath9k as soon as the system booted up (the module is now blacklisted).
I also happened to have a windows 7 license, so I decided to try the card under Windows 7 for comparison. Interestingly, the system behaved in precisely the same way: Complete freeze. Later, I noticed that the problem wasn't uncommon [1]. The retailer, however, insists that the card I have worked flawlessly under Windows XP for them (I purchased a demo ex for a discounted price), and that there simply are no Windows 7 drivers. About linux support, they had nothing to say.
Quoted 9 lines
So, is this a known issue? And more importantly, how can I even start trouble shooting?
Best regards,
Khashayar[1] http://www.google.se/search?sourceid=chrome&ie=UTF-8&q=d-link+dwa-547+complete+freeze
Hm. I just noticed AR922X is not listed under supported chipsets [1]. How come then that the module is loaded automatically? Before total system freeze it is also possible to scan networks and even establish a connection. Shouldn't the module not be loaded if the hardware has a chipset that's not supported?
Thanks in advance,
Khashayar
Quoted 5 lines · Khashayar Naderehvandi
Hm. I just noticed AR922X is not listed under supported chipsets [1]. How come then that the module is loaded automatically? Before total system freeze it is also possible to scan networks and even establish a connection. Shouldn't the module not be loaded if the hardware has a chipset that's not supported?
AR9220 is the same as AR9280 (I don't know the details, the chip names, the RF names, the marketing names etc, but the fact is, it's the same thing for the end users).
However, the PCI versions of that chipset (that includes miniPCI, but not PCI Express or PCI Express Mini Card) are affected by some bug that will be hopefully fixed soon. You can see the list archives for details.
MadWifi has that bug too, and I removed 168c:0029 from the list of supported IDs until it's resolved. As for ath9k, it's not my call.
Signature · 2 lines
Regards, Pavel Roskin
Quoted 11 lines · Pavel Roskin
Quoted 5 lines · Khashayar Naderehvandi
Hm. I just noticed AR922X is not listed under supported chipsets [1]. How come then that the module is loaded automatically? Before total system freeze it is also possible to scan networks and even establish a connection. Shouldn't the module not be loaded if the hardware has a chipset that's not supported?
AR9220 is the same as AR9280 (I don't know the details, the chip names, the RF names, the marketing names etc, but the fact is, it's the same thing for the end users).
AR5416 is Atheros' first PCI 802.11n
AR5418 is Atheros' first PCI-Express 802.11n
These both had the radios separated on the chip.
Everything after this all 802.11n chipsets from Atheros started to be built in a single chip, reducing cost and overhead connectors between hardware components. This also meant simplifying a lot of register controls, which you can see on ath9k/phy.c file.
AR9280 is Atheros' first dual stream PCI-Express single-chip AR9220 is ATheros' first dual stream PCI single-chip
They are essentially the same except for the bus interface. Both of them are supported. If there are issues they are bugs.
Luis
Quoted 5 lines · Luis R. Rodriguez
AR9280 is Atheros' first dual stream PCI-Express single-chip AR9220 is ATheros' first dual stream PCI single-chip
They are essentially the same except for the bus interface. Both of them are supported. If there are issues they are bugs.
Thanks. I see it now. So we have a bug affecting AR9220, plain and simple.
I can confirm that 0xdeadbeef comes from the chip, not from some random place in memory. Even the supported Ubiquiti SR71-15 returns 0xdeadbeef when reading from the register 0x00ac (AR_IMR_S2).
The fact that SR71-12 only works if installed in a slot below SR71-15 is very intriguing. I checked the modules with nm for possible static variables, but I cannot spot anything wrong. I'm going to try mmiotrace.
Signature · 2 lines
Regards, Pavel Roskin
Quoted 8 lines · Pavel Roskin
Quoted 5 lines · Luis R. Rodriguez
AR9280 is Atheros' first dual stream PCI-Express single-chip AR9220 is ATheros' first dual stream PCI single-chip
They are essentially the same except for the bus interface. Both of them are supported. If there are issues they are bugs.
Thanks for clearing that out: So I am, in fact, seeing a bug here. Next step is to find out how to save something useful for the bug report. I've no clue how to do that due to the nature of the crash.
Quoted 12 lines
Thanks. I see it now. So we have a bug affecting AR9220, plain and simple.
I can confirm that
0xdeadbeefcomes from the chip, not from some random place in memory. Even the supported Ubiquiti SR71-15 returns0xdeadbeefwhen reading from the register0x00ac(AR_IMR_S2).The fact that SR71-12 only works if installed in a slot below SR71-15 is very intriguing. I checked the modules with nm for possible static variables, but I cannot spot anything wrong. I'm going to try mmiotrace.
Pavel, this is way too technical for me to understand :) Are you saying that you can confirm the issue I posted about? Does this bug surface depending on which PCI-slot the card is inserted in? How can I help out?
Regards,
Khashayar
Quoted 10 lines · Khashayar Naderehvandi
Quoted 9 lines
I can confirm that
0xdeadbeefcomes from the chip, not from some random place in memory. Even the supported Ubiquiti SR71-15 returns0xdeadbeefwhen reading from the register0x00ac(AR_IMR_S2).The fact that SR71-12 only works if installed in a slot below SR71-15 is very intriguing. I checked the modules with nm for possible static variables, but I cannot spot anything wrong. I'm going to try mmiotrace.
Pavel, this is way too technical for me to understand :)
Sorry, it was meant for Luis.
Ubiquiti SR71-15 is the only AR9220 card I know that works with ath9k. It's a 5GHz-only card, so maybe that's the reason.
Ubiquiti SR71-12 is a 2GHz card and it doesn't work. However, if SR71-15 is present in the same system and has a lower PCI address so that it's initialized first, SR71-12 would work. This makes me think that the initialization of SR71-15 changes something in the state of the driver. The state should be separate for every device, so it may be a bug.
I discovered that reading from some registers gives 0xdeadbeef. Even for SR71-15 reading from one register gives 0xdeadbeef. 0xdeadbeef is a number commonly used to indicate uninitialized data. But it comes from the device. So we are doing something wrong. Maybe the register in question (AR_IMR_S2) should be initialized, or maybe the whole chip initialization is wrong.
Quoted 1 line
Are you saying that you can confirm the issue I posted about?
Yes.
Quoted 2 lines
Does
this bug surface depending on which PCI-slot the card is inserted in?
Only if you have Ubiquiti SR71-15 on that system.
Quoted 1 line
How can I help out?
I don't know. It's hard to give instructions how to fix a bug. It's easier to fix a bug. I just don't have enough time for that.
Signature · 2 lines
Regards, Pavel Roskin
El 22/01/2010 18:52, Pavel Roskin escribi?:
Quoted 25 lines · Khashayar Naderehvandi
Quoted 11 lines
Quoted 10 lines
I can confirm that
0xdeadbeefcomes from the chip, not from some random place in memory. Even the supported Ubiquiti SR71-15 returns0xdeadbeefwhen reading from the register0x00ac(AR_IMR_S2).The fact that SR71-12 only works if installed in a slot below SR71-15 is very intriguing. I checked the modules with nm for possible static variables, but I cannot spot anything wrong. I'm going to try mmiotrace.
Pavel, this is way too technical for me to understand :)
Sorry, it was meant for Luis.
Ubiquiti SR71-15 is the only AR9220 card I know that works with ath9k. It's a 5GHz-only card, so maybe that's the reason.
Ubiquiti SR71-12 is a 2GHz card and it doesn't work. However, if SR71-15 is present in the same system and has a lower PCI address so that it's initialized first, SR71-12 would work. This makes me think that the initialization of SR71-15 changes something in the state of the driver. The state should be separate for every device, so it may be a bug.
Quoted 6 lines
I discovered that reading from some registers gives
0xdeadbeef. Even for SR71-15 reading from one register gives0xdeadbeef.0xdeadbeefis a number commonly used to indicate uninitialized data. But it comes from the device. So we are doing something wrong. Maybe the register in question (AR_IMR_S2) should be initialized, or maybe the whole chip initialization is wrong.
Hi Pavel, i had done some tests and did found that my SR71-12 does works if I
change in hw.c::ath9k_hw_init_11a_eeprom_fix()...
if ((ah->hw_version.devid == AR9280_DEVID_PCI) &&
test_bit(ATH9K_MODE_11A, ah->caps.wireless_modes)) {to...
if (ah->hw_version.devid == AR9280_DEVID_PCI) {
Unfortunately, I don't know what that 'fix' fixes :-)
Signature · 10 lines
============================================================== Jorge Boncompte - Ingenieria y Gestion de RED DTI2 - Desarrollo de la Tecnologia de las Comunicaciones -------------------------------------------------------------- C/ Abogado Enriquez Barrios, 5 14004 CORDOBA (SPAIN) Tlf: +34 957 761395 / FAX: +34 957 450380 ============================================================== - Sin pistachos no hay Rock & Roll... - Without wicker a basket cannot be made. ==============================================================
Quoted 11 lines · On Fri, 2010-01-22 at 19:26 +0100, Jorge Boncompte [DTI2] wrote:
Hi Pavel, i had done some tests and did found that my SR71-12 does works if I
change inhw.c::ath9k_hw_init_11a_eeprom_fix()...if ((
ah->hw_version.devid==AR9280_DEVID_PCI) &&test_bit(ATH9K_MODE_11A, ah->caps.wireless_modes)) {to...
if (
ah->hw_version.devid==AR9280_DEVID_PCI) {Unfortunately, I don't know what that 'fix' fixes :-)
You patch fixes Ubiquiti SR71-12 for me! And it looks quite reasonable. I'm only getting "deadbeef" from AR_IMR_S2 now, which is exactly what I'm getting with SR71-15.
The right fix would be probably to find out when the "fixup" is actually needed.
By the way, I'm not very fond of checking PCI ID in the driver when there are other ways to check for the chip revision and capabilities.
Signature · 2 lines
Regards, Pavel Roskin
Adding Ben and Cliff just to keep them in the loop.
Note: this e-mail is on a public mailing list.
Quoted 18 lines · Pavel Roskin
Quoted 11 lines · On Fri, 2010-01-22 at 19:26 +0100, Jorge Boncompte [DTI2] wrote:
Hi Pavel, i had done some tests and did found that my SR71-12 does works if I
change inhw.c::ath9k_hw_init_11a_eeprom_fix()...if ((
ah->hw_version.devid==AR9280_DEVID_PCI) &&test_bit(ATH9K_MODE_11A, ah->caps.wireless_modes)) {to...
if (
ah->hw_version.devid==AR9280_DEVID_PCI) {Unfortunately, I don't know what that 'fix' fixes :-)
You patch fixes Ubiquiti SR71-12 for me! And it looks quite reasonable. I'm only getting "deadbeef" from
AR_IMR_S2now, which is exactly what I'm getting with SR71-15.
Quoted 5 lines
The right fix would be probably to find out when the "fixup" is actually needed.
By the way, I'm not very fond of checking PCI ID in the driver when there are other ways to check for the chip revision and capabilities.
I'm baffled, why would initializing some 5 Ghz stuff be required for a 2ghz only card. Unless hardware requires this.. we're still looking into this.
Luis
Quoted 26 lines · Luis R. Rodriguez
Adding Ben and Cliff just to keep them in the loop.
Note: this e-mail is on a public mailing list.
Quoted 21 lines · Pavel Roskin
Quoted 11 lines · On Fri, 2010-01-22 at 19:26 +0100, Jorge Boncompte [DTI2] wrote:
Hi Pavel, i had done some tests and did found that my SR71-12 does works if I
change inhw.c::ath9k_hw_init_11a_eeprom_fix()...if ((
ah->hw_version.devid==AR9280_DEVID_PCI) &&test_bit(ATH9K_MODE_11A, ah->caps.wireless_modes)) {to...
if (
ah->hw_version.devid==AR9280_DEVID_PCI) {Unfortunately, I don't know what that 'fix' fixes :-)
You patch fixes Ubiquiti SR71-12 for me! And it looks quite reasonable. I'm only getting "deadbeef" from
AR_IMR_S2now, which is exactly what I'm getting with SR71-15.The right fix would be probably to find out when the "fixup" is actually needed.
Quoted 6 lines
Quoted 2 lines
By the way, I'm not very fond of checking PCI ID in the driver when there are other ways to check for the chip revision and capabilities.
I'm baffled, why would initializing some 5 Ghz stuff be required for a 2ghz only card. Unless hardware requires this.. we're still looking into this.
Looking at the fixups more closely, I'd say that this is not actually 5 GHz specific stuff, but rather a bogus check that was added over time.
When looking back at a much, much older version of ath9k (before it was merged to the wireless tree), it didn't have any 11a mode capability check before running the INI fixups.
I think dropping the 11a capability check is the right fix in this case, as the code that gets called then fixes up a static preinitialized value from the initval with a value from the eeprom,
and nothing in the fixup code indicates that it's supposed to be 11a specific.
- Felix
Quoted 3 lines · Luis R. Rodriguez
I'm baffled, why would initializing some 5 Ghz stuff be required for a 2ghz only card. Unless hardware requires this.. we're still looking into this.
The fixup changes the initial value for the register 0x7894 (AR_AN_TOP2) from 0x5a508000 to 0x5a108000. It's done in the common memory, which explains the influence of SR71-15 on SR71-12.
The right fix would be to adjust the initial value when it's programmed into the hardware instead of patching the common tables. I don't know if AR_AN_TOP2 is only for 5 GHz.
Signature · 2 lines
Regards, Pavel Roskin
Quoted 11 lines · Pavel Roskin
Quoted 9 lines · Khashayar Naderehvandi
Quoted 9 lines
I can confirm that
0xdeadbeefcomes from the chip, not from some random place in memory. Even the supported Ubiquiti SR71-15 returns0xdeadbeefwhen reading from the register0x00ac(AR_IMR_S2).The fact that SR71-12 only works if installed in a slot below SR71-15 is very intriguing. I checked the modules with nm for possible static variables, but I cannot spot anything wrong. I'm going to try mmiotrace.
Quoted 6 lines
Quoted 1 line
Pavel, this is way too technical for me to understand :)
Sorry, it was meant for Luis.
Ubiquiti SR71-15 is the only AR9220 card I know that works with ath9k. It's a 5GHz-only card, so maybe that's the reason.
We actually hadn't sold 5 GHz only cards like that, I think Ubiquity choose to customize the hardware.
Quoted 1 line
Ubiquiti SR71-12 is a 2GHz card and it doesn't work.
And not sure if this is something custom too. I'm checking internally.
Quoted 6 lines
However, if
SR71-15 is present in the same system and has a lower PCI address so that it's initialized first, SR71-12 would work. This makes me think that the initialization of SR71-15 changes something in the state of the driver. The state should be separate for every device, so it may be a bug.
Openwrt folks were the ones who added 5 GHz only support recently and that was ubiquity in mind. Its unclear to me if the 2 GHz only AR9220 you are seeing is something custom too.
Quoted 1 line
I discovered that reading from some registers gives
0xdeadbeef.
AR9220 would be treated as dual band all the time, I think if all the 5 GHz stuff is skipped for this particular device perhaps it should work OK, but that is just theory.
Luis
Quoted 3 lines · Luis R. Rodriguez
AR9220 would be treated as dual band all the time, I think if all the 5 GHz stuff is skipped for this particular device perhaps it should work OK, but that is just theory.
I think there is an AR9221 which is single band 2 GHz..
Luis
Quoted 10 lines · Luis R. Rodriguez
Quoted 5 lines · Luis R. Rodriguez
AR9220 would be treated as dual band all the time, I think if all the 5 GHz
stuff is skipped for this particular device perhaps it should work OK, but
that is just theory.I think there is an AR9221 which is single band 2 GHz..
AR9223[1], it looks like
and there are other examples of AR9220 being used in an A/N only solution[2]
I've not ever touched either of these devices though.
Pat
[1]
http://www.oxfordtec.com/us/MiniPCI-Wireless-Cards-802.11n---300Mbps/c36_40/p249/Compex-iWAVEPORT-WLM200N2-26DBM-High-Power-26dbm-%28400mW%29-Wireless-Mini-PCI-Atheros-AR9002-%28chipset-AR9223%29-WiFi-adapter-802.11b/g/n-up-to-300Mbps---integrators-only/product_info.html
[2]
http://www.oxfordtec.com/us/MiniPCI-Wireless-Cards-802.11n---300Mbps/c36_40/p244/Compex-iWAVEPORT-WLM-200-N5-11AN---Industrial-Grade---High-Power-24-26dbm-%28max-400mW%29,-2R/2T-Wireless-Mini-PCI-Atheros-AR9002-%28chipset-AR9220%29-WiFi-adapter-802.11an-up-to-300Mbps---integrators-only/product_info.html
Quoted 6 lines
Quoted 2 lines
How can I help out?
I don't know. ?It's hard to give instructions how to fix a bug. ?It's easier to fix a bug. ?I just don't have enough time for that.
If anyone who is actively working on the ath9k driver would be helped by actually having this card at hand while hacking, I'd be happy to mail it to that someone for tests and whatnot. Of course, I'd also pay for postage back and forth. Just let me know.
In the meantime I'll be using a wired connection :)
All the best,
Khashayar