|
OpenBSD Installation and Upgrading Installing and upgrading OpenBSD. |
|
Thread Tools | Display Modes |
|
||||
Firmware load of athn-ar9271 fails
I've installed OpenBSD 5.3 release onto two machines: the laptop (amd64) and main "desktop" (i386). dmesgs for each are attached to this post.
On each machine I have the same trouble with a USB wireless N adapter: the firmware won't load. The adapter is a NETGEAR WNA1100, based on Atheros chip. Excerpted from one of the dmesgs are the following lines: Code:
athn0 at uhub0 port 2 "NETGEAR WNA WNA1100" rev 2.00/1.08 addr 2 ... athn0: failed loadfirmware of file athn-ar9271 (error 2) athn0: could not load firmware The man page for the loadfirmware(9) function says it returns an errno(2) code on failure, and errno code 2 is "No such file or directory". Well the files seem to be there: Code:
-r--r--r-- 1 root bin 70624 Jun 16 2011 /etc/firmware/athn-ar7010 -r--r--r-- 1 root bin 70624 Jun 16 2011 /etc/firmware/athn-ar7010-11 -r--r--r-- 1 root bin 51280 Jun 16 2011 /etc/firmware/athn-ar9271 -r--r--r-- 1 root bin 2221 Jun 16 2011 /etc/firmware/athn-license Another data point: when I first got the adapter (1-2 years ago), I tried it under OpenBSD on another machine, and it did work then. So, there was at that time no problem loading the firmware for it. I tried google-ing the error message above, but didn't find anything useful. I wanted to try loading the firmware manually by writing a simple C wrapper for loadfirmware(9), to see what happens, but the man page doesn't say what library to link it with. Any suggestions for how to proceed? Thanks! |
|
||||
Quote:
Quote:
Quote:
So what's causing that random bug? I doubt it's airodump-ng, since it doesn't happen with other wireless devices I used. It could very well be a bug in the Linux ath9k driver. Or it could be a bug in the hardware. But, even if so, the device otherwise works which indicates that the firmware is getting loaded. (Note to self: try to load the OpenBSD firmware under Linux.) The other thing I should do is search the OpenBSD mailing lists about this (I'd sorta assumed google might pick them up, but maybe not.) ADDED: The following is from the Linux dmesg, indicating firmware htc_9271.fw is loaded (the file size in this case is 51272 bytes): Code:
[ 12.555628] usb 1-1.4: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272 [ 12.799589] ath9k_htc 1-1.4:1.0: ath9k_htc: HTC initialized with 33 credits [ 13.231526] ath9k_htc 1-1.4:1.0: ath9k_htc: FW Version: 1.3 [ 13.231634] ath: EEPROM regdomain: 0x60 [ 13.231639] ath: EEPROM indicates we should expect a direct regpair map [ 13.231656] ath: Country alpha2 being used: 00 [ 13.231661] ath: Regpair used: 0x60 [ 13.235546] ieee80211 phy0: Atheros AR9271 Rev:1 [ 13.241914] Registered led device: ath9k_htc-phy0 [ 13.241935] usb 1-1.4: ath9k_htc: USB layer initialized [ 13.243799] usbcore: registered new interface driver ath9k_htc Last edited by IdOp; 1st June 2013 at 08:21 PM. Reason: append dmesg output |
|
||||
I searched openbsd-bugs and openbsd-misc on marc.info for "athn-ar9271". There is one very relevant, unresolved, mailing dated yesterday!
atheros AR9271 fails to load firmware Given the coincidence in dates, for the record, no, it was not me who submitted that. |
|
||||
This gets weirder. This morning I booted (i386) directly into OpenBSD. This time the firmware loaded, and the athn0 interface was there! Was it a case of cold boot vs warm boot? I rebooted, and again it was working.
So decided to check it out. Scan for APs: # ifconfig athn0 scan >> half a dozen reasonable results were returned Scanned for APs again. >> Lots of repeated kernel error messages fill the screen, after several seconds they stop. Scan again. >> Lots of repeated kernel error messages fill the screen, but they never stop. So I disconnected the Netgear USB adapter. System crashes into debugger. Tried rebooting a few more times. Firmware wouldn't load again. As an experiment, I tried loading the firmware from OpenBSD under Linux. It would load, but the device never initialized. I have no idea if this ever had any chance of working, but it didn't. Obviously, a lot of difficult and specialized work goes into writing these device drivers. Hopefully with a little more testing and debugging athn+9271 will come to full fruition. |
|
||||
here's the link
https://wiki.freebsd.org/dev/ath_hal...ardwareSupport
The developer says he'll help others that want to work on it, yet he refuses, maybe there's an issue with the USB portion? |
|
|||
While I applaud you for attempting to identify causes, I don't believe that questioning the USB subsystem is likely to be a fruitful endeavour.
Integrated circuit manufacture has at multiple points in the process opportunities which features/bug fixes can be layered on to the chips themselves. In the case of wireless chips (which is a volatile market...), chips with the same model number may or may not have features enabled. The production of any particular chip may be interrupted in order to fix identified problems or add/subtract features -- all while the model number remains the same. Who gets what chip depends upon the time contracts are finalized with customers & what is specified in the contract. I have no knowledge of what chip was used when the driver was developed & what are the differences between it & the chip discussed in this thread, but I suspect there are driver differences between the operating systems mentioned. This would account for why differences are seen in the behaviour between operating systems. When it comes to compatibility questions where wireless chips work in one operating system but not another, the most direct approach to isolating root causes is to study the source code to the driver itself. Given the contention between the GNU & most other licences, Linux driver code cannot be officially ported to the *BSD's & vice versa. Note that the supporting structure around either environment is likely to be different, so thinking that code from one platform can be dropped into another without modification is not realistic. Nevertheless, if you are serious about attempting to resolve compatibility problems, study the driver code, & debug. If you get something to work, post diff(1)'s to OpenBSD's tech@ mailing list, & see what the project developers say. Last edited by ocicat; 9th June 2013 at 09:20 PM. Reason: clarity |
|
|||
But loadfirmware() just read whole file into malloced kernel memory buffer, it known nothing about underlaing wifi chip. So for me this looks like strange FS problem.
|
|
||||
Quote:
Code:
athn0: failed loadfirmware of file athn-ar9271 (error 2) So I strongly suspect that little part of the mystery is now solved. The main events remain, of course. |
|
|||
This happened to me ever since 5.2 I think, on both i386/amd64/Loongson.
It's for USB card only, as I also have an PCI athn card (should be ar92xx something) and it has been working great. And, if I unplug that USB card, it causes system panic. |
|
||||
Same problem here (USB device based on AR9271) - anyone had any luck with this? Searching only reveals this thread and the bug report (0 replies).
Thanks Code:
$ dmesg | egrep -i 'ar9271|athn1' athn1 at uhub0 port 1 "ATHEROS USB2.0 WLAN" rev 2.00/1.08 addr 2 athn1: failed loadfirmware of file athn-ar9271 (error 2) athn1: could not load firmware Code:
$ ls -l /etc/firmware/athn* -r--r--r-- 1 root bin 70624 Jul 20 2013 /etc/firmware/athn-ar7010 -r--r--r-- 1 root bin 70624 Jul 20 2013 /etc/firmware/athn-ar7010-11 -r--r--r-- 1 root bin 51280 Jul 20 2013 /etc/firmware/athn-ar9271 -r--r--r-- 1 root bin 2221 Jul 20 2013 /etc/firmware/athn-license Code:
$ uname -mrsv OpenBSD 5.4 GENERIC.MP#44 i386 Last edited by blackhole; 22nd March 2014 at 03:35 PM. |
|
||||
Welcome to the forum! Unfortunately, I haven't had a chance to pursue this problem any further. The only vaguely related info to relate is that last year the OpenBSD athn(4) driver was ported to NetBSD -current. I had slightly more luck with it there, at that time, but only slightly: in the end it was also unstable and unreliable. Again, haven't tried it in the last few months there either.
Last edited by IdOp; 22nd March 2014 at 10:29 PM. Reason: man page reference |
|
|||
Honestly, this is the kind of thing that needs a bug report filed (yes, another one). Things that aren't known won't get fixed, and things that are not on bugs@ aren't known.
Please read sendbug(1) and send something. |
|
|||
Quote:
sendmail(8) will already be configured for sending mail from one account to another within the same system, however, this is not a requirement for sending bug reports. The point of using sendbug(1) is to fill in the existing template to create as complete a report as possible which will be more useful to the developers. The template can be saved as text & mailed from a different system and/or mail system if this is more convenient. Completeness is key. It will help you in articulating your findings, & it will help developers discern root causes. More information on what information is useful can be found at the following: http://www.openbsd.org/report.html |
|
||||
Thanks, I find it somewhat confusing, but have managed to send a bug report in. I had trouble confirming the bug as it kept getting rejected, though I think I've manage it now...
"The accept command did not succeed. The token "XXXX-XXXX-XXXX" is unavailable. The request may have been accepted or rejected by another person, or its lifetime may have expired. For assistance, contact the openbsd.org administrators. " I tried replying to the specified email with the token and "accept" in the message body as suggested in the confirmation email. |
|
||||
Welcome!
Yes, your report was posted to the bugs@ mailing list. It was only slightly mangled during receipt, as shown in this mail archive record. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to upgrade firmware? | tls | OpenBSD Installation and Upgrading | 9 | 30th April 2012 10:50 PM |
How to build upgt firmware | AnilG | FreeBSD Installation and Upgrading | 2 | 20th March 2012 12:06 PM |
How do I manually load firmware in OpenBSD? | Shagbag | OpenBSD Packages and Ports | 3 | 18th September 2008 08:37 PM |
NVIDIA driver fails to load, freebsd 7.0 | mc_i2020 | FreeBSD General | 18 | 18th July 2008 01:12 PM |
location for wpi-firmware-.tgz | bsdnewbie999 | OpenBSD General | 1 | 18th June 2008 04:20 AM |